aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/files.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2002-08-27 20:38:30 +0000
committerRichard M. Stallman <[email protected]>2002-08-27 20:38:30 +0000
commitd97a9ff3398c62fe0de929a6ae77e0a3c4ace5ae (patch)
treee22a6f361d568f6172046b15ceb332a4d817b8aa /lisp/files.el
parent92c303103fb2468eb1f23b455c3b40727c7a59b1 (diff)
(find-alternate-file): Bind kill-buffer-query-functions locally, don't set it.
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el
index abba36a5c0..2d129c888e 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.