diff options
| author | Eli Zaretskii | 2000-09-02 11:19:55 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2000-09-02 11:19:55 +0000 |
| commit | 5983611033e97a719d8150b6ea3fd1b97cf05e2a (patch) | |
| tree | 53b2b5f25bf5239fe8dcc30ef242018ff7edc6e7 | |
| parent | 5514ba5c2a30f91458afa711499be96e970db7bd (diff) | |
| download | emacs-5983611033e97a719d8150b6ea3fd1b97cf05e2a.tar.gz emacs-5983611033e97a719d8150b6ea3fd1b97cf05e2a.zip | |
(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 bfe171fe673..3f2f863dbb9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2000-09-02 Eli Zaretskii <eliz@is.elta.co.il> | 1 | 2000-09-02 Eli Zaretskii <eliz@is.elta.co.il> |
| 2 | 2 | ||
| 3 | * mouse.el (mouse-popup-menubar): Supply the prompt string for | ||
| 4 | minor-mode keymaps, if they don't have one. | ||
| 5 | |||
| 6 | 2000-09-02 Eli Zaretskii <eliz@is.elta.co.il> | ||
| 7 | |||
| 3 | * eshell/esh-module.el (eval-when-compile): Don't lose if | 8 | * eshell/esh-module.el (eval-when-compile): Don't lose if |
| 4 | esh-module.el's file name is truncated to DOS 8+3 limits. | 9 | esh-module.el's file name is truncated to DOS 8+3 limits. |
| 5 | 10 | ||
diff --git a/lisp/mouse.el b/lisp/mouse.el index 8cc878d2f90..502f8e02c60 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -170,13 +170,31 @@ not it is actually displayed." | |||
| 170 | (let* ((local-menu (and (current-local-map) | 170 | (let* ((local-menu (and (current-local-map) |
| 171 | (lookup-key (current-local-map) [menu-bar]))) | 171 | (lookup-key (current-local-map) [menu-bar]))) |
| 172 | (global-menu (lookup-key global-map [menu-bar])) | 172 | (global-menu (lookup-key global-map [menu-bar])) |
| 173 | ;; If a keymap doesn't have a prompt string (a lazy | ||
| 174 | ;; programmer didn't bother to provide one), create it and | ||
| 175 | ;; insert it into the keymap; each keymap gets its own | ||
| 176 | ;; prompt. This is required for non-toolkit versions to | ||
| 177 | ;; display non-empty menu pane names. | ||
| 178 | (minor-mode-menus | ||
| 179 | (mapcar | ||
| 180 | (function | ||
| 181 | (lambda (menu) | ||
| 182 | (let* ((minor-mode (car menu)) | ||
| 183 | (menu (cdr menu)) | ||
| 184 | (title-or-map (cadr menu))) | ||
| 185 | (or (stringp title-or-map) | ||
| 186 | (setq menu | ||
| 187 | (cons 'keymap | ||
| 188 | (cons (concat | ||
| 189 | (capitalize (subst-char-in-string | ||
| 190 | ?- ?\ (symbol-name | ||
| 191 | minor-mode))) | ||
| 192 | " Menu") | ||
| 193 | (cdr menu))))) | ||
| 194 | menu))) | ||
| 195 | (minor-mode-key-binding [menu-bar]))) | ||
| 173 | (local-title-or-map (and local-menu (cadr local-menu))) | 196 | (local-title-or-map (and local-menu (cadr local-menu))) |
| 174 | (minor-mode-menus (mapcar #'cdr (minor-mode-key-binding [menu-bar]))) | ||
| 175 | (global-title-or-map (cadr global-menu))) | 197 | (global-title-or-map (cadr global-menu))) |
| 176 | ;; If the keymaps don't have prompt string (a lazy programmer | ||
| 177 | ;; didn't bother to provide one), create it and insert it into the | ||
| 178 | ;; keymaps; each keymap gets its own prompt. This is required for | ||
| 179 | ;; non-toolkit versions to display non-empty menu pane names. | ||
| 180 | (or (null local-menu) | 198 | (or (null local-menu) |
| 181 | (stringp local-title-or-map) | 199 | (stringp local-title-or-map) |
| 182 | (setq local-menu (cons 'keymap | 200 | (setq local-menu (cons 'keymap |