From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel 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 Message-ID: References: <20170412194437.19648.75020@vcs0.savannah.gnu.org> <20170412194438.934FD22EE8@vcs0.savannah.gnu.org> <87shldl1v8.fsf@localhost> <83h91sizcn.fsf@gnu.org> <87vaq79903.fsf@localhost> <83r30vh2k3.fsf@gnu.org> <83bmrwfg43.fsf@gnu.org> <8360i4f756.fsf@gnu.org> <8337d7fv9k.fsf@gnu.org> <83fuh7drut.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1492445148 1385 195.159.176.226 (17 Apr 2017 16:05:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Apr 2017 16:05:48 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 17 18:05:45 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 1d099s-0000Hl-CQ for ged-emacs-devel@m.gmane.org; Mon, 17 Apr 2017 18:05:44 +0200 Original-Received: from localhost ([::1]:37536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d099y-00083Z-BJ for ged-emacs-devel@m.gmane.org; Mon, 17 Apr 2017 12:05:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d099Q-00083H-Tn for emacs-devel@gnu.org; Mon, 17 Apr 2017 12:05:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d099L-0002rZ-9O for emacs-devel@gnu.org; Mon, 17 Apr 2017 12:05:16 -0400 Original-Received: from [195.159.176.226] (port=59303 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d099L-0002qZ-2v for emacs-devel@gnu.org; Mon, 17 Apr 2017 12:05:11 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1d099D-0007xe-IQ for emacs-devel@gnu.org; Mon, 17 Apr 2017 18:05:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:1rhgEbaEuH6wsFLTZDCm6buJ2R8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:214069 Archived-At: > 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