GNU bug report logs -
#4471
menu-bar menu is undefined
Previous Next
Reported by: Juri Linkov <juri <at> jurta.org>
Date: Thu, 17 Sep 2009 21:30:06 UTC
Severity: normal
Tags: patch
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Some menu-bar's menus fail to open in non-toolkit X builds.
For instance, when I click on the "Buffer-Menu" menu-bar's item,
it signals the error:
<menu-bar> <Buffer-menu-mode> <nil> is undefined
However, with the following patch it displays the menu correctly:
Index: lisp/buff-menu.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/buff-menu.el,v
retrieving revision 1.125
diff -u -r1.125 buff-menu.el
--- lisp/buff-menu.el 15 Jan 2009 16:46:09 -0000 1.125
+++ lisp/buff-menu.el 17 Sep 2009 21:15:37 -0000
@@ -119,7 +119,7 @@
(defvar Buffer-menu-mode-map
(let ((map (make-keymap))
- (menu-map (make-sparse-keymap)))
+ (menu-map (make-sparse-keymap "Buffer-Menu")))
(suppress-keymap map t)
(define-key map "v" 'Buffer-menu-select)
(define-key map "2" 'Buffer-menu-2-window)
If this is the right way to define menus, I could do the same for other
menus as well, e.g.
Index: lisp/add-log.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/add-log.el,v
retrieving revision 1.230
diff -u -r1.230 add-log.el
--- lisp/add-log.el 1 Sep 2009 07:24:18 -0000 1.230
+++ lisp/add-log.el 17 Sep 2009 21:16:23 -0000
@@ -551,7 +551,7 @@
(defvar change-log-mode-map
(let ((map (make-sparse-keymap))
- (menu-map (make-sparse-keymap)))
+ (menu-map (make-sparse-keymap "ChangeLog")))
(define-key map [?\C-c ?\C-p] 'add-log-edit-prev-comment)
(define-key map [?\C-c ?\C-n] 'add-log-edit-next-comment)
(define-key map [?\C-c ?\C-f] 'change-log-find-file)
and some other menus that have no menu names.
--
Juri Linkov
http://www.jurta.org/emacs/
This bug report was last modified 15 years and 201 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.