Commit f6fbae11 authored by Chong Yidong's avatar Chong Yidong
Browse files

(basic-save-buffer): Revert 2008-12-22 change.

(buffer-swapped-with): Var removed.
parent 8f489707
......@@ -4072,13 +4072,6 @@ in such cases.")
(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 @@ the visited file in the usual way.
Before and after saving the buffer, this function runs
`before-save-hook' and `after-save-hook', respectively."
(if (not buffer-swapped-with)
;; If this buffer's real contents are "swapped" with some other buffer,
;; temporarily unswap in order to save the real contents.
(let ((modp (buffer-modified-p)))
(buffer-swap-text buffer-swapped-with)
(set-buffer-modified-p modp)
(buffer-swap-text buffer-swapped-with)
(set-buffer-modified-p nil))))
(defun basic-save-buffer-0 ()
;; In an indirect buffer, save its base buffer instead.
(if (buffer-base-buffer)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment