emacs-devel
[Top][All Lists]
Advanced

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

Re: Delete variables obsolete since Emacs 23


From: Stefan Kangas
Subject: Re: Delete variables obsolete since Emacs 23
Date: Wed, 26 Aug 2020 20:51:50 -0700

Richard Stallman <rms@gnu.org> writes:

>   > My commit bc5da2c3fb does basically the following:
>
>   > -    (help-setup-xref (list 'describe-symbols pattern) (interactive-p))
>   > +    (help-setup-xref (list 'describe-symbols pattern)
>   > +                 (called-interactively-p 'interactive))
>
> That is not the recommend way to fix these calls.
> called-interactively-p does not give the correct results in all
> situations.  The right way is to make the optional argument.

This was simply to not use the old deprecated name, which AFAIU is being
considered for removal.

Perhaps we could also expand the section in the Manual that explains why
using an optional argument is better, and make the wording stronger.
Here's what I read in `(info "(elisp) Distinguish Interactive")':

    The above method with the additional argument is usually best,
    because it allows callers to say “treat this call as interactive”.  But
    you can also do the job by testing ‘called-interactively-p’.



reply via email to

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