all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: bug-gnu-emacs@gnu.org
Subject: bug#4471: menu-bar menu is undefined
Date: Fri, 18 Sep 2009 00:19:47 +0300	[thread overview]
Message-ID: <87bpl96zgs.fsf@mail.jurta.org> (raw)

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/






             reply	other threads:[~2009-09-17 21:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87pr8ccnkx.fsf@stupidchicken.com>
2009-09-17 21:19 ` Juri Linkov [this message]
2009-09-18  3:02   ` bug#4471: menu-bar menu is undefined Stefan Monnier
2009-10-25  0:50   ` bug#4471: marked as done (menu-bar menu is undefined) Emacs bug Tracking System

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

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

  git send-email \
    --in-reply-to=87bpl96zgs.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=4471@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.