diff options
| author | Stephen Leake | 2016-01-22 01:53:05 -0600 |
|---|---|---|
| committer | Stephen Leake | 2016-01-22 01:57:18 -0600 |
| commit | 44c7b49d9a8188e8befc85f7e95d074ad4605c6a (patch) | |
| tree | 2580bf62ce1f1b4045a257eec73537bab30dbd47 | |
| parent | fb7c5812fb5e082ac92fb2b50e51a252eea5ef90 (diff) | |
| download | emacs-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.el | 8 |
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))) |