summaryrefslogtreecommitdiff
path: root/lisp/diff-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r--lisp/diff-mode.el4
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