From: Richard M. Stallman Date: Tue, 27 Aug 2002 20:38:30 +0000 (+0000) Subject: (find-alternate-file): Bind kill-buffer-query-functions locally, don't set it. X-Git-Tag: ttn-vms-21-2-B4~13537 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d97a9ff3398c62fe0de929a6ae77e0a3c4ace5ae;p=emacs.git (find-alternate-file): Bind kill-buffer-query-functions locally, don't set it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e43a04eb547..cc0fa8f3434 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-08-27 Richard M. Stallman + + * files.el (find-alternate-file): + Bind kill-buffer-query-functions locally, don't set it. + 2002-08-27 Andreas Schwab * kmacro.el (kmacro-start-macro): Doc fix. diff --git a/lisp/files.el b/lisp/files.el index abba36a5c07..2d129c888e5 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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)))))) (defun create-file-buffer (filename) "Create a suitably named buffer for visiting FILENAME, and return it.