+2012-06-06 Michael Albinus <michael.albinus@gmx.de>
+
+ * files.el (enable-remote-dir-locals): New option.
+ (hack-dir-local-variables): Use it. (Bug#1933, Bug#6731)
+
2012-06-06 Glenn Morris <rgm@gnu.org>
* vc/vc-rcs.el (vc-rcs-rcs2log-program): New.
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)))