unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alexander Shukaev <emacs@Alexander.Shukaev.name>
To: 25191@debbugs.gnu.org
Subject: bug#25191: Redesign `recentf-menu-bar' logic and its callers
Date: Tue, 13 Dec 2016 01:59:34 +0100	[thread overview]
Message-ID: <f186d126-cb3a-3a28-e0fb-33385b8ffae6@Alexander.Shukaev.name> (raw)

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





             reply	other threads:[~2016-12-13  0:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-13  0:59 Alexander Shukaev [this message]
2017-06-10 12:59 ` bug#27306: Regression: Emacs Lisp Indentation Alexander Shukaev
2017-06-10 15:33   ` npostavs
2017-06-13 11:27     ` npostavs
2017-06-16  7:39       ` Alexander Shukaev
2017-06-10 19:00   ` bug#27315: Regression: `abbreviate-file-name' and `tramp-file-name-handler' Alexander Shukaev
2017-06-11  9:13     ` Michael Albinus
2017-06-11 11:30       ` Alexander Shukaev
2017-06-12 15:59         ` Michael Albinus
2017-06-13 21:55           ` Alexander Shukaev
2017-06-14 12:38             ` Michael Albinus
2017-06-16  7:33               ` Alexander Shukaev
2017-06-16  8:39                 ` Michael Albinus
2019-10-09  7:46 ` bug#25191: Redesign `recentf-menu-bar' logic and its callers Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f186d126-cb3a-3a28-e0fb-33385b8ffae6@Alexander.Shukaev.name \
    --to=emacs@alexander.shukaev.name \
    --cc=25191@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).