diff options
Diffstat (limited to 'lisp/vc/diff-mode.el')
| -rw-r--r-- | lisp/vc/diff-mode.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 2dbab802086..d61c363c821 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -2719,7 +2719,9 @@ hunk text is not found in the source file." (cl-assert (null buffer-file-name)) (let ((enable-local-variables :safe) ;; to find `mode:' (buffer-file-name file)) - (set-auto-mode) + ;; Don't run hooks that might assume buffer-file-name + ;; really associates buffer with a file (bug#39190). + (delay-mode-hooks (set-auto-mode)) ;; FIXME: Is this really worth the trouble? (when (and (fboundp 'generic-mode-find-file-hook) (memq #'generic-mode-find-file-hook |
