From 8837a213a2a7212fb99a31d49ff8da131bc69be1 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 25 Aug 2007 20:21:12 +0000 Subject: [PATCH] (uniquify-rationalize-file-buffer-names): Check liveness of buffers in uniquify-managed. --- lisp/ChangeLog | 3 +++ lisp/uniquify.el | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e49ba253922..69b5c69533e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2007-08-25 Stefan Monnier + * 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. diff --git a/lisp/uniquify.el b/lisp/uniquify.el index 1c00d1edadb..f6bfd432a16 100644 --- a/lisp/uniquify.el +++ b/lisp/uniquify.el @@ -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 -- 2.39.2