diff options
author | Eli Zaretskii <[email protected]> | 2000-09-02 11:19:55 +0000 |
---|---|---|
committer | Eli Zaretskii <[email protected]> | 2000-09-02 11:19:55 +0000 |
commit | 5983611033e97a719d8150b6ea3fd1b97cf05e2a (patch) | |
tree | 53b2b5f25bf5239fe8dcc30ef242018ff7edc6e7 | |
parent | 5514ba5c2a30f91458afa711499be96e970db7bd (diff) |
(mouse-popup-menubar): Supply the prompt string for
minor-mode keymaps, if they don't have one.
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/mouse.el | 28 |
2 files changed, 28 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bfe171fe67..3f2f863dbb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2000-09-02 Eli Zaretskii <[email protected]> + * mouse.el (mouse-popup-menubar): Supply the prompt string for + minor-mode keymaps, if they don't have one. + +2000-09-02 Eli Zaretskii <[email protected]> + * eshell/esh-module.el (eval-when-compile): Don't lose if esh-module.el's file name is truncated to DOS 8+3 limits. diff --git a/lisp/mouse.el b/lisp/mouse.el index 8cc878d2f9..502f8e02c6 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -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 |