diff lisp/diff-mode.el @ 107374:dc9565b08f10

Add .dir-locals.el support for file-less buffers. * files.el (hack-local-variables): Split out code to apply local variable settings ... (hack-local-variables-apply): ... here. New function. (hack-dir-local-variables): Use the default directory for when the buffer does not have an associated file. (hack-dir-local-variables-non-file-buffer): New function. * diff-mode.el (diff-mode): * vc-annotate.el (vc-annotate-mode): * vc-dir.el (vc-dir-mode): * log-edit.el (log-edit-mode): * log-view.el (log-view-mode): Call hack-dir-local-variables-non-file-buffer.
author Dan Nicolaescu <dann@ics.uci.edu>
date Fri, 12 Mar 2010 00:04:54 -0800
parents 1d1d5d9bd884
children
line wrap: on
line diff
--- a/lisp/diff-mode.el	Thu Mar 11 19:13:01 2010 -0800
+++ b/lisp/diff-mode.el	Fri Mar 12 00:04:54 2010 -0800
@@ -1287,7 +1287,9 @@
   (set (make-local-variable 'add-log-current-defun-function)
        'diff-current-defun)
   (set (make-local-variable 'add-log-buffer-file-name-function)
-       (lambda () (diff-find-file-name nil 'noprompt))))
+       (lambda () (diff-find-file-name nil 'noprompt)))
+  (unless (buffer-file-name)
+    (hack-dir-local-variables-non-file-buffer)))
 
 ;;;###autoload
 (define-minor-mode diff-minor-mode