1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Move project--value-in-dir to a different section

* lisp/progmodes/project.el (project--value-in-dir):
Move closer to its uses.
This commit is contained in:
Dmitry Gutov 2020-07-27 03:04:09 +03:00
parent 7551aff22c
commit 33667e02e6

View file

@ -568,6 +568,13 @@ DIRS must contain directory names."
;; Sidestep the issue of expanded/abbreviated file names here.
(cl-set-difference files dirs :test #'file-in-directory-p))
(defun project--value-in-dir (var dir)
(with-temp-buffer
(setq default-directory dir)
(let ((enable-local-variables :all))
(hack-dir-local-variables-non-file-buffer))
(symbol-value var)))
;;; Project commands
@ -660,13 +667,6 @@ The following commands are available:
;;;###autoload (define-key tab-prefix-map "p" #'project-other-tab-command)
(defun project--value-in-dir (var dir)
(with-temp-buffer
(setq default-directory dir)
(let ((enable-local-variables :all))
(hack-dir-local-variables-non-file-buffer))
(symbol-value var)))
(declare-function grep-read-files "grep")
(declare-function xref--show-xrefs "xref")
(declare-function xref--find-ignores-arguments "xref")