diff lisp/uniquify.el @ 91015:b83d0dadb2a7

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 857-865) - Update from CVS - Merge from emacs--rel--22 - Update from CVS: lisp/emacs-lisp/avl-tree.el: New file. - Remove RCS keywords * emacs--rel--22 (patch 97-100) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 246-247) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-252
author Miles Bader <miles@gnu.org>
date Wed, 29 Aug 2007 05:03:40 +0000
parents f55f9811f5d7 92ccd83174e6
children 880960b70474
line wrap: on
line diff
--- a/lisp/uniquify.el	Thu Aug 23 12:13:43 2007 +0000
+++ b/lisp/uniquify.el	Wed Aug 29 05:03:40 2007 +0000
@@ -235,6 +235,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