summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2015-04-18 01:47:31 +0300
committerDmitry Gutov <dgutov@yandex.ru>2015-04-18 01:47:31 +0300
commit35be45bbc9ac525bb2bc3e20b0fa27c1ceee0c15 (patch)
tree48c4f35c47f32a37222302b6025d9bf54df4dd9e /lisp
parent4841a2d8aae1b7b2aa4bda6cf16c1be11d5b132a (diff)
downloademacs-35be45bbc9ac525bb2bc3e20b0fa27c1ceee0c15.tar.gz
emacs-35be45bbc9ac525bb2bc3e20b0fa27c1ceee0c15.tar.bz2
emacs-35be45bbc9ac525bb2bc3e20b0fa27c1ceee0c15.zip
(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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/elisp-mode.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 29f1c9aeb6b..ff427fd51da 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)))))