From af253389a43958ad2437a1d58d50b414633e42cd Mon Sep 17 00:00:00 2001 From: yoichi Date: Sat, 24 May 2003 12:32:35 +0000 Subject: [PATCH] * wl-message.el (wl-message-buffer-cache-add): Create new buffer when it hits killed buffer. --- wl/ChangeLog | 5 +++++ wl/wl-message.el | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 0c0d18c..56b5dd5 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2003-05-24 Yoichi NAKAYAMA + + * wl-message.el (wl-message-buffer-cache-add): Create new buffer + when it hits killed buffer. + 2003-05-12 Yoichi NAKAYAMA * wl-draft.el, wl-expire.el, wl-mime.el, wl-summary.el, wl-util.el diff --git a/wl/wl-message.el b/wl/wl-message.el index 2355dc5..0ba6843 100644 --- a/wl/wl-message.el +++ b/wl/wl-message.el @@ -147,9 +147,12 @@ Return its cache buffer." (buf nil)) (if (< len wl-message-buffer-cache-size) (setq buf (wl-message-buffer-create)) - (setq buf (wl-message-buffer-cache-buffer-get - (nth (1- len) wl-message-buffer-cache))) - (setcdr (nthcdr (- len 2) wl-message-buffer-cache) nil)) + (let ((entry (nth (1- len) wl-message-buffer-cache))) + (if (buffer-live-p + (setq buf (wl-message-buffer-cache-buffer-get entry))) + (setcdr (nthcdr (- len 2) wl-message-buffer-cache) nil) + (setq wl-message-buffer-cache (delq entry wl-message-buffer-cache)) + (setq buf (wl-message-buffer-create))))) (setq wl-message-buffer-cache (cons (wl-message-buffer-cache-entry-make key buf) wl-message-buffer-cache)) -- 1.7.10.4