]> git.eshelyaron.com Git - emacs.git/commitdiff
(find-alternate-file): Bind kill-buffer-query-functions locally, don't set it.
authorRichard M. Stallman <rms@gnu.org>
Tue, 27 Aug 2002 20:38:30 +0000 (20:38 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 27 Aug 2002 20:38:30 +0000 (20:38 +0000)
lisp/ChangeLog
lisp/files.el

index e43a04eb5473292ab312df0cd27b959eaf5e5c5e..cc0fa8f3434cbc1b82f89204193e93b776e2ad19 100644 (file)
@@ -1,3 +1,8 @@
+2002-08-27  Richard M. Stallman  <rms@gnu.org>
+
+       * files.el (find-alternate-file):
+       Bind kill-buffer-query-functions locally, don't set it.
+
 2002-08-27  Andreas Schwab  <schwab@suse.de>
 
        * kmacro.el (kmacro-start-macro): Doc fix.
index abba36a5c07fd155450af2edbe9e06e26c30d480..2d129c888e5bc5bd4c59cc948b2ebd3d9a5dc8eb 100644 (file)
@@ -964,9 +964,10 @@ If the current buffer now contains an empty file that you just visited
        (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))))))
 \f
 (defun create-file-buffer (filename)
   "Create a suitably named buffer for visiting FILENAME, and return it.