]> git.eshelyaron.com Git - emacs.git/commitdiff
(uniquify-rationalize-file-buffer-names): Check liveness
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 25 Aug 2007 20:21:12 +0000 (20:21 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 25 Aug 2007 20:21:12 +0000 (20:21 +0000)
of buffers in uniquify-managed.

lisp/ChangeLog
lisp/uniquify.el

index e49ba253922486dac27d213ad77414789603cf73..69b5c69533eb8d06237b0479b0ce6214928e3dbb 100644 (file)
@@ -1,5 +1,8 @@
 2007-08-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * uniquify.el (uniquify-rationalize-file-buffer-names): Check liveness
+       of buffers in uniquify-managed.
+
        * simple.el (invisible-p): Rename from text-invisible-p.
        Update callers.
 
index 1c00d1edadb7e79421edabdf3803eb4f09810b3a..f6bfd432a16dee5fcb9910d136e5bd34f1e83c34 100644 (file)
@@ -233,6 +233,14 @@ this rationalization."
              (with-current-buffer (uniquify-item-buffer (car items))
                (setq uniquify-managed nil))
              (setq items nil)))
+          ;; In case we missed some calls to kill-buffer, there may be dead
+          ;; buffers in uniquify-managed, so filter them out.
+          (setq items
+                (delq nil (mapcar
+                           (lambda (item)
+                             (if (buffer-live-p (uniquify-item-buffer item))
+                                 item))
+                           items)))
          (setq fix-list (append fix-list items))))
       ;; selects buffers whose names may need changing, and others that
       ;; may conflict, then bring conflicting names together