summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-09-22 15:01:41 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-09-22 15:01:41 +0000
commit16abdbe639415ee4f5bab402193efedb83e1352e (patch)
tree857fa6f098b93f8fceca0f7a22c5147317ec01c2
parent1d8f4cb627aecfcb07a4ff8fcb4c8b83e3aeaf4b (diff)
downloademacs-16abdbe639415ee4f5bab402193efedb83e1352e.tar.gz
* files.el (save-some-buffers-action-alist): Display diff in
view-mode.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/files.el8
2 files changed, 12 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 241087e608e..45a9343206d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-22 Chong Yidong <cyd@stupidchicken.com>
+
+ * files.el (save-some-buffers-action-alist): Display diff in
+ view-mode.
+
2006-09-22 Masatake YAMATO <jet@gyve.org>
* add-log.el (add-log-current-defun): Use `forward-sexp'
diff --git a/lisp/files.el b/lisp/files.el
index 13fdf0d020b..5af68f6014e 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3729,7 +3729,13 @@ This requires the external program `diff' to be in your `exec-path'."
;; Return nil to ask about BUF again.
nil)
"view this file")
- (?d diff-buffer-with-file
+ (?d (lambda (buf)
+ (save-window-excursion
+ (diff-buffer-with-file buf))
+ (view-buffer (get-buffer-create "*Diff*")
+ (lambda (ignore) (exit-recursive-edit)))
+ (recursive-edit)
+ nil)
"view changes in file"))
"ACTION-ALIST argument used in call to `map-y-or-n-p'.")