diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2012-06-06 14:34:09 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2012-06-06 14:34:09 +0200 |
commit | dfb308badd63c6046545293306117c1ff117b8f0 (patch) | |
tree | 9b0be4bd1d85d836e2e3851f4ebf1cb5a242601a /lisp/files.el | |
parent | c5cfcbe076a00c6b21be6faa807549e0881ed422 (diff) | |
download | emacs-dfb308badd63c6046545293306117c1ff117b8f0.tar.gz |
* files.el (enable-remote-dir-locals): New option.
(hack-dir-local-variables): Use it. (Bug#1933, Bug#6731)
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 10 |
1 files changed, 9 insertions, 1 deletions
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." class-name)) (error (message "Error reading dir-locals: %S" err) nil))))) +(defcustom enable-remote-dir-locals nil + "Non-nil means dir-local variables will be applied to remote files." + :version "24.2" + :type 'boolean + :group 'find-file) + (defun hack-dir-local-variables () "Read per-directory local variables for the current buffer. Store the directory-local variables in `dir-local-variables-alist' and `file-local-variables-alist', without applying them." (when (and enable-local-variables - (not (file-remote-p (or (buffer-file-name) default-directory)))) + (or enable-remote-dir-locals + (not (file-remote-p (or (buffer-file-name) + default-directory))))) ;; Find the variables file. (let ((variables-file (dir-locals-find-file (or (buffer-file-name) default-directory))) |