Browse Source

emacs: do not enable view-mode for diff-mode when visiting files

pull/1/head
10sr 10 years ago
parent
commit
2689ece004
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      emacs.el

+ 3
- 2
emacs.el View File

@@ -914,8 +914,9 @@ found, otherwise returns nil."
(setq diff-switches "-u")
(add-hook 'diff-mode-hook
(lambda ()
(when (eq major-mode
'diff-mode)
(when (and (eq major-mode
'diff-mode)
(not buffer-file-name))
;; do not pass when major-mode is derived mode of diff-mode
(view-mode 1))
(set-face-attribute 'diff-header nil


Loading…
Cancel
Save