diff options
| author | Michael Albinus | 2012-06-06 14:34:09 +0200 |
|---|---|---|
| committer | Michael Albinus | 2012-06-06 14:34:09 +0200 |
| commit | dfb308badd63c6046545293306117c1ff117b8f0 (patch) | |
| tree | 9b0be4bd1d85d836e2e3851f4ebf1cb5a242601a | |
| parent | c5cfcbe076a00c6b21be6faa807549e0881ed422 (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/files.el | 10 |
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 @@ | |||
| 1 | 2012-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 | |||
| 1 | 2012-06-06 Glenn Morris <rgm@gnu.org> | 6 | 2012-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. |
| 3673 | Store the directory-local variables in `dir-local-variables-alist' | 3679 | Store the directory-local variables in `dir-local-variables-alist' |
| 3674 | and `file-local-variables-alist', without applying them." | 3680 | and `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))) |