Permalink
Browse files

aquamacs-make-mouse-buffer-menu: use `format-mode-line' for `mode-name'

  • Loading branch information...
1 parent e3946ef commit 52ba496f9f405af194145edc2e2b72da3be99cf6 @rpgoldman rpgoldman committed with Apr 2, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 aquamacs/src/site-lisp/macosx/osxkeys.el
@@ -31,7 +31,7 @@
;; Boston, MA 02111-1307, USA.
-;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 David Reitter
+;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 David Reitter
;; Unit test / check requirements
@@ -575,15 +575,15 @@ and selects that window."
(let* ((adjusted-major-mode major-mode) elt)
(let ((tail mouse-buffer-menu-mode-groups))
(while tail
- (if (string-match (car (car tail)) mode-name)
+ (if (string-match (car (car tail)) (format-mode-line mode-name))
(setq adjusted-major-mode (cdr (car tail))))
(setq tail (cdr tail))))
(setq elt (assoc adjusted-major-mode split-by-major-mode))
(if (null elt)
(setq elt (list adjusted-major-mode
(if (stringp adjusted-major-mode)
adjusted-major-mode
- mode-name))
+ (format-mode-line mode-name)))
split-by-major-mode (cons elt split-by-major-mode)))
(or (memq (car tail) (cdr (cdr elt)))
(setcdr (cdr elt) (cons (car tail) (cdr (cdr elt)))))))
@@ -678,7 +678,7 @@ Defaults to nil if the major mode doesn't define a menu."
;; Make a keymap in which our last command leads to a menu or
;; default to the edit menu.
(newmap (if ancestor
- (make-sparse-keymap (concat mode-name " Mode"))
+ (make-sparse-keymap (concat (format-mode-line mode-name) " Mode"))
nil)))
(if ancestor
;; Make our menu inherit from the desired keymap which we want

0 comments on commit 52ba496

Please sign in to comment.