diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2010-03-12 00:04:54 -0800 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2010-03-12 00:04:54 -0800 |
commit | 8117868f0ce67b6db33081f77b6715a6c10e45b8 (patch) | |
tree | aa88ce85bb40558a9d726141b2bf9a3cebccba5e /lisp/diff-mode.el | |
parent | 49a62e8aad8eee350511104415062f6b82f51973 (diff) | |
download | emacs-8117868f0ce67b6db33081f77b6715a6c10e45b8.tar.gz |
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.
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r-- | lisp/diff-mode.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 27f8318f91c..75ea98ba911 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -1287,7 +1287,9 @@ a diff with \\[diff-reverse-direction]. (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 |