emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 a034dd3: Fix two project-find-file issues


From: Dmitry Gutov
Subject: [Emacs-diffs] emacs-25 a034dd3: Fix two project-find-file issues
Date: Fri, 08 Jan 2016 11:32:56 +0000

branch: emacs-25
commit a034dd384c995f09ecf4ec145cfc614a217b4e4e
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    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.
---
 lisp/progmodes/project.el |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index cfe7fc3..5070bb0 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]