From: yoichi Date: Sat, 24 May 2003 12:32:35 +0000 (+0000) Subject: * wl-message.el (wl-message-buffer-cache-add): Create new buffer X-Git-Tag: merged-trunk-to-elmo-mark-18~22 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=af253389a43958ad2437a1d58d50b414633e42cd;p=elisp%2Fwanderlust.git * wl-message.el (wl-message-buffer-cache-add): Create new buffer when it hits killed buffer. --- 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))