From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel 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 Organization: LINKOV.NET Message-ID: <87wpan9972.fsf@localhost> References: <20170412194437.19648.75020@vcs0.savannah.gnu.org> <20170412194438.934FD22EE8@vcs0.savannah.gnu.org> <87shldl1v8.fsf@localhost> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1492126697 21658 195.159.176.226 (13 Apr 2017 23:38:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Apr 2017 23:38:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 14 01:38:13 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cyoJV-0005XF-6h for ged-emacs-devel@m.gmane.org; Fri, 14 Apr 2017 01:38:09 +0200 Original-Received: from localhost ([::1]:51271 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyoJb-0006tz-3K for ged-emacs-devel@m.gmane.org; Thu, 13 Apr 2017 19:38:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyoJS-0006tm-Db for emacs-devel@gnu.org; Thu, 13 Apr 2017 19:38:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyoJR-0000qz-IW for emacs-devel@gnu.org; Thu, 13 Apr 2017 19:38:06 -0400 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:36068 helo=homiemail-a19.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cyoJR-0000nO-C2 for emacs-devel@gnu.org; Thu, 13 Apr 2017 19:38:05 -0400 Original-Received: from homiemail-a19.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a19.g.dreamhost.com (Postfix) with ESMTP id D148D60407C; Thu, 13 Apr 2017 16:37:57 -0700 (PDT) Original-Received: from localhost.linkov.net (m90-133-225-157.cust.tele2.ee [90.133.225.157]) (Authenticated sender: jurta@jurta.org) by homiemail-a19.g.dreamhost.com (Postfix) with ESMTPA id 0A568604076; Thu, 13 Apr 2017 16:37:56 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Thu, 13 Apr 2017 14:37:03 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 69.163.253.7 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:213952 Archived-At: >>> - Why did we decide to use menu-bar-non-minibuffer-window-p rather th= an >>> checking something like (window-minibuffer-p (frame-selected-window))= ? >> =E2=80=98menu-bar-non-minibuffer-window-p=E2=80=99 already does this, = and additionally >> takes into account =E2=80=98menu-updating-frame=E2=80=99 and checks fo= r =E2=80=98frame-live-p=E2=80=99. > > 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-buffe= r 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.