diff options
author | Stefan Kangas <stefan@marxist.se> | 2021-12-25 06:32:13 +0100 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2021-12-25 06:32:13 +0100 |
commit | a1b72008a7228a65af819118d6de620b89d0e0d4 (patch) | |
tree | bec6626189d4fe864f5808b147626c208ef95dc7 /lisp/progmodes/etags.el | |
parent | 1faa1726f093886446879180997d8bd7426b30eb (diff) | |
parent | c09ad0cabde922374c1a34350595a3141ab7f806 (diff) | |
download | emacs-a1b72008a7228a65af819118d6de620b89d0e0d4.tar.gz |
Merge from origin/emacs-28
c09ad0cabd Fix the bug with duplicate entries in xref output
Diffstat (limited to 'lisp/progmodes/etags.el')
-rw-r--r-- | lisp/progmodes/etags.el | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index d7dbaa06505..348160ef50d 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -2088,14 +2088,15 @@ file name, add `tag-partial-file-name-match-p' to the list value.") (definitions (etags--xref-find-definitions symbol)) same-file-definitions) (when (and etags-xref-prefer-current-file file) - (cl-delete-if - (lambda (definition) - (when (equal file - (xref-location-group - (xref-item-location definition))) - (push definition same-file-definitions) - t)) - definitions) + (setq definitions + (cl-delete-if + (lambda (definition) + (when (equal file + (xref-location-group + (xref-item-location definition))) + (push definition same-file-definitions) + t)) + definitions)) (setq definitions (nconc (nreverse same-file-definitions) definitions))) definitions)) |