diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-06-07 22:44:33 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-06-07 22:44:33 -0400 |
commit | d973a21b0cf2c42ae63212d7d8fcd2d0c1e09721 (patch) | |
tree | 889a47f1e6840503823d378e9566f9e752897fff /lisp | |
parent | bd2475df302320730c1c3c06b5f940227648ebd9 (diff) | |
download | emacs.d-d973a21b0cf2c42ae63212d7d8fcd2d0c1e09721.tar.gz |
Advise diff to select buffer and enter view-mode
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-external.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/init-external.el b/lisp/init-external.el index bc165aa..2b54173 100644 --- a/lisp/init-external.el +++ b/lisp/init-external.el @@ -70,6 +70,10 @@ is non-nil, switch to the buffer." (setq diff-command "/bin/diff" diff-switches "-u") +(defadvice diff (after diff-select-and-view activate) + (select-window (get-buffer-window "*Diff*")) + (view-mode 1)) + (define-key external-map "d" 'diff) (define-key external-map "e" 'ediff) |