all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* tell xref-collect-references to use the right root directory
@ 2016-01-21 19:03 Stephen Leake
  2016-01-21 19:38 ` Dmitry Gutov
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Leake @ 2016-01-21 19:03 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: tell xref-collect-references to use the right root directory
  2016-01-21 19:03 tell xref-collect-references to use the right root directory Stephen Leake
@ 2016-01-21 19:38 ` Dmitry Gutov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Gutov @ 2016-01-21 19:38 UTC (permalink / raw)
  To: Stephen Leake, emacs-devel

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-21 19:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-21 19:03 tell xref-collect-references to use the right root directory Stephen Leake
2016-01-21 19:38 ` Dmitry Gutov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.