[Top][All Lists]

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

Re: Delete variables obsolete since Emacs 23

From: Stefan Monnier
Subject: Re: Delete variables obsolete since Emacs 23
Date: Wed, 26 Aug 2020 14:16:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> I've said it several times in this thread already,
> which is why I didn't belabor it in my too-terse
> reply: this is the _definition_ of `interactive-p'
> (in `subr.el'):
> (defun interactive-p ()
>   "..."
>   (declare (obsolete called-interactively-p "23.2"))
>   (called-interactively-p 'interactive))

For completeness, I have to warn that there is a bit more than meets the
eye, here: `called-interactively-p` is a big-ugly-hack and in order for
the above `interactive-p` to work, it has to know that `interactive-p`
is also one of those special not-really-functions.  More specifically,
this manifests itself in the presence of the symbol `interactive-p`
inside `called-interactively-p`.

After all, if taken literally, the above code would always return nil
since `interactive-p` can't be called interactively.

> And the Emacs Lisp source code contains lots of
> occurrences of `(called-interactively-p 'interactive)'.

Yes, and that still sucks, indeed.


reply via email to

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