Mercurial > hg > xemacs-beta
diff lisp/menubar.el @ 4310:a6d7e031a10b
Fix two Tailor glitches.
For some reason, Tailor didn't copy these changes from CVS to
Mercurial. Do so manually, really synching us with the latest from
CVS.
author | Mike Sperber <sperber@deinprogramm.de> |
---|---|
date | Thu, 06 Dec 2007 20:10:16 +0100 |
parents | 79c5457563f6 |
children | 308d34e9f07d |
line wrap: on
line diff
--- a/lisp/menubar.el Wed Dec 05 22:51:09 2007 +0000 +++ b/lisp/menubar.el Thu Dec 06 20:10:16 2007 +0100 @@ -210,7 +210,7 @@ (car item-path-list))))) (cons result parent))))) -(defun add-menu-item-1 (menu-path new-item before in-menu) +(defun add-menu-item-1 (leaf-p 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-item &optional before in-menu) +(defun add-menu-button (menu-path menu-leaf &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-ITEM is a menu or menu item. See the documentation of `current-menubar'. +MENU-LEAF is a menubar leaf node. 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 menu-path menu-item before in-menu)) + (add-menu-item-1 t menu-path menu-leaf before in-menu)) ;; I actually liked the old name better, but the interface has changed too ;; drastically to keep it. --Stig @@ -315,8 +315,7 @@ 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 menu-path submenu before in-menu)) - + (add-menu-item-1 nil 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, @@ -569,6 +568,7 @@ accelerator specs -- this works even if the specs have already been added." (menu-split-long-menu (menu-sort-menu menu))) +;;;###autoload (defun menu-split-long-menu (menu) "Split MENU according to `menu-max-items' and add accelerator specs. If MENU already has accelerator specs, they will be removed and new ones