unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25191: Redesign `recentf-menu-bar' logic and its callers
@ 2016-12-13  0:59 Alexander Shukaev
  2017-06-10 12:59 ` bug#27306: Regression: Emacs Lisp Indentation Alexander Shukaev
  2019-10-09  7:46 ` bug#25191: Redesign `recentf-menu-bar' logic and its callers Lars Ingebrigtsen
  0 siblings, 2 replies; 14+ messages in thread
From: Alexander Shukaev @ 2016-12-13  0:59 UTC (permalink / raw)
  To: 25191

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





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-10-09  7:46 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-13  0:59 bug#25191: Redesign `recentf-menu-bar' logic and its callers Alexander Shukaev
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

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).