Commit 17ab0d10 authored by Dmitry Gutov's avatar Dmitry Gutov

Rename project-library-roots to project-external-roots

* lisp/progmodes/project.el (project-library-roots): Rename to
(project-library-roots-function): Rename to
project-vc-external-roots-function.  Only use it in the VC
backend, for now.  Update project-external-roots accordingly.
(project-vc-library-roots): Remove.
Rename to project-or-external-find-regexp.

* lisp/progmodes/elisp-mode.el (elisp-library-roots):
Rename to elisp-load-path-roots.

* lisp/progmodes/etags.el (etags-library-roots): Remove.  Use
an anonymous function for the default value of
parent a36c8880
......@@ -228,7 +228,7 @@ Blank lines separate paragraphs. Semicolons start comments.
:group 'lisp
(defvar project-library-roots-function)
(defvar project-vc-external-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
......@@ -238,7 +238,7 @@ Blank lines separate paragraphs. Semicolons start comments.
(add-function :before-until (local 'eldoc-documentation-function)
(add-hook 'xref-backend-functions #'elisp--xref-backend nil t)
(setq-local project-library-roots-function #'elisp-library-roots)
(setq-local project-vc-external-roots-function #'elisp-load-path-roots)
(add-hook 'completion-at-point-functions
#'elisp-completion-at-point nil 'local))
......@@ -795,7 +795,7 @@ non-nil result supercedes the xrefs produced by
(declare-function project-library-roots "project")
(declare-function project-external-roots "project")
(cl-defmethod xref-backend-apropos ((_backend (eql elisp)) regexp)
(apply #'nconc
......@@ -832,7 +832,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-library-roots ()
(defun elisp-load-path-roots ()
(if (boundp 'package-user-dir)
(cons package-user-dir load-path)
......@@ -2154,9 +2154,6 @@ for \\[find-tag] (which see)."
(with-slots (tag-info) l
(nth 1 tag-info)))
(defun etags-library-roots ()
(mapcar #'file-name-directory tags-table-list))
(provide 'etags)
This diff is collapsed.
......@@ -246,7 +246,7 @@ find a search tool; by default, this uses \"find | grep\" in the
(let ((pr (project-current t)))
(project-roots pr)
(project-library-roots pr)))))
(project-external-roots pr)))))
(cl-defgeneric xref-backend-apropos (backend pattern)
"Find all symbols that match PATTERN.
......@@ -886,7 +886,7 @@ IGNORES is a list of glob patterns."
(cl-mapcan (lambda (hit) (xref--collect-matches hit regexp))
(nreverse hits))
;; TODO: Same as above.
(mapc #'kill-buffer
(cl-set-difference (buffer-list) orig-buffers)))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment