emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tell xref-collect-references to use the right root directory


From: Dmitry Gutov
Subject: Re: tell xref-collect-references to use the right root directory
Date: Thu, 21 Jan 2016 22:38:31 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0

On 01/21/2016 10:03 PM, Stephen Leake wrote:
Any objections to this patch?

LGTM, thanks.

--- 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)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]