changeset 73053:2283ba7c8090

* files.el (save-some-buffers-action-alist): Display diff in view-mode.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 22 Sep 2006 15:01:41 +0000
parents 91bb1b3f2e7b
children 24edca6ed2da
files lisp/ChangeLog lisp/files.el
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Sep 22 14:27:13 2006 +0000
+++ b/lisp/ChangeLog	Fri Sep 22 15:01:41 2006 +0000
@@ -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'
--- a/lisp/files.el	Fri Sep 22 14:27:13 2006 +0000
+++ b/lisp/files.el	Fri Sep 22 15:01:41 2006 +0000
@@ -3729,7 +3729,13 @@
        ;; 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'.")