mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-28 08:11:05 -08:00
easy-menu-change patch
This commit is contained in:
parent
a1df562ea1
commit
39d410b58b
2 changed files with 12 additions and 2 deletions
|
|
@ -1,3 +1,9 @@
|
||||||
|
2006-12-26 Vinicius Jose Latorre <viniciusjl@ig.com.br>
|
||||||
|
|
||||||
|
* emacs-lisp/easymenu.el (easy-menu-change): New arg MAP to indicate
|
||||||
|
which keymap should be used to change menu. It does not affect any
|
||||||
|
existent code.
|
||||||
|
|
||||||
2006-12-26 Richard Stallman <rms@gnu.org>
|
2006-12-26 Richard Stallman <rms@gnu.org>
|
||||||
|
|
||||||
* textmodes/fill.el (fill-paragraph): Check for a minibuffer
|
* textmodes/fill.el (fill-paragraph): Check for a minibuffer
|
||||||
|
|
|
||||||
|
|
@ -443,20 +443,24 @@ When non-nil, NOEXP indicates that CALLBACK cannot be an expression
|
||||||
command))
|
command))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun easy-menu-change (path name items &optional before)
|
(defun easy-menu-change (path name items &optional before map)
|
||||||
"Change menu found at PATH as item NAME to contain ITEMS.
|
"Change menu found at PATH as item NAME to contain ITEMS.
|
||||||
PATH is a list of strings for locating the menu that
|
PATH is a list of strings for locating the menu that
|
||||||
should contain a submenu named NAME.
|
should contain a submenu named NAME.
|
||||||
ITEMS is a list of menu items, as in `easy-menu-define'.
|
ITEMS is a list of menu items, as in `easy-menu-define'.
|
||||||
These items entirely replace the previous items in that submenu.
|
These items entirely replace the previous items in that submenu.
|
||||||
|
|
||||||
|
If MAP is specified, it should normally be a keymap; nil stands for the local
|
||||||
|
menu-bar keymap. It can also be a symbol, which has earlier been used as the
|
||||||
|
first argument in a call to `easy-menu-define', or the value of such a symbol.
|
||||||
|
|
||||||
If the menu located by PATH has no submenu named NAME, add one.
|
If the menu located by PATH has no submenu named NAME, add one.
|
||||||
If the optional argument BEFORE is present, add it just before
|
If the optional argument BEFORE is present, add it just before
|
||||||
the submenu named BEFORE, otherwise add it at the end of the menu.
|
the submenu named BEFORE, otherwise add it at the end of the menu.
|
||||||
|
|
||||||
To implement dynamic menus, either call this from
|
To implement dynamic menus, either call this from
|
||||||
`menu-bar-update-hook' or use a menu filter."
|
`menu-bar-update-hook' or use a menu filter."
|
||||||
(easy-menu-add-item nil path (easy-menu-create-menu name items) before))
|
(easy-menu-add-item map path (easy-menu-create-menu name items) before))
|
||||||
|
|
||||||
;; XEmacs needs the following two functions to add and remove menus.
|
;; XEmacs needs the following two functions to add and remove menus.
|
||||||
;; In Emacs this is done automatically when switching keymaps, so
|
;; In Emacs this is done automatically when switching keymaps, so
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue