changeset 47066:a2c9058db731

(find-alternate-file): Bind kill-buffer-query-functions locally, don't set it.
author Richard M. Stallman <rms@gnu.org>
date Tue, 27 Aug 2002 20:37:00 +0000
parents bdd10e97fa76
children d87784183b26
files lisp/files.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Tue Aug 27 18:54:46 2002 +0000
+++ b/lisp/files.el	Tue Aug 27 20:37:00 2002 +0000
@@ -964,9 +964,10 @@
 	(lock-buffer)
 	(rename-buffer oname)))
     (unless (eq (current-buffer) obuf)
-      ;; We already asked; don't ask again.
-      (setq kill-buffer-query-functions nil)
-      (kill-buffer obuf))))
+      (with-current-buffer obuf
+	;; We already asked; don't ask again.
+	(let ((kill-buffer-query-functions))
+	  (kill-buffer obuf))))))
 
 (defun create-file-buffer (filename)
   "Create a suitably named buffer for visiting FILENAME, and return it.