[Top][All Lists]

[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: Juri Linkov
Subject: Re: [Emacs-diffs] emacs-25 bc55a57: * lisp/menu-bar.el (kill-this-buffer): Doc fix. (Bug#26466)
Date: Fri, 14 Apr 2017 02:30:57 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (x86_64-pc-linux-gnu)

>>> - Why did we decide to use menu-bar-non-minibuffer-window-p rather than
>>> checking something like (window-minibuffer-p (frame-selected-window))?
>> ‘menu-bar-non-minibuffer-window-p’ already does this, and additionally
>> takes into account ‘menu-updating-frame’ and checks for ‘frame-live-p’.
> But that's exactly the question: why pay attention to
> menu-updating-frame and  frame-live-p?

menu-bar-non-minibuffer-window-p is used to check whether a menu item
should be enabled, so indeed this is not needed in kill-this-buffer
that should work with just (window-minibuffer-p (frame-selected-window)).

But I still believe that exiting the active minibuffer by kill-this-buffer
makes sense only in the context of menu-bar/tool-bar where the same icon
can be shared to do two different things: either exit the minibuffer
or kill the current buffer.  I can't imagine why anyone would want to do
this with kill-current-buffer bound to the same key when there is already
the special key C-g and also keyboard-escape-quit to exit the minibuffer.

reply via email to

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