aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Leake2016-01-22 01:53:05 -0600
committerStephen Leake2016-01-22 01:57:18 -0600
commit44c7b49d9a8188e8befc85f7e95d074ad4605c6a (patch)
tree2580bf62ce1f1b4045a257eec73537bab30dbd47
parentfb7c5812fb5e082ac92fb2b50e51a252eea5ef90 (diff)
downloademacs-44c7b49d9a8188e8befc85f7e95d074ad4605c6a.tar.gz
emacs-44c7b49d9a8188e8befc85f7e95d074ad4605c6a.zip
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'.
-rw-r--r--lisp/progmodes/xref.el8
1 files changed, 7 insertions, 1 deletions
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."
861 (cl-assert (directory-name-p dir)) 861 (cl-assert (directory-name-p dir))
862 (require 'semantic/symref) 862 (require 'semantic/symref)
863 (defvar semantic-symref-tool) 863 (defvar semantic-symref-tool)
864 (let* ((default-directory dir) 864
865 ;; Some symref backends use `ede-project-root-directory' as the root
866 ;; directory for the search, rather than `default-directory'. Since
867 ;; the caller has specified `dir', we bind `ede-minor-mode' to nil
868 ;; to force the backend to use `default-directory'.
869 (let* ((ede-minor-mode nil)
870 (default-directory dir)
865 (semantic-symref-tool 'detect) 871 (semantic-symref-tool 'detect)
866 (res (semantic-symref-find-references-by-name symbol 'subdirs)) 872 (res (semantic-symref-find-references-by-name symbol 'subdirs))
867 (hits (and res (oref res hit-lines))) 873 (hits (and res (oref res hit-lines)))