emacs-devel
[Top][All Lists]
Advanced

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

Re: [emacs-w3m:11603] Re: interactive-p obsolete


From: Juanma Barranquero
Subject: Re: [emacs-w3m:11603] Re: interactive-p obsolete
Date: Thu, 7 Jul 2011 00:51:52 +0200

On Wed, Jul 6, 2011 at 20:16, Lennart Borgman <address@hidden> wrote:

>> (defmacro org-called-interactively-p (&optional kind)
>>  (if (featurep 'xemacs)
>>       `(interactive-p)
>>     (if (or (> emacs-major-version 23)
>>             (and (>= emacs-major-version 23)
>>                  (>= emacs-minor-version 2)))
>>         `(with-no-warnings (called-interactively-p ,kind))
>>       `(interactive-p))))
>
> Why not add such a macro to Emacs?

Hmm... What for? In the Emacs trunk, it trivially resolves to
"(with-no-warnings (called-interactively-p kind))", which is a longish
way to say just "(called-interactively-p kind)". And externally
maintained packages would still need to define it because the whole
point is that they are loaded in environments which are *not* the
Emacs trunk... So the only benefit for them would be to be able to do

  (if (fboundp 'compatible-called-interactively-p)
      (compatible-callled-interactively-p kind)
    ;; compatibility code here

and that's no less trouble that directly defining the compatibility
macro in the first place.

    Juanma



reply via email to

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