emacs-devel
[Top][All Lists]
Advanced

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

Re: called-interactively-p, cedet, and Emacs 23.1 and earlier


From: Lluís
Subject: Re: called-interactively-p, cedet, and Emacs 23.1 and earlier
Date: Thu, 25 Mar 2010 15:33:17 +0100
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/24.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

>> We have recently stumbled over called-interactively-p, which is now used
>> with an argument throughout the Emacs versions of the CEDET code.
>> My externally maintained code I would like to have work in Emacs 22 and 23.1
>> which does not support the argument, and XEmacs which is missing the feature
>> completely, and is thus easy to make work in this case. Could some kind soul
>> help me define some advice, or other trick I can install in older Emacs to
>> allow this form to work?

> How 'bout

Ok, so (unless my elisp is crappier than I thought) compatibility code for both
emacs and xemacs would go like this:

(case (fboundp 'called-interactively-p)
      ((t)

> (condition-case nil
>     (called-interactively-p nil)
>   (defmacro called-interactively-p (arg)
>     (case arg
>       (interactive `(interactive-p))
>       ((any nil) `(called-interactively-p)))))

        )
      ((nil) (defun called-interactively-p (arg)
                    ...whathever xemacs needs to do...)))

Thanks,
        Lluis

--
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth




reply via email to

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