Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
88153c47
Commit
88153c47
authored
Jun 29, 1994
by
Richard M. Stallman
Browse files
(easy-menu-change): New function.
parent
cbb35d7d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
lisp/emacs-lisp/easymenu.el
lisp/emacs-lisp/easymenu.el
+14
-0
No files found.
lisp/emacs-lisp/easymenu.el
View file @
88153c47
...
...
@@ -104,6 +104,20 @@ is a list of menu items, as above."
(
setq
menu-items
(
cdr
menu-items
)))
menu
))
(
defun
easy-menu-change
(
path
name
items
)
"Change menu found at PATH as item NAME to contain ITEMS.
PATH is a list of strings for locating the menu containing NAME in the
menu bar. ITEMS is a list of menu items, as in `easy-menu-define'.
These items entirely replace the previous items in that map.
Call this from `activate-menubar-hook' to implement dynamic menus."
(
let
((
map
(
key-binding
(
apply
'vector
'menu-bar
(
mapcar
'intern
(
append
path
(
list
name
)))))))
(
if
(
keymapp
map
)
(
setcdr
map
(
cdr
(
easy-menu-create-keymaps
name
items
)))
(
error
"Malformed menu in `easy-menu-change'"
))))
(
defmacro
easy-menu-remove
(
menu
))
(
defmacro
easy-menu-add
(
menu
&optional
map
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment