From: Dmitry Gutov Date: Fri, 1 May 2015 22:03:56 +0000 (+0300) Subject: ; * xref.el (xref-collect-references): Simplify. X-Git-Tag: emacs-25.0.90~2229^2~5 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c50499edab4109addfd466a7a98344fd6d56e438;p=emacs.git ; * xref.el (xref-collect-references): Simplify. --- diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index ea705fc852b..099c08045b2 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -689,15 +689,12 @@ tools are used, and when." (semantic-symref-tool 'detect) (res (semantic-symref-find-references-by-name name 'subdirs)) (hits (and res (oref res :hit-lines))) - (orig-buffers (buffer-list)) - xrefs) + (orig-buffers (buffer-list))) (unwind-protect - (setq xrefs - (mapcar (lambda (hit) (xref--collect-reference hit name)) - hits)) + (delq nil + (mapcar (lambda (hit) (xref--collect-reference hit name)) hits)) (mapc #'kill-buffer - (cl-set-difference (buffer-list) orig-buffers))) - (delq nil xrefs))) + (cl-set-difference (buffer-list) orig-buffers))))) (defun xref--collect-reference (hit name) (pcase-let* ((`(,line . ,file) hit)