mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-26 07:33:47 +00:00
Fix two project-find-file issues
* lisp/progmodes/project.el (project--value-in-dir): Temporarily set enable-local-variables to :all. (project-find-file, project-or-external-find-file): All autoloads. (project--find-file-in): Require xref.
This commit is contained in:
parent
30abf295e8
commit
a034dd384c
@ -258,7 +258,8 @@ DIRS must contain directory names."
|
||||
(defun project--value-in-dir (var dir)
|
||||
(with-temp-buffer
|
||||
(setq default-directory dir)
|
||||
(hack-dir-local-variables-non-file-buffer)
|
||||
(let ((enable-local-variables :all))
|
||||
(hack-dir-local-variables-non-file-buffer))
|
||||
(symbol-value var)))
|
||||
|
||||
(declare-function grep-read-files "grep")
|
||||
@ -310,12 +311,14 @@ pattern to search for."
|
||||
(user-error "No matches for: %s" regexp))
|
||||
(xref--show-xrefs xrefs nil)))
|
||||
|
||||
;;;###autoload
|
||||
(defun project-find-file ()
|
||||
(interactive)
|
||||
(let* ((pr (project-current t))
|
||||
(dirs (project-roots pr)))
|
||||
(project--find-file-in dirs pr)))
|
||||
|
||||
;;;###autoload
|
||||
(defun project-or-external-find-file ()
|
||||
(interactive)
|
||||
(let* ((pr (project-current t))
|
||||
@ -326,6 +329,7 @@ pattern to search for."
|
||||
|
||||
;; FIXME: Uniquely abbreviate the roots?
|
||||
(defun project--find-file-in (dirs project)
|
||||
(require 'xref)
|
||||
(let* ((all-files
|
||||
(cl-mapcan
|
||||
(lambda (dir)
|
||||
|
Loading…
Reference in New Issue
Block a user