]> code.delx.au - gnu-emacs/blobdiff - lisp/uniquify.el
Merge from emacs--rel--22
[gnu-emacs] / lisp / uniquify.el
index 1f5e6409a76122c6e3ecf3e74a0ee10cbc129316..8226c65cbb9055ed4eece6ffd3848b1e20c5b654 100644 (file)
@@ -235,6 +235,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