Don't use the value of wl-messge-buffer.
* wl-summary.el (wl-summary-redisplay-no-mime-internal): Update
persistent mark.
* wl-mime.el (wl-draft-yank-current-message-entity): If there's
no current message, cause an error.
* elmo-mime.el (elmo-mime-message-display): Display message entirely
if folder length is zero.
(elmo-mime-display-as-is): Ditto.
* elmo-multi.el (elmo-folder-set-message-modified): Ditto.
-2003-08-04 Yuuichi Teranishi <teranisi@gohome.org>
+2003-08-05 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo-mime.el (elmo-mime-message-display): Display message entirely
+ if folder length is zero.
+ (elmo-mime-display-as-is): Ditto.
* elmo-filter.el (elmo-folder-set-message-modified): Define.
(let (mime-display-header-hook ; Do nothing.
(elmo-message-displaying t)
entity strategy)
- (setq entity (elmo-message-entity folder number))
- (setq strategy (elmo-find-fetch-strategy folder entity
- ignore-cache))
+ (unless (zerop (elmo-folder-length folder))
+ (setq entity (elmo-message-entity folder number)))
+ (setq strategy (if entity (elmo-find-fetch-strategy folder entity
+ ignore-cache)
+ (elmo-make-fetch-strategy 'entire)))
(mime-display-message
(mime-open-entity
(if (and strategy
(elmo-folder-msgdb folder)))
mime-display-header-hook ; Do nothing.
cache-file strategy use-cache)
- (setq cache-file (elmo-file-cache-get
- (elmo-msgdb-overview-entity-get-id entity)))
- (setq use-cache (and (elmo-message-use-cache-p folder number)
- (eq (elmo-file-cache-status cache-file) 'entire)))
+ (when entity
+ (setq cache-file (elmo-file-cache-get
+ (elmo-msgdb-overview-entity-get-id entity)))
+ (setq use-cache (and (elmo-message-use-cache-p folder number)
+ (eq (elmo-file-cache-status cache-file) 'entire))))
(setq strategy (elmo-make-fetch-strategy
- 'entire use-cache (elmo-message-use-cache-p folder number)
- (elmo-file-cache-path
- cache-file)))
+ 'entire use-cache
+ (elmo-message-use-cache-p folder number)
+ (elmo-file-cache-path cache-file)))
(elmo-mime-display-as-is-internal
(mime-open-entity
'elmo-buffer
(elmo-make-mime-message-location
folder number strategy rawbuf unread))
viewbuf nil keymap original-mode)
- (elmo-fetch-strategy-use-cache strategy)))
+ (when strategy
+ (elmo-fetch-strategy-use-cache strategy))))
;; Replacement of mime-display-message.
(defun elmo-mime-display-as-is-internal (message
(defmacro elmo-multi-real-folder-number (folder number)
"Returns a cons cell of real FOLDER and NUMBER."
- (` (cons (nth (-
+ (` (cons (nth (-
(/ (, number)
(elmo-multi-folder-divide-number-internal (, folder)))
1) (elmo-multi-folder-children-internal (, folder)))
+2003-08-05 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * wl-util.el (wl-current-message-buffer): Define as function;
+ Don't use the value of wl-messge-buffer.
+
+ * wl-summary.el (wl-summary-redisplay-no-mime-internal): Update
+ persistent mark.
+
+ * wl-mime.el (wl-draft-yank-current-message-entity): If there's
+ no current message, cause an error.
+
2003-08-03 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* wl-summary.el (wl-summary-set-message-modified): Use
(function wl-draft-yank-to-draft-buffer))))
(mime-preview-following-method-alist
(list (cons 'wl-original-message-mode
- (function wl-draft-yank-to-draft-buffer)))))
- (if (get-buffer (wl-current-message-buffer))
+ (function wl-draft-yank-to-draft-buffer))))
+ (message-buffer (wl-current-message-buffer)))
+ (unless message-buffer
+ (error "No message."))
+ (if (get-buffer message-buffer)
(save-excursion
(set-buffer (wl-current-message-buffer))
(save-restriction
(wl-message-redisplay fld num 'as-is
(string= (elmo-folder-name-internal fld)
wl-draft-folder))
- (wl-summary-mark-as-read num)
+ (ignore-errors
+ (if (member (elmo-message-mark fld num)
+ (elmo-msgdb-unread-marks))
+ (wl-summary-mark-as-read num); no-folder-mark)
+ (wl-summary-update-persistent-mark)))
(setq wl-summary-buffer-current-msg num)
(when wl-summary-recenter
(recenter (/ (- (window-height) 2) 2))
(defmacro wl-concat-list (list separator)
(` (mapconcat 'identity (delete "" (delq nil (, list))) (, separator))))
-(defmacro wl-current-message-buffer ()
- (` (save-excursion
- (if (buffer-live-p wl-current-summary-buffer)
- (set-buffer wl-current-summary-buffer))
- wl-message-buffer)))
+(defun wl-current-message-buffer ()
+ (when (buffer-live-p wl-current-summary-buffer)
+ (with-current-buffer wl-current-summary-buffer
+ (car (wl-message-buffer-display wl-summary-buffer-elmo-folder
+ (wl-summary-message-number)
+ 'mime)))))
(defmacro wl-kill-buffers (regexp)
(` (mapcar (function