diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2015-11-10 02:47:46 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2015-11-10 02:47:46 +0200 |
commit | 0be6fb8e17f708fe03430d0b1e701810ae51b5e3 (patch) | |
tree | 03abad9d6697b70fbc6f26e5504c7c20ae070f3d /lisp/progmodes/elisp-mode.el | |
parent | 3c3aad733522365a8fe729d7c92e64e98bc4ce92 (diff) | |
parent | 1c72afb7aa48c2ea06103113ef70ccea0c1c961d (diff) | |
download | emacs-0be6fb8e17f708fe03430d0b1e701810ae51b5e3.tar.gz |
Merge branch 'project-next'
Diffstat (limited to 'lisp/progmodes/elisp-mode.el')
-rw-r--r-- | lisp/progmodes/elisp-mode.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 8ea17b74ddb..a19542fb204 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -230,7 +230,7 @@ Blank lines separate paragraphs. Semicolons start comments. :group 'lisp (defvar xref-find-function) (defvar xref-identifier-completion-table-function) - (defvar project-search-path-function) + (defvar project-library-roots-function) (lisp-mode-variables nil nil 'elisp) (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers) (setq-local electric-pair-text-pairs @@ -242,7 +242,7 @@ Blank lines separate paragraphs. Semicolons start comments. (setq-local xref-find-function #'elisp-xref-find) (setq-local xref-identifier-completion-table-function #'elisp--xref-identifier-completion-table) - (setq-local project-search-path-function #'elisp-search-path) + (setq-local project-library-roots-function #'elisp-library-roots) (add-hook 'completion-at-point-functions #'elisp-completion-at-point nil 'local)) @@ -801,7 +801,7 @@ non-nil result supercedes the xrefs produced by xrefs)) -(declare-function project-search-path "project") +(declare-function project-library-roots "project") (declare-function project-current "project") (defun elisp--xref-find-references (symbol) @@ -809,7 +809,10 @@ non-nil result supercedes the xrefs produced by (cl-mapcan (lambda (dir) (xref-collect-references symbol dir)) - (project-search-path (project-current)))) + (let ((pr (project-current t))) + (append + (project-roots pr) + (project-library-roots pr))))) (defun elisp--xref-find-apropos (regexp) (apply #'nconc @@ -846,7 +849,7 @@ non-nil result supercedes the xrefs produced by (cl-defmethod xref-location-group ((l xref-elisp-location)) (xref-elisp-location-file l)) -(defun elisp-search-path () +(defun elisp-library-roots () (defvar package-user-dir) (cons package-user-dir load-path)) |