emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r108498: * files.el (enable-remote-di


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108498: * files.el (enable-remote-dir-locals): New option.
Date: Wed, 06 Jun 2012 14:34:09 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108498
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Wed 2012-06-06 14:34:09 +0200
message:
  * files.el (enable-remote-dir-locals): New option.
  (hack-dir-local-variables): Use it.  (Bug#1933, Bug#6731)
modified:
  lisp/ChangeLog
  lisp/files.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-06-06 01:28:08 +0000
+++ b/lisp/ChangeLog    2012-06-06 12:34:09 +0000
@@ -1,3 +1,8 @@
+2012-06-06  Michael Albinus  <address@hidden>
+
+       * files.el (enable-remote-dir-locals): New option.
+       (hack-dir-local-variables): Use it.  (Bug#1933, Bug#6731)
+
 2012-06-06  Glenn Morris  <address@hidden>
 
        * vc/vc-rcs.el (vc-rcs-rcs2log-program): New.

=== modified file 'lisp/files.el'
--- a/lisp/files.el     2012-05-24 21:27:22 +0000
+++ b/lisp/files.el     2012-06-06 12:34:09 +0000
@@ -3668,12 +3668,20 @@
              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)))


reply via email to

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