emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: minibuffer and current-local-map


From: Glenn Morris
Subject: Re: minibuffer and current-local-map
Date: Sun, 06 Jan 2008 14:36:32 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

I no longer have the original message to reply to. I'm replying to:

http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg00602.html

  From:   Richard Stallman
  Subject:        Re: minibuffer and current-local-map
  Date:           Fri, 09 Nov 2007 17:00:03 -0500

The issue is:

emacs -Q
M-x
C-mouse-3 in the minibuffer brings up a menu with two "Minibuff" entries.

rms said:

  The solution, I think, is to fix the menu code to avoid showing
  duplicates in such a case.


Here is a simple patch that just takes the first of any duplicate
(same name) menus.


*** mouse.el.~1.315.2.4.~       2007-12-06 20:27:17.000000000 -0800
--- mouse.el    2008-01-06 11:11:51.000000000 -0800
***************
*** 173,183 ****
         ;; default to the edit menu.
         (newmap (if ancestor
                     (make-sparse-keymap (concat mode-name " Mode"))
!                  menu-bar-edit-menu)))
      (if ancestor
        ;; Make our menu inherit from the desired keymap which we want
        ;; to display as the menu now.
!       (set-keymap-parent newmap ancestor))
      (popup-menu newmap event prefix)))
  
  
--- 173,190 ----
         ;; default to the edit menu.
         (newmap (if ancestor
                     (make-sparse-keymap (concat mode-name " Mode"))
!                  menu-bar-edit-menu))
!          uniq)
      (if ancestor
        ;; Make our menu inherit from the desired keymap which we want
        ;; to display as the menu now.
!       (set-keymap-parent newmap
!                            (progn
!                              (dolist (e ancestor)
!                                (unless (and (listp e)
!                                             (assoc (car e) uniq))
!                                  (setq uniq (append uniq (list e)))))
!                              uniq)))
      (popup-menu newmap event prefix)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]