]> code.delx.au - gnu-emacs/commitdiff
* files.el (save-some-buffers-action-alist): Display diff in
authorChong Yidong <cyd@stupidchicken.com>
Fri, 22 Sep 2006 15:01:41 +0000 (15:01 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Fri, 22 Sep 2006 15:01:41 +0000 (15:01 +0000)
view-mode.

lisp/ChangeLog
lisp/files.el

index 241087e608e6d2b57ef83086c5d0a902e849c60f..45a9343206db0e0f62d61d3548f82a12c2586207 100644 (file)
@@ -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'
index 13fdf0d020baf74d33d5236be5480bbcaf67917d..5af68f6014ecdea3e2e0c95ad0db7d6ff4d3fa26 100644 (file)
@@ -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'.")