Cosmetic change. (The original code confused me when I was trying to
fix Dired's help menu.)
2007-09-05 Mike Sperber <mike(a)xemacs.org>
* menubar.el (add-menu-item-1): Remove bogus `leaf-p' argument.
(add-menu-button): Follow above change; also remove bogus
docstring talking about "leaf node".
(add-submenu): Follow above change.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
Index: lisp/menubar.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/menubar.el,v
retrieving revision 1.12
diff -u -r1.12 menubar.el
--- lisp/menubar.el 7 Feb 2005 19:30:08 -0000 1.12
+++ lisp/menubar.el 5 Sep 2007 06:49:07 -0000
@@ -210,7 +210,7 @@
(car item-path-list)))))
(cons result parent)))))
-(defun add-menu-item-1 (leaf-p menu-path new-item before in-menu)
+(defun add-menu-item-1 (menu-path new-item before in-menu)
;; This code looks like it could be cleaned up some more
;; Do we really need 6 calls to find-menu-item?
(let* ((item-name
@@ -283,20 +283,20 @@
(set-menubar-dirty-flag)
new-item))
-(defun add-menu-button (menu-path menu-leaf &optional before in-menu)
+(defun add-menu-button (menu-path menu-item &optional before in-menu)
"Add a menu item to some menu, creating the menu first if necessary.
If the named item exists already, it is changed.
MENU-PATH identifies the menu under which the new menu item should be inserted.
It is a list of strings; for example, (\"File\") names the top-level
\"File\"
menu. (\"File\" \"Foo\") names a hypothetical submenu of
\"File\".
-MENU-LEAF is a menubar leaf node. See the documentation of `current-menubar'.
+MENU-ITEM is a menu or menu item. See the documentation of `current-menubar'.
BEFORE, if provided, is the name of a menu item before which this item should
be added, if this item is not on the menu already. If the item is already
present, it will not be moved.
IN-MENU, if provided, means use that instead of `current-menubar' as the
menu to change."
;; Note easymenu.el uses the fact that menu-leaf can be a submenu.
- (add-menu-item-1 t menu-path menu-leaf before in-menu))
+ (add-menu-item-1 menu-path menu-item before in-menu))
;; I actually liked the old name better, but the interface has changed too
;; drastically to keep it. --Stig
@@ -315,7 +315,8 @@
IN-MENU, if provided, means use that instead of `current-menubar' as the
menu to change."
(check-menu-syntax submenu nil)
- (add-menu-item-1 nil menu-path submenu before in-menu))
+ (add-menu-item-1 menu-path submenu before in-menu))
+
;; purespace is no more, so this function is unnecessary
;(defun purecopy-menubar (x)
; ;; this calls purecopy on the strings, and the contents of the vectors,
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches