From: Juri Linkov Date: Sun, 19 Sep 2021 16:21:27 +0000 (+0300) Subject: * lisp/progmodes/elisp-mode.el (elisp-context-menu): Improve menu items. X-Git-Tag: emacs-28.0.90~829 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4c3b6f297307f2774ccc50898783cda491f783ee;p=emacs.git * lisp/progmodes/elisp-mode.el (elisp-context-menu): Improve menu items. --- diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 04311985c17..d082db5f02f 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -169,9 +169,19 @@ All commands in `lisp-mode-shared-map' are inherited by this map.") (symbol (when (stringp string) (intern string))) (title (cond ((not (symbolp symbol)) nil) - ((fboundp symbol) "Function") - ((and (boundp symbol) (not (keywordp symbol))) "Variable") - ((facep symbol) "Face")))) + ((and (facep symbol) (not (fboundp symbol))) + "Face") + ((and (fboundp symbol) (boundp symbol) + (memq symbol minor-mode-list)) + "Mode") + ((and (fboundp symbol) + (not (or (boundp symbol) (facep symbol)))) + "Function") + ((and (boundp symbol) + (not (or (fboundp symbol) (facep symbol)))) + "Variable") + ((or (fboundp symbol) (boundp symbol) (facep symbol)) + "Symbol")))) (when title (define-key-after menu [describe-symbol] `(menu-item (format "Describe %s" ,title)