[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.
Stefan
- Re: Delete variables obsolete since Emacs 23, (continued)
- Re: Delete variables obsolete since Emacs 23, Lars Ingebrigtsen, 2020/08/18
- Re: Delete variables obsolete since Emacs 23, Stefan Kangas, 2020/08/23
- Re: Delete variables obsolete since Emacs 23, Richard Stallman, 2020/08/24
- RE: Delete variables obsolete since Emacs 23, Drew Adams, 2020/08/25
- Re: Delete variables obsolete since Emacs 23, Richard Stallman, 2020/08/25
- Re: Delete variables obsolete since Emacs 23, Gregory Heytings, 2020/08/26
- Re: Delete variables obsolete since Emacs 23, Stefan Kangas, 2020/08/26
- RE: Delete variables obsolete since Emacs 23, Drew Adams, 2020/08/26
- Re: Delete variables obsolete since Emacs 23,
Stefan Monnier <=