emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] emacs-25 bc55a57: * lisp/menu-bar.el (kill-this-buffer


From: Stefan Monnier
Subject: Re: [Emacs-diffs] emacs-25 bc55a57: * lisp/menu-bar.el (kill-this-buffer): Doc fix. (Bug#26466)
Date: Mon, 17 Apr 2017 12:05:02 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> The request for documenting the subtlety was voiced more than once
> over the years,

IOW, people have complained about that buggy behavior.

> and I saw no reason not to act on that.

Agreed.  Documenting the bug seems like a poorer choice than fixing it, tho.

> We document similar limitations and subtleties all over the place, so
> there's nothing extraordinary in this case.

The difference is that we know how to fix the bug rather than document it.

> And I see no ugliness here, so if it exists, it must be minor.

The ugliness is that the kill-this-buffer code uses
menu-bar-non-minibuffer-window-p and
menu-bar-menu-frame-live-and-visible-p both of which consult
menu-updating-frame because they are designed to be used in menu
attributes (as in :enable, :active, ...).

This misuse implies undesirable behavior when menu-updating-frame
happens to have a non-nil value when the command gets run (e.g. bug#8184
where the "fix" just made the command do nothing instead of making it do
what it should do).

So this whole problem is due to a mistake in the original code which
used menu-bar-non-minibuffer-window-p instead of window-minibuffer-p,
without realizing the difference.

It's a plain bug.  Minor, but a bug nonetheless.


        Stefan




reply via email to

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