Don't show both feature and function with the same name

* lisp/progmodes/elisp-mode.el (elisp--xref-identifier-location):
Don't show both feature and function with the same name.
This commit is contained in:
Dmitry Gutov 2015-04-18 02:35:59 +03:00
parent 35be45bbc9
commit 3ec1047b57

View file

@ -606,9 +606,13 @@ It can be quoted, or be inside a quoted form."
(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)))))
(`feature (and (featurep sym)
;; Skip when a function with the same name
;; is defined, because it's probably in the
;; same file.
(not (fboundp sym))
(ignore-errors
(find-library-name (symbol-name sym)))))
(`defface (when (facep sym)
(symbol-file sym 'defface))))))
(when file