emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp files.el


From: Chong Yidong
Subject: [Emacs-diffs] emacs/lisp files.el
Date: Wed, 31 Dec 2008 02:13:31 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      08/12/31 02:13:31

Modified files:
        lisp           : files.el 

Log message:
        (basic-save-buffer): Revert 2008-12-22 change.
        (buffer-swapped-with): Var removed.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/files.el?cvsroot=emacs&r1=1.1029&r2=1.1030

Patches:
Index: files.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.1029
retrieving revision 1.1030
diff -u -b -r1.1029 -r1.1030
--- files.el    28 Dec 2008 03:24:53 -0000      1.1029
+++ files.el    31 Dec 2008 02:13:31 -0000      1.1030
@@ -4072,13 +4072,6 @@
 (make-variable-buffer-local 'save-buffer-coding-system)
 (put 'save-buffer-coding-system 'permanent-local t)
 
-(defvar buffer-swapped-with nil
-  "Buffer that this buffer's contents are temporarily swapped with.
-You should only set this variable in file-visiting buffers,
-because it only affects how to save the buffer in its file.")
-
-(make-variable-buffer-local 'buffer-swapped-with)
-
 (defun basic-save-buffer ()
   "Save the current buffer in its visited file, if it has been modified.
 The hooks `write-contents-functions' and `write-file-functions' get a chance
@@ -4087,19 +4080,6 @@
 Before and after saving the buffer, this function runs
 `before-save-hook' and `after-save-hook', respectively."
   (interactive)
-  (if (not buffer-swapped-with)
-      (basic-save-buffer-0)
-    ;; If this buffer's real contents are "swapped" with some other buffer,
-    ;; temporarily unswap in order to save the real contents.
-    (unwind-protect
-       (let ((modp (buffer-modified-p)))
-         (buffer-swap-text buffer-swapped-with)
-         (set-buffer-modified-p modp)
-         (basic-save-buffer-0))
-      (buffer-swap-text buffer-swapped-with)
-      (set-buffer-modified-p nil))))
-
-(defun basic-save-buffer-0 ()
   (save-current-buffer
     ;; In an indirect buffer, save its base buffer instead.
     (if (buffer-base-buffer)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]