From 4c3b6f297307f2774ccc50898783cda491f783ee Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 19 Sep 2021 19:21:27 +0300 Subject: [PATCH] * lisp/progmodes/elisp-mode.el (elisp-context-menu): Improve menu items. --- lisp/progmodes/elisp-mode.el | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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) -- 2.39.5