[Top][All Lists]

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

RE: Delete variables obsolete since Emacs 23

From: Drew Adams
Subject: RE: Delete variables obsolete since Emacs 23
Date: Sat, 15 Aug 2020 22:30:27 -0700 (PDT)

> ISTR that we declared interactive-p obsolete because it is an not a
> correct solution to the problem it is meant to solve.

Then neither is (called-interactively-p 'interactive).
Goose ... gander.

> The correct solution is to give the function an optional argument
> and an interactive spec which provides a non-nil value for that argument
> in interactive calls.

I already do that where it makes sense (e.g. to
show a message).  And that lesson is given in the
doc string of `called-interactively-p' (which is
_not_ obsolete, let alone being removed).

> There are cases where that gives the right answer,
> while interactive-p gives the wrong answer.

`called-interactively-p' is just as brittle as
`interactive-p' - see its doc string.

The main difference is for keyboard-macro use -
(called-interactively-p 'any) versus
(called-interactively-p 'interactive).

> The point is, you really should change each of those functions
> so that it will not misbehave in those special situations.

My code is backward-compatible, and there's too
much of it to want to change to

(if (fboundp 'called-interactively-p)
    (called-interactively-p 'interactive)

I have no objection to Emacs having declared
`interactive-p' obsolete (well, I kinda do,
but not much, and it's not important at all).

I object to Emacs _removing_ it.  I see no reason
for that.  And no one has given a reason, so far.

Everything said against `interactive-p' so far is
true also of (called-interactively-p 'interactive).
Emacs allows the latter - it's not obsolete.  Emacs
should continue to allow (interactive-p), which is

As far as I'm concerned, Emacs can feel free to
continue to call `interactive-p' names.  Shout
from the rooftops that it's awful, evil, stupid,
obsolete, whatever.  Doesn't bother me.  What
bothers me is removing it.  Sticks & stones...

I didn't complain about the other removals being
made, BTW.

I didn't complain that `buffer-menu-mode-hook' was
deprecated in favor of the same with capital `B',
or that the former is now being removed.  Likewise,
for deprecating (and now removing)
`print-help-return-message' in favor of
`help-print-return-message'.  Lots of obsolete
things are being removed now, with no complaint
from me, although I had to make code adjustments.

`interactive-p' is used much more than the others.

(Mea culpa: I said I had 2500 occurrences of
`interactive-p'.  I actually have 406 occurrences.
A first grep included extraneous test files etc.)

Nothing is gained by removing `interactive-p'.
No one has been able to point out any gain.  Only
pain, no gain.

reply via email to

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