aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-08-27 20:38:30 +0000
committerRichard M. Stallman2002-08-27 20:38:30 +0000
commitd97a9ff3398c62fe0de929a6ae77e0a3c4ace5ae (patch)
treee22a6f361d568f6172046b15ceb332a4d817b8aa
parent92c303103fb2468eb1f23b455c3b40727c7a59b1 (diff)
downloademacs-d97a9ff3398c62fe0de929a6ae77e0a3c4ace5ae.tar.gz
emacs-d97a9ff3398c62fe0de929a6ae77e0a3c4ace5ae.zip
(find-alternate-file): Bind kill-buffer-query-functions locally, don't set it.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/files.el7
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e43a04eb547..cc0fa8f3434 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12002-08-27 Richard M. Stallman <rms@gnu.org>
2
3 * files.el (find-alternate-file):
4 Bind kill-buffer-query-functions locally, don't set it.
5
12002-08-27 Andreas Schwab <schwab@suse.de> 62002-08-27 Andreas Schwab <schwab@suse.de>
2 7
3 * kmacro.el (kmacro-start-macro): Doc fix. 8 * 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
964 (lock-buffer) 964 (lock-buffer)
965 (rename-buffer oname))) 965 (rename-buffer oname)))
966 (unless (eq (current-buffer) obuf) 966 (unless (eq (current-buffer) obuf)
967 ;; We already asked; don't ask again. 967 (with-current-buffer obuf
968 (setq kill-buffer-query-functions nil) 968 ;; We already asked; don't ask again.
969 (kill-buffer obuf)))) 969 (let ((kill-buffer-query-functions))
970 (kill-buffer obuf))))))
970 971
971(defun create-file-buffer (filename) 972(defun create-file-buffer (filename)
972 "Create a suitably named buffer for visiting FILENAME, and return it. 973 "Create a suitably named buffer for visiting FILENAME, and return it.