From: Stefan Monnier Date: Sat, 25 Aug 2007 20:21:12 +0000 (+0000) Subject: (uniquify-rationalize-file-buffer-names): Check liveness X-Git-Tag: emacs-pretest-22.1.90~906 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8837a213a2a7212fb99a31d49ff8da131bc69be1;p=emacs.git (uniquify-rationalize-file-buffer-names): Check liveness of buffers in uniquify-managed. --- 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