]> git.eshelyaron.com Git - emacs.git/commitdiff
(mouse-popup-menubar): Supply the prompt string for
authorEli Zaretskii <eliz@gnu.org>
Sat, 2 Sep 2000 11:19:55 +0000 (11:19 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 2 Sep 2000 11:19:55 +0000 (11:19 +0000)
minor-mode keymaps, if they don't have one.

lisp/ChangeLog
lisp/mouse.el

index bfe171fe673fbd43d58aacf21e6c10b381e9b530..3f2f863dbb9bd08978b28a119b2ca2ba85265277 100644 (file)
@@ -1,3 +1,8 @@
+2000-09-02  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       * mouse.el (mouse-popup-menubar): Supply the prompt string for
+       minor-mode keymaps, if they don't have one.
+
 2000-09-02  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * eshell/esh-module.el (eval-when-compile): Don't lose if
index 8cc878d2f90ed9c952a1da707bec3e14dc27d8f0..502f8e02c6075d72cdf00bc6749d9cf3ab58370e 100644 (file)
@@ -170,13 +170,31 @@ not it is actually displayed."
   (let* ((local-menu (and (current-local-map)
                          (lookup-key (current-local-map) [menu-bar])))
         (global-menu (lookup-key global-map [menu-bar]))
+        ;; If a keymap doesn't have a prompt string (a lazy
+        ;; programmer didn't bother to provide one), create it and
+        ;; insert it into the keymap; each keymap gets its own
+        ;; prompt.  This is required for non-toolkit versions to
+        ;; display non-empty menu pane names.
+        (minor-mode-menus
+         (mapcar
+          (function
+           (lambda (menu)
+             (let* ((minor-mode (car menu))
+                    (menu (cdr menu))
+                    (title-or-map (cadr menu)))
+               (or (stringp title-or-map)
+                   (setq menu
+                         (cons 'keymap
+                               (cons (concat
+                                      (capitalize (subst-char-in-string
+                                                   ?- ?\  (symbol-name
+                                                           minor-mode)))
+                                      " Menu")
+                                     (cdr menu)))))
+               menu)))
+          (minor-mode-key-binding [menu-bar])))
         (local-title-or-map (and local-menu (cadr local-menu)))
-        (minor-mode-menus (mapcar #'cdr (minor-mode-key-binding [menu-bar])))
         (global-title-or-map (cadr global-menu)))
-    ;; If the keymaps don't have prompt string (a lazy programmer
-    ;; didn't bother to provide one), create it and insert it into the
-    ;; keymaps; each keymap gets its own prompt.  This is required for
-    ;; non-toolkit versions to display non-empty menu pane names.
     (or (null local-menu)
        (stringp local-title-or-map)
        (setq local-menu (cons 'keymap