[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tell xref-collect-references to use the right root directory
From: |
Stephen Leake |
Subject: |
tell xref-collect-references to use the right root directory |
Date: |
Thu, 21 Jan 2016 13:03:21 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) |
Any objections to this patch?
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -861,7 +861,13 @@ xref-collect-references
(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)))
--
-- Stephe
- tell xref-collect-references to use the right root directory,
Stephen Leake <=