emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4c3b6f2: * lisp/progmodes/elisp-mode.el (elisp-context-menu): Imp


From: Juri Linkov
Subject: master 4c3b6f2: * lisp/progmodes/elisp-mode.el (elisp-context-menu): Improve menu items.
Date: Sun, 19 Sep 2021 12:22:29 -0400 (EDT)

branch: master
commit 4c3b6f297307f2774ccc50898783cda491f783ee
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * 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 0431198..d082db5 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]