diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2015-04-18 02:35:59 +0300 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2015-04-18 02:35:59 +0300 |
commit | 3ec1047b57ccea0f62a2de8095d1bbc07bd43576 (patch) | |
tree | f7d3af037a433bcd7bbf065adf5af5ef9c0dfe00 | |
parent | 35be45bbc9ac525bb2bc3e20b0fa27c1ceee0c15 (diff) | |
download | emacs-3ec1047b57ccea0f62a2de8095d1bbc07bd43576.tar.gz |
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.
-rw-r--r-- | 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 ff427fd51da..ad35c48a101 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -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 |