: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
(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))
xrefs))
-(declare-function project-search-path "project")
+(declare-function project-library-roots "project")
(declare-function project-current "project")
(defun elisp--xref-find-references (symbol)
(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
(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))