From: Lars Ingebrigtsen Date: Mon, 1 Mar 2021 21:12:43 +0000 (+0100) Subject: Make easymenu downcase the menu symbol for greater backwards compat X-Git-Tag: emacs-28.0.90~3468 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e5392d38ac27c4cf1674997ab38a453877e65109;p=emacs.git Make easymenu downcase the menu symbol for greater backwards compat * lisp/cmuscheme.el (map): Revert previous fix. * lisp/woman.el (woman-dired-define-keys): Ditto. * lisp/emacs-lisp/easymenu.el (easy-menu-do-define): Downcase the menu name for greater backwards compatibility. --- diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el index f41f2bf7027..772891d5d31 100644 --- a/lisp/cmuscheme.el +++ b/lisp/cmuscheme.el @@ -132,7 +132,7 @@ (define-key scheme-mode-map "\C-c\C-l" 'scheme-load-file) (define-key scheme-mode-map "\C-c\C-k" 'scheme-compile-file) ;k for "kompile" -(let ((map (lookup-key scheme-mode-map [menu-bar Scheme]))) +(let ((map (lookup-key scheme-mode-map [menu-bar scheme]))) (define-key map [separator-eval] '("--")) (define-key map [compile-file] '("Compile Scheme File" . scheme-compile-file)) diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index faa69241f9f..d3c3d5e65f1 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el @@ -190,7 +190,11 @@ This is expected to be bound to a mouse event." (function-put symbol 'completion-predicate #'ignore)) (dolist (map (if (keymapp maps) (list maps) maps)) (define-key map - (vector 'menu-bar (easy-menu-intern (car menu))) + (vector 'menu-bar (if (symbolp (car menu)) + (car menu) + ;; If a string, then use the downcased + ;; version for greater backwards compatibiltiy. + (intern (downcase (car menu))))) (easy-menu-binding keymap (car menu)))))) (defun easy-menu-filter-return (menu &optional name) diff --git a/lisp/woman.el b/lisp/woman.el index 0a9f3665eb6..d4f7e8c0db7 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -1523,7 +1523,7 @@ Also make each path-info component into a list. (mapc 'woman-dired-define-key woman-dired-keys) (woman-dired-define-key-maybe "w") (woman-dired-define-key-maybe "W"))) - (define-key-after (lookup-key dired-mode-map [menu-bar Immediate]) + (define-key-after (lookup-key dired-mode-map [menu-bar immediate]) [woman] '("Read Man Page (WoMan)" . woman-dired-find-file) 'view)) (if (featurep 'dired)