emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File modes facilities.


From: Stefan Monnier
Subject: Re: File modes facilities.
Date: Fri, 21 Oct 2005 11:07:54 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]