aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2012-06-06 14:34:09 +0200
committerMichael Albinus2012-06-06 14:34:09 +0200
commitdfb308badd63c6046545293306117c1ff117b8f0 (patch)
tree9b0be4bd1d85d836e2e3851f4ebf1cb5a242601a
parentc5cfcbe076a00c6b21be6faa807549e0881ed422 (diff)
downloademacs-dfb308badd63c6046545293306117c1ff117b8f0.tar.gz
emacs-dfb308badd63c6046545293306117c1ff117b8f0.zip
* files.el (enable-remote-dir-locals): New option.
(hack-dir-local-variables): Use it. (Bug#1933, Bug#6731)
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/files.el10
2 files changed, 14 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 211ea180ec4..6ba7a327ad3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-06-06 Michael Albinus <michael.albinus@gmx.de>
2
3 * files.el (enable-remote-dir-locals): New option.
4 (hack-dir-local-variables): Use it. (Bug#1933, Bug#6731)
5
12012-06-06 Glenn Morris <rgm@gnu.org> 62012-06-06 Glenn Morris <rgm@gnu.org>
2 7
3 * vc/vc-rcs.el (vc-rcs-rcs2log-program): New. 8 * vc/vc-rcs.el (vc-rcs-rcs2log-program): New.
diff --git a/lisp/files.el b/lisp/files.el
index dad04236ca3..7f92ba7b206 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3668,12 +3668,20 @@ is found. Returns the new class name."
3668 class-name)) 3668 class-name))
3669 (error (message "Error reading dir-locals: %S" err) nil))))) 3669 (error (message "Error reading dir-locals: %S" err) nil)))))
3670 3670
3671(defcustom enable-remote-dir-locals nil
3672 "Non-nil means dir-local variables will be applied to remote files."
3673 :version "24.2"
3674 :type 'boolean
3675 :group 'find-file)
3676
3671(defun hack-dir-local-variables () 3677(defun hack-dir-local-variables ()
3672 "Read per-directory local variables for the current buffer. 3678 "Read per-directory local variables for the current buffer.
3673Store the directory-local variables in `dir-local-variables-alist' 3679Store the directory-local variables in `dir-local-variables-alist'
3674and `file-local-variables-alist', without applying them." 3680and `file-local-variables-alist', without applying them."
3675 (when (and enable-local-variables 3681 (when (and enable-local-variables
3676 (not (file-remote-p (or (buffer-file-name) default-directory)))) 3682 (or enable-remote-dir-locals
3683 (not (file-remote-p (or (buffer-file-name)
3684 default-directory)))))
3677 ;; Find the variables file. 3685 ;; Find the variables file.
3678 (let ((variables-file (dir-locals-find-file 3686 (let ((variables-file (dir-locals-find-file
3679 (or (buffer-file-name) default-directory))) 3687 (or (buffer-file-name) default-directory)))