diff options
-rw-r--r-- | lisp/generic-x.el | 1 | ||||
-rw-r--r-- | lisp/vc/diff-mode.el | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lisp/generic-x.el b/lisp/generic-x.el index dd614020153..47dfd2822d4 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el @@ -1490,6 +1490,7 @@ like an INI file. You can add this hook to `find-file-hook'." '("^\\([^:]+\\):\\([^:]*\\):\\([0-9]+\\):\\(.*\\)$" (1 font-lock-type-face) (4 font-lock-variable-name-face)))) + ;; /etc/passwd- is a backup file for /etc/passwd, so is group- and shadow- '("/etc/passwd-?\\'" "/etc/group-?\\'" "/etc/shadow-?\\'") (list (function diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 5d6cc6f38fb..158489c97fe 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -2488,6 +2488,7 @@ When OLD is non-nil, highlight the hunk from the old source." (let ((ol (make-overlay (+ bol (nth 0 prop)) (+ bol (nth 1 prop)) nil 'front-advance nil))) + (overlay-put ol 'diff-mode 'syntax) (overlay-put ol 'evaporate t) (overlay-put ol 'face (nth 2 prop)))))))))))) @@ -2502,6 +2503,7 @@ hunk text is not found in the source file." (unless no-init (buffer-disable-undo) (font-lock-mode -1) + (setq buffer-file-name nil) (let ((enable-local-variables :safe) ;; to find `mode:' (buffer-file-name file)) (set-auto-mode) |