From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: File modes facilities. Date: Fri, 21 Oct 2005 11:07:54 -0400 Message-ID: <87mzl2kiyt.fsf-monnier+emacs@gnu.org> References: <87hdbdxo94.fsf@mahaena.lrde> <87d5m1qm8w.fsf-monnier+emacs@gnu.org> <877jc92o37.fsf@mahaena.lrde> <17238.50816.352274.312799@kahikatea.snap.net.nz> <87u0fd9let.fsf@mahaena.lrde> <87oe5jmu9j.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1129911041 30354 80.91.229.2 (21 Oct 2005 16:10:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 21 Oct 2005 16:10:41 +0000 (UTC) Cc: Eli Zaretskii , Michael Cadilhac , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 21 18:10:27 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ESzQn-0001ED-6G for ged-emacs-devel@m.gmane.org; Fri, 21 Oct 2005 18:07:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ESzQm-0001Nc-Cm for ged-emacs-devel@m.gmane.org; Fri, 21 Oct 2005 12:07:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ESyV1-0000p2-Mg for emacs-devel@gnu.org; Fri, 21 Oct 2005 11:08:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ESyUz-0000oM-Pb for emacs-devel@gnu.org; Fri, 21 Oct 2005 11:08:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ESyUy-0000o3-7o for emacs-devel@gnu.org; Fri, 21 Oct 2005 11:08:00 -0400 Original-Received: from [209.226.175.110] (helo=tomts43-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ESyUt-0000zt-Vv; Fri, 21 Oct 2005 11:07:56 -0400 Original-Received: from alfajor ([70.48.83.21]) by tomts43-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20051021150754.JVTK2981.tomts43-srv.bellnexxia.net@alfajor>; Fri, 21 Oct 2005 11:07:54 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id 73265D72C1; Fri, 21 Oct 2005 11:07:54 -0400 (EDT) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Fri, 21 Oct 2005 13:05:39 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:44509 Archived-At: >> Agreed. I actually firmly believe that we should be able to provide >> elisp code for the interactive spec of a C function. > The previous patch I posted was completely untested, and didn't compile. > Here is a better patch: > *** data.c 19 Sep 2005 00:24:45 +0200 1.254 > --- data.c 21 Oct 2005 13:04:24 +0200 > *************** > *** 787,793 **** > if (SUBRP (fun)) > { > if (XSUBR (fun)->prompt) > ! return list2 (Qinteractive, build_string (XSUBR (fun)->prompt)); > } > else if (COMPILEDP (fun)) > { > --- 787,801 ---- > if (SUBRP (fun)) > { > if (XSUBR (fun)->prompt) > ! { > ! Lisp_Object spec; > ! if (XSUBR (fun)->prompt[0] != '#') > ! return list2 (Qinteractive, build_string (XSUBR (fun)->prompt)); > ! > ! if ((spec = Fget (intern (XSUBR (fun)->symbol_name), Qinteractive), > ! !NILP (spec))) > ! return list2 (Qinteractive, spec); > ! } > } > else if (COMPILEDP (fun)) > { That sounds great, except I think it's important to be able to override in elisp a previous interactive spec provided by C code. Stefan PS: Also I'd move the "spec = ..." out of the if.