bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#26466: 26.0.50; Document that kill-this-buffer should be called from


From: Glenn Morris
Subject: bug#26466: 26.0.50; Document that kill-this-buffer should be called from the menu bar
Date: Wed, 12 Apr 2017 16:00:30 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Eli Zaretskii wrote:

>> From: Fox Kiester <noct@openmailbox.org>
>> Date: Wed, 12 Apr 2017 11:40:46 -0400
>> 
>> I learned today that kill-this-buffer is only meant to be called
>> from the menu bar. This is clear after navigating to its definition
>> in menu-bar.el, but it would be nice if this was also mentioned in
>> its docstring especially since the command is not prefixed with
>> "menu-bar-". This might help prevent some confusion.
>
> More accurately, this command might decide to silently do nothing if
> invoked not vie the menu bar.

Perhaps that aspect wasn't entirely intentional (yes I know it's bug#8184).
Compare the definition in Emacs 23.4:

(defun kill-this-buffer ()
  "Kill the current buffer.
When called in the minibuffer, get out of the minibuffer
using `abort-recursive-edit'."
  (interactive)
  (if (menu-bar-non-minibuffer-window-p)
      (kill-buffer (current-buffer))
    (abort-recursive-edit)))





reply via email to

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