]> git.eshelyaron.com Git - emacs.git/commitdiff
(save-some-buffers): At each map-y-or-n-p iteration,
authorChong Yidong <cyd@stupidchicken.com>
Tue, 9 Dec 2008 23:43:11 +0000 (23:43 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Tue, 9 Dec 2008 23:43:11 +0000 (23:43 +0000)
check whether the buffer is still alive.

lisp/files.el

index ba281a908a1387d143b2d10928a60f1651e93ac2..0e303805d0ca9e0c891a02fb74d279e97231fd3f 100644 (file)
@@ -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)