From: Stephen Leake Date: Fri, 22 Jan 2016 07:53:05 +0000 (-0600) Subject: In xref-collect-references, force backends to respect the 'dir' arg X-Git-Tag: emacs-25.0.90~95 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=44c7b49d9a8188e8befc85f7e95d074ad4605c6a;p=emacs.git In xref-collect-references, force backends to respect the 'dir' arg * lisp/progmodes/xref.el (xref-collect-references): Force symref backends to use `default-directory'. --- diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 2bccd857576..d32da371771 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -861,7 +861,13 @@ tools are used, and when." (cl-assert (directory-name-p dir)) (require 'semantic/symref) (defvar semantic-symref-tool) - (let* ((default-directory dir) + + ;; Some symref backends use `ede-project-root-directory' as the root + ;; directory for the search, rather than `default-directory'. Since + ;; the caller has specified `dir', we bind `ede-minor-mode' to nil + ;; to force the backend to use `default-directory'. + (let* ((ede-minor-mode nil) + (default-directory dir) (semantic-symref-tool 'detect) (res (semantic-symref-find-references-by-name symbol 'subdirs)) (hits (and res (oref res hit-lines)))