diff options
| author | Noam Postavsky | 2017-01-07 09:26:08 -0500 |
|---|---|---|
| committer | Noam Postavsky | 2017-01-12 10:18:56 -0500 |
| commit | b0ade0df21d4cde8537c29f81eb10bdcf1cdfbfc (patch) | |
| tree | 6558497c24c9faf7131ceae239d505185cf3478b | |
| parent | 3c69f2c5bb1ec7775b0ac1b18550affbc249586a (diff) | |
| download | emacs-b0ade0df21d4cde8537c29f81eb10bdcf1cdfbfc.tar.gz emacs-b0ade0df21d4cde8537c29f81eb10bdcf1cdfbfc.zip | |
Clarify that easy-menu-add is a nop (Bug#25382)
* lisp/emacs-lisp/easymenu.el (easy-menu-add): Make it into an alias of
`ignore', like `easy-menu-remove'.
| -rw-r--r-- | lisp/emacs-lisp/easymenu.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index 603bbcd9426..4fc9a783a5e 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el | |||
| @@ -489,7 +489,7 @@ To implement dynamic menus, either call this from | |||
| 489 | 489 | ||
| 490 | ;; XEmacs needs the following two functions to add and remove menus. | 490 | ;; XEmacs needs the following two functions to add and remove menus. |
| 491 | ;; In Emacs this is done automatically when switching keymaps, so | 491 | ;; In Emacs this is done automatically when switching keymaps, so |
| 492 | ;; here easy-menu-remove is a noop. | 492 | ;; here easy-menu-remove and easy-menu-add are a noops. |
| 493 | (defalias 'easy-menu-remove 'ignore | 493 | (defalias 'easy-menu-remove 'ignore |
| 494 | "Remove MENU from the current menu bar. | 494 | "Remove MENU from the current menu bar. |
| 495 | Contrary to XEmacs, this is a nop on Emacs since menus are automatically | 495 | Contrary to XEmacs, this is a nop on Emacs since menus are automatically |
| @@ -497,15 +497,16 @@ Contrary to XEmacs, this is a nop on Emacs since menus are automatically | |||
| 497 | 497 | ||
| 498 | \(fn MENU)") | 498 | \(fn MENU)") |
| 499 | 499 | ||
| 500 | (defun easy-menu-add (_menu &optional _map) | 500 | (defalias 'easy-menu-add #'ignore |
| 501 | "Add the menu to the menubar. | 501 | "Add the menu to the menubar. |
| 502 | On Emacs, menus are already automatically activated when the | 502 | On Emacs this is a nop, because menus are already automatically |
| 503 | corresponding keymap is activated. On XEmacs this is needed to | 503 | activated when the corresponding keymap is activated. On XEmacs |
| 504 | actually add the menu to the current menubar. | 504 | this is needed to actually add the menu to the current menubar. |
| 505 | 505 | ||
| 506 | You should call this once the menu and keybindings are set up | 506 | You should call this once the menu and keybindings are set up |
| 507 | completely and menu filter functions can be expected to work." | 507 | completely and menu filter functions can be expected to work. |
| 508 | ) | 508 | |
| 509 | \(fn MENU &optional MAP)") | ||
| 509 | 510 | ||
| 510 | (defun add-submenu (menu-path submenu &optional before in-menu) | 511 | (defun add-submenu (menu-path submenu &optional before in-menu) |
| 511 | "Add submenu SUBMENU in the menu at MENU-PATH. | 512 | "Add submenu SUBMENU in the menu at MENU-PATH. |