emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 35be45b: (elisp--xref-identifier-location): Skip va


From: Dmitry Gutov
Subject: [Emacs-diffs] master 35be45b: (elisp--xref-identifier-location): Skip variable, if it's also a functiong
Date: Fri, 17 Apr 2015 22:47:50 +0000

branch: master
commit 35be45bbc9ac525bb2bc3e20b0fa27c1ceee0c15
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    (elisp--xref-identifier-location): Skip variable, if it's also a functiong
    
    * lisp/progmodes/elisp-mode.el (elisp--xref-identifier-location):
    Avoid returning both the variable and the function for the same
    minor mode.
---
 lisp/progmodes/elisp-mode.el |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 29f1c9a..ff427fd 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -599,9 +599,13 @@ It can be quoted, or be inside a quoted form."
                             (find-function-library sym)))
                        (setq sym (car fun-lib))
                        (cdr fun-lib))))
-           (`defvar (when (boundp sym)
-                      (or (symbol-file sym 'defvar)
-                          (help-C-file-name sym 'var))))
+           (`defvar (and (boundp sym)
+                         ;; Don't show minor modes twice.
+                         ;; TODO: If TYPE ever becomes dependent on the
+                         ;; context, move this check outside.
+                         (not (fboundp sym))
+                         (or (symbol-file sym 'defvar)
+                             (help-C-file-name sym 'var))))
            (`feature (when (featurep sym)
                        (ignore-errors
                          (find-library-name (symbol-name sym)))))



reply via email to

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