From: Glenn Morris Date: Fri, 24 Apr 2015 18:46:42 +0000 (-0400) Subject: * lisp/mouse.el (minor-mode-menu-from-indicator): X-Git-Tag: emacs-25.0.90~2314 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5bc9f498de5cc11091588d14e1e27bebb1a08849;p=emacs.git * lisp/mouse.el (minor-mode-menu-from-indicator): Handle non-function members of minor-mode-map-alist. (Bug#20201) --- diff --git a/lisp/mouse.el b/lisp/mouse.el index 5f3fa5d7694..7854d32eb20 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -152,13 +152,16 @@ items `Turn Off' and `Help'." (setq menu (if menu (mouse-menu-non-singleton menu) - `(keymap - ,indicator - (turn-off menu-item "Turn Off minor mode" ,mm-fun) - (help menu-item "Help for minor mode" - (lambda () (interactive) - (describe-function ',mm-fun)))))) - (popup-menu menu)))) + (if (fboundp mm-fun) ; bug#20201 + `(keymap + ,indicator + (turn-off menu-item "Turn Off minor mode" ,mm-fun) + (help menu-item "Help for minor mode" + (lambda () (interactive) + (describe-function ',mm-fun))))))) + (if menu + (popup-menu menu) + (message "No menu available"))))) (defun mouse-minor-mode-menu (event) "Show minor-mode menu for EVENT on minor modes area of the mode line."