From 1a8caf7ad763aa03f279ec54ceec4ff9cc1d7237 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 7 Jan 2017 09:26:08 -0500 Subject: [PATCH v1] 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'. --- lisp/emacs-lisp/easymenu.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index 603bbcd..4fc9a78 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el @@ -489,7 +489,7 @@ easy-menu-change ;; XEmacs needs the following two functions to add and remove menus. ;; In Emacs this is done automatically when switching keymaps, so -;; here easy-menu-remove is a noop. +;; here easy-menu-remove and easy-menu-add are a noops. (defalias 'easy-menu-remove 'ignore "Remove MENU from the current menu bar. Contrary to XEmacs, this is a nop on Emacs since menus are automatically @@ -497,15 +497,16 @@ 'easy-menu-remove \(fn MENU)") -(defun easy-menu-add (_menu &optional _map) +(defalias 'easy-menu-add #'ignore "Add the menu to the menubar. -On Emacs, menus are already automatically activated when the -corresponding keymap is activated. On XEmacs this is needed to -actually add the menu to the current menubar. +On Emacs this is a nop, because menus are already automatically +activated when the corresponding keymap is activated. On XEmacs +this is needed to actually add the menu to the current menubar. You should call this once the menu and keybindings are set up -completely and menu filter functions can be expected to work." - ) +completely and menu filter functions can be expected to work. + +\(fn MENU &optional MAP)") (defun add-submenu (menu-path submenu &optional before in-menu) "Add submenu SUBMENU in the menu at MENU-PATH. -- 2.9.3