From fd4de45344404f405bd259ff1ba7e619a59185f8 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 7 Mar 2014 14:57:43 +0900 Subject: [PATCH] emacs.el: do not enable view-mode if major-mode is derived mode of diff-mode --- emacs.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/emacs.el b/emacs.el index fbfd750..7076c1a 100644 --- a/emacs.el +++ b/emacs.el @@ -908,7 +908,10 @@ found, otherwise returns nil." (setq diff-switches "-u") (add-hook 'diff-mode-hook (lambda () - (view-mode 1) + (when (eq major-mode + 'diff-mode) + ;; do not pass when major-mode is derived mode of diff-mode + (view-mode 1)) (set-face-attribute 'diff-header nil :foreground nil :background nil