From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alexander Shukaev Newsgroups: gmane.emacs.bugs Subject: bug#25191: Redesign `recentf-menu-bar' logic and its callers Date: Tue, 13 Dec 2016 01:59:34 +0100 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1481590822 19540 195.159.176.226 (13 Dec 2016 01:00:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Dec 2016 01:00:22 +0000 (UTC) To: 25191@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 13 02:00:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1cGbS2-0003Ta-3v for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Dec 2016 02:00:14 +0100 Original-Received: from localhost ([::1]:34628 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGbS4-0005S4-Ql for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Dec 2016 20:00:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGbRv-0005Pj-C7 for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2016 20:00:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGbRq-0004Do-TR for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2016 20:00:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52647) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGbRq-0004Db-RO for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2016 20:00:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cGbRq-0000Gi-Hk for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2016 20:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alexander Shukaev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Dec 2016 01:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25191 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1481590791982 (code B ref -1); Tue, 13 Dec 2016 01:00:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Dec 2016 00:59:51 +0000 Original-Received: from localhost ([127.0.0.1]:39813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGbRe-0000Fm-WE for submit@debbugs.gnu.org; Mon, 12 Dec 2016 19:59:51 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGbRd-0000FZ-Hr for submit@debbugs.gnu.org; Mon, 12 Dec 2016 19:59:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGbRX-000496-8a for submit@debbugs.gnu.org; Mon, 12 Dec 2016 19:59:44 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:39393) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cGbRX-000492-5Z for submit@debbugs.gnu.org; Mon, 12 Dec 2016 19:59:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGbRV-0005MV-UD for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2016 19:59:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGbRS-00048J-QG for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2016 19:59:42 -0500 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:50595) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cGbRS-00048B-Je for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2016 19:59:38 -0500 Original-Received: from mfilter48-d.gandi.net (mfilter48-d.gandi.net [217.70.178.179]) by relay8-d.mail.gandi.net (Postfix) with ESMTP id 2EB7040496 for ; Tue, 13 Dec 2016 01:59:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter48-d.gandi.net Original-Received: from relay8-d.mail.gandi.net ([IPv6:::ffff:217.70.183.201]) by mfilter48-d.gandi.net (mfilter48-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id KIT6F-s8hcfu for ; Tue, 13 Dec 2016 01:59:34 +0100 (CET) X-Originating-IP: 88.68.181.111 Original-Received: from [192.168.3.110] (dslb-088-068-181-111.088.068.pools.vodafone-ip.de [88.68.181.111]) (Authenticated sender: forum@alexander.shukaev.name) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id A58A040493 for ; Tue, 13 Dec 2016 01:59:34 +0100 (CET) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:126948 Archived-At: Hi, consider (defsubst recentf-menu-bar () "Return the keymap of the global menu bar." (lookup-key global-map [menu-bar])) (defun recentf-show-menu () "Show the menu of recently opened files." (easy-menu-add-item (recentf-menu-bar) recentf-menu-path (list recentf-menu-title :filter 'recentf-make-menu-items) recentf-menu-before)) (defun recentf-hide-menu () "Hide the menu of recently opened files." (easy-menu-remove-item (recentf-menu-bar) recentf-menu-path recentf-menu-title)) from 'recentf.el'. This code is ill-formed. When `global-map' is customized in such a way that it does not have `(kbd "")' (or `[menu-bar]'), then both `recentf-show-menu' and `recentf-hide-menu' will fail. Furthermore, according to Emacs documentation, using `(current-global-map)' is more correct than `global-map'. Looking forward to fix. Regards, Alexander