Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
fe6ca60c
Commit
fe6ca60c
authored
Nov 10, 2004
by
Stefan Monnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(easy-menu-add-item): Use keymap-prompt. Simplify.
parent
d0db6991
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
lisp/emacs-lisp/easymenu.el
lisp/emacs-lisp/easymenu.el
+3
-8
No files found.
lisp/emacs-lisp/easymenu.el
View file @
fe6ca60c
...
...
@@ -523,15 +523,10 @@ earlier by `easy-menu-define' or `easy-menu-create-menu'."
(
easy-menu-define-key
map
(
easy-menu-intern
(
car
item
))
(
cdr
item
)
before
)
(
if
(
or
(
keymapp
item
)
(
and
(
symbolp
item
)
(
keymapp
(
symbol-value
item
))))
(
and
(
symbolp
item
)
(
keymapp
(
symbol-value
item
))
(
setq
item
(
symbol-value
item
))))
;; Item is a keymap, find the prompt string and use as item name.
(
let
((
tail
(
easy-menu-get-map
item
nil
))
name
)
(
if
(
not
(
keymapp
item
))
(
setq
item
tail
))
(
while
(
and
(
null
name
)
(
consp
(
setq
tail
(
cdr
tail
)))
(
not
(
keymapp
tail
)))
(
if
(
stringp
(
car
tail
))
(
setq
name
(
car
tail
))
; Got a name.
(
setq
tail
(
cdr
tail
))))
(
setq
item
(
cons
name
item
))))
(
setq
item
(
cons
(
keymap-prompt
item
)
item
)))
(
easy-menu-do-add-item
map
item
before
)))
(
defun
easy-menu-item-present-p
(
map
path
name
)
...
...
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