(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.
This commit is contained in:
Dmitry Gutov 2015-04-18 01:47:31 +03:00
parent 4841a2d8aa
commit 35be45bbc9

View file

@ -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)))))