[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/files.el
From: |
Markus Rost |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/files.el |
Date: |
Fri, 13 Sep 2002 16:22:11 -0400 |
Index: emacs/lisp/files.el
diff -c emacs/lisp/files.el:1.612 emacs/lisp/files.el:1.613
*** emacs/lisp/files.el:1.612 Tue Sep 10 12:48:52 2002
--- emacs/lisp/files.el Fri Sep 13 16:22:11 2002
***************
*** 2999,3016 ****
This requires the external program `diff' to be in your `exec-path'."
(interactive "bBuffer: ")
(with-current-buffer (get-buffer (or buffer (current-buffer)))
! (if (null buffer-file-name)
! (message "Buffer %s has no associated file" (buffer-name))
! (let ((tempfile (make-temp-file "buffer-content-")))
! (unwind-protect
! (save-restriction
! (widen)
! (write-region (point-min) (point-max) tempfile nil 'nomessage)
! (diff buffer-file-name tempfile nil t)
! (sit-for 0))
! (when (file-exists-p tempfile)
! (delete-file tempfile)))
! nil))))
(defvar save-some-buffers-action-alist
'((?\C-r
--- 2999,3022 ----
This requires the external program `diff' to be in your `exec-path'."
(interactive "bBuffer: ")
(with-current-buffer (get-buffer (or buffer (current-buffer)))
! (if (and buffer-file-name
! (file-exists-p buffer-file-name))
! (let ((tempfile (make-temp-file "buffer-content-")))
! (unwind-protect
! (save-restriction
! (widen)
! (write-region (point-min) (point-max) tempfile nil 'nomessage)
! (diff buffer-file-name tempfile nil t)
! (sit-for 0))
! (when (file-exists-p tempfile)
! (delete-file tempfile))))
! (message "Buffer %s has no associated file on disc" (buffer-name))
! ;; Display that message for 1 second so that user can read it
! ;; in the minibuffer.
! (sit-for 1)))
! ;; return always nil, so that save-buffers-kill-emacs will not move
! ;; over to the next unsaved buffer when calling `d'.
! nil)
(defvar save-some-buffers-action-alist
'((?\C-r
- [Emacs-diffs] Changes to emacs/lisp/files.el, Richard M. Stallman, 2002/09/01
- [Emacs-diffs] Changes to emacs/lisp/files.el, Colin Walters, 2002/09/07
- [Emacs-diffs] Changes to emacs/lisp/files.el, Richard M. Stallman, 2002/09/09
- [Emacs-diffs] Changes to emacs/lisp/files.el, Richard M. Stallman, 2002/09/09
- [Emacs-diffs] Changes to emacs/lisp/files.el, Markus Rost, 2002/09/09
- [Emacs-diffs] Changes to emacs/lisp/files.el, Kai Großjohann, 2002/09/10
- [Emacs-diffs] Changes to emacs/lisp/files.el, Richard M. Stallman, 2002/09/10
- [Emacs-diffs] Changes to emacs/lisp/files.el,
Markus Rost <=
- [Emacs-diffs] Changes to emacs/lisp/files.el, Kai Großjohann, 2002/09/22