GNU bug report logs - #25191
`recentf-menu-bar' assumes [menu-bar] is bound in global-map

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Alexander Shukaev <emacs@HIDDEN>; dated Tue, 13 Dec 2016 01:00:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Changed bug title to '`recentf-menu-bar' assumes [menu-bar] is bound in global-map' from 'Redesign `recentf-menu-bar' logic and its callers' Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Dec 2016 00:59:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 12 19:59:51 2016
Received: from localhost ([127.0.0.1]:39813 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cGbRe-0000Fm-WE
	for submit <at> debbugs.gnu.org; Mon, 12 Dec 2016 19:59:51 -0500
Received: from eggs.gnu.org ([208.118.235.92]:50829)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <emacs@HIDDEN>) id 1cGbRd-0000FZ-Hr
 for submit <at> debbugs.gnu.org; Mon, 12 Dec 2016 19:59:49 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <emacs@HIDDEN>) id 1cGbRX-000496-8a
 for submit <at> debbugs.gnu.org; Mon, 12 Dec 2016 19:59:44 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
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 <emacs@HIDDEN>)
 id 1cGbRX-000492-5Z
 for submit <at> debbugs.gnu.org; Mon, 12 Dec 2016 19:59:43 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41793)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <emacs@HIDDEN>) id 1cGbRV-0005MV-UD
 for bug-gnu-emacs@HIDDEN; Mon, 12 Dec 2016 19:59:42 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <emacs@HIDDEN>) id 1cGbRS-00048J-QG
 for bug-gnu-emacs@HIDDEN; Mon, 12 Dec 2016 19:59:42 -0500
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 <emacs@HIDDEN>)
 id 1cGbRS-00048B-Je
 for bug-gnu-emacs@HIDDEN; Mon, 12 Dec 2016 19:59:38 -0500
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 <bug-gnu-emacs@HIDDEN>; Tue, 13 Dec 2016 01:59:36 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at mfilter48-d.gandi.net
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 <bug-gnu-emacs@HIDDEN>;
 Tue, 13 Dec 2016 01:59:34 +0100 (CET)
X-Originating-IP: 88.68.181.111
Received: from [192.168.3.110]
 (dslb-088-068-181-111.088.068.pools.vodafone-ip.de [88.68.181.111])
 (Authenticated sender: forum@HIDDEN)
 by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id A58A040493
 for <bug-gnu-emacs@HIDDEN>; Tue, 13 Dec 2016 01:59:34 +0100 (CET)
To: bug-gnu-emacs@HIDDEN
From: Alexander Shukaev <emacs@HIDDEN>
Subject: Redesign `recentf-menu-bar' logic and its callers
Message-ID: <f186d126-cb3a-3a28-e0fb-33385b8ffae6@HIDDEN>
Date: Tue, 13 Dec 2016 01:59:34 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
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-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

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 "<menu-bar>")' (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




Acknowledgement sent to Alexander Shukaev <emacs@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#25191; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 4 Dec 2017 06:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.