* lisp/menu-bar.el (menu-bar-keymap): Don't use `lookup-key'
on the `keymap' arg.
* lisp/mouse.el (context-menu-global): Use `lookup-key global-map'
for the `keymap' arg of `menu-bar-keymap'.
(context-menu-local): Use `menu-bar-keymap' to sort `keymap'.
;; sorting.
(push (cons pos menu-item) menu-end)
(push menu-item menu-bar))))
- (lookup-key (or keymap (menu-bar-current-active-maps)) [menu-bar]))
+ (or keymap (lookup-key (menu-bar-current-active-maps) [menu-bar])))
`(keymap ,@(nreverse menu-bar)
,@(mapcar #'cdr (sort menu-end
(lambda (a b)
(when (consp binding)
(define-key-after menu (vector key)
(copy-sequence binding))))
- (menu-bar-keymap global-map))
+ (menu-bar-keymap (lookup-key global-map [menu-bar])))
menu)
(defun context-menu-local (menu _click)
(when (consp binding)
(define-key-after menu (vector key)
(copy-sequence binding))))
- keymap)))
+ (menu-bar-keymap keymap))))
menu)
(defun context-menu-minor (menu _click)