diff options
| -rw-r--r-- | lisp/emacs-lisp/easymenu.el | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index 045a5590699..bf2e190e489 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el | |||
| @@ -616,20 +616,6 @@ In some cases we use that to select between the local and global maps." | |||
| 616 | (or (keymapp map) (error "Malformed menu in easy-menu: (%s)" map)) | 616 | (or (keymapp map) (error "Malformed menu in easy-menu: (%s)" map)) |
| 617 | map) | 617 | map) |
| 618 | 618 | ||
| 619 | (defun easy-menu-popup-menu (menu &optional event) | ||
| 620 | "Pop up a menu and run a command according to user's selection. | ||
| 621 | MENU is a menu description as in `easy-menu-define'. | ||
| 622 | EVENT is a mouse button event and determines where to pop up the menu. | ||
| 623 | If EVENT is nil, pop up menu at the current mouse position." | ||
| 624 | (let ((map (easy-menu-create-menu (car menu) (cdr menu)))) | ||
| 625 | (if (symbolp map) | ||
| 626 | (let ((f (memq :filter (get map 'menu-prop)))) | ||
| 627 | (setq map (symbol-function map)) | ||
| 628 | (if f (setq map (funcall (cadr f) map))))) | ||
| 629 | (let* ((sel (x-popup-menu (or event t) map)) | ||
| 630 | (f (if (consp sel) (lookup-key map (apply 'vector sel))))) | ||
| 631 | (if (commandp f) (call-interactively f))))) | ||
| 632 | |||
| 633 | (provide 'easymenu) | 619 | (provide 'easymenu) |
| 634 | 620 | ||
| 635 | ;;; easymenu.el ends here | 621 | ;;; easymenu.el ends here |