diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-12-09 23:43:11 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-12-09 23:43:11 +0000 |
commit | be9acc262964098b774110b7fb2f0228ffd74863 (patch) | |
tree | 69caa71d8b418d3205a3e7b83f2e6a46015e3a63 | |
parent | 39af3de2c134e5b5d9068f6fad20c4cdf57d38f6 (diff) | |
download | emacs-be9acc262964098b774110b7fb2f0228ffd74863.tar.gz |
(save-some-buffers): At each map-y-or-n-p iteration,
check whether the buffer is still alive.
-rw-r--r-- | lisp/files.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index ba281a908a1..0e303805d0c 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4351,7 +4351,10 @@ change the additional actions you can take on files." (setq files-done (map-y-or-n-p (lambda (buffer) - (and (buffer-modified-p buffer) + ;; Note that killing some buffers may kill others via + ;; hooks (e.g. Rmail and its viewing buffer). + (and (buffer-live-p buffer) + (buffer-modified-p buffer) (not (buffer-base-buffer buffer)) (or (buffer-file-name buffer) |