changeset 78659:01a61e30fa32

(uniquify-rationalize-file-buffer-names): Check liveness of buffers in uniquify-managed.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 25 Aug 2007 20:21:12 +0000
parents 6a12da4aa52f
children ccfc1f1f4817
files lisp/ChangeLog lisp/uniquify.el
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Aug 25 20:20:26 2007 +0000
+++ b/lisp/ChangeLog	Sat Aug 25 20:21:12 2007 +0000
@@ -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.
 
--- a/lisp/uniquify.el	Sat Aug 25 20:20:26 2007 +0000
+++ b/lisp/uniquify.el	Sat Aug 25 20:21:12 2007 +0000
@@ -233,6 +233,14 @@
 	      (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