X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=wl%2Fwl-summary.el;h=ce86452bc9799d711b878ff11c1bb00c2e2b2b96;hb=852c268cfbb69e575678fca133c7e0cbe5fa1360;hp=58fb80a738e9c640b197f4ca8c382bcdc33fac30;hpb=b2c3a7e8652ff6fa4d815253d9b3aa6c59c0239b;p=elisp%2Fwanderlust.git diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 58fb80a..ce86452 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -86,7 +86,7 @@ (defvar wl-summary-buffer-mime-charset nil) (defvar wl-summary-buffer-weekday-name-lang nil) (defvar wl-summary-buffer-thread-indent-set-alist nil) -(defvar wl-summary-buffer-view 'thread) +(defvar wl-summary-buffer-view nil) (defvar wl-summary-buffer-message-modified nil) (defvar wl-summary-buffer-mark-modified nil) (defvar wl-summary-buffer-thread-modified nil) @@ -209,6 +209,12 @@ subject-string)) (defun wl-summary-default-from (from) + "Instance of `wl-summary-from-function'. +Ordinarily returns the sender name. Returns recipient names if (1) +summary's folder name matches with `wl-summary-showto-folder-regexp' +and (2) sender address is yours. + +See also variable `wl-use-petname'." (let (retval tos ng) (unless (and (eq major-mode 'wl-summary-mode) @@ -253,6 +259,9 @@ string) string)) +(defvar wl-summary-sort-specs '(number date subject from list-info)) +(defvar wl-summary-default-sort-spec 'date) + (defvar wl-summary-mode-menu-spec '("Summary" ["Read" wl-summary-read t] @@ -280,7 +289,8 @@ ["By Number" wl-summary-sort-by-number t] ["By Date" wl-summary-sort-by-date t] ["By From" wl-summary-sort-by-from t] - ["By Subject" wl-summary-sort-by-subject t]) + ["By Subject" wl-summary-sort-by-subject t] + ["By List Info" wl-summary-sort-by-list-info t]) "----" ("Message Operation" ["Mark as read" wl-summary-mark-as-read t] @@ -396,7 +406,6 @@ (define-key wl-summary-mode-map "g" 'wl-summary-goto-folder) (define-key wl-summary-mode-map "G" 'wl-summary-goto-folder-sticky) (define-key wl-summary-mode-map "c" 'wl-summary-mark-as-read-all) -; (define-key wl-summary-mode-map "D" 'wl-summary-drop-unsync) (define-key wl-summary-mode-map "a" 'wl-summary-reply) (define-key wl-summary-mode-map "A" 'wl-summary-reply-with-citation) @@ -412,10 +421,8 @@ (define-key wl-summary-mode-map "p" 'wl-summary-prev) (define-key wl-summary-mode-map "N" 'wl-summary-down) (define-key wl-summary-mode-map "P" 'wl-summary-up) -;;;(define-key wl-summary-mode-map "w" 'wl-draft) (define-key wl-summary-mode-map "w" 'wl-summary-write) (define-key wl-summary-mode-map "W" 'wl-summary-write-current-folder) -;;;(define-key wl-summary-mode-map "e" 'wl-draft-open-file) (define-key wl-summary-mode-map "e" 'wl-summary-save) (define-key wl-summary-mode-map "\C-c\C-o" 'wl-jump-to-draft-buffer) (define-key wl-summary-mode-map "\C-c\C-a" 'wl-addrmgr) @@ -468,6 +475,7 @@ (define-key wl-summary-mode-map "d" 'wl-summary-delete) (define-key wl-summary-mode-map "u" 'wl-summary-unmark) (define-key wl-summary-mode-map "U" 'wl-summary-unmark-all) + (define-key wl-summary-mode-map "D" 'wl-summary-erase) ;; thread commands (define-key wl-summary-mode-map "t" (make-sparse-keymap)) @@ -601,16 +609,15 @@ If optional USE-CACHE is non-nil, use cache if exists." "Re-edit current message. If ARG is non-nil, Supersedes message" (interactive "P") + (wl-summary-toggle-disp-msg 'off) (if arg (wl-summary-supersedes-message) (if (string= (wl-summary-buffer-folder-name) wl-draft-folder) - (if (wl-summary-message-number) - (progn - (wl-draft-reedit (wl-summary-message-number)) - (if (wl-message-news-p) - (mail-position-on-field "Newsgroups") - (mail-position-on-field "To")) - (delete-other-windows))) + (when (wl-summary-message-number) + (wl-draft-reedit (wl-summary-message-number)) + (if (wl-message-news-p) + (mail-position-on-field "Newsgroups") + (mail-position-on-field "To"))) (wl-draft-edit-string (wl-summary-message-string))))) (defun wl-summary-resend-bounced-mail () @@ -619,6 +626,7 @@ This only makes sense if the current message is a bounce message which contains some mail you have written but has been bounced back to you." (interactive) + (wl-summary-toggle-disp-msg 'off) (save-excursion (wl-summary-set-message-buffer-or-redisplay) (set-buffer (wl-message-get-original-buffer)) @@ -637,7 +645,7 @@ you." (concat "^--" boundary "\n" "\\([Cc]ontent-[Dd]escription:.*\n\\)?" "[Cc]ontent-[Tt]ype:[ \t]+" - "\\(message/rfc822\\|text/rfc822-headers\\)\n" + "\\(message/rfc822\\|text/rfc822-headers\\).*\n" "\\(.+\n\\)*\n") nil t)) (re-search-forward (concat "\n\\(--" boundary "\\)--\n") nil t)) @@ -858,6 +866,60 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'." (string< (elmo-msgdb-overview-entity-get-subject-no-decode x) (elmo-msgdb-overview-entity-get-subject-no-decode y))) +(defun wl-summary-get-list-info (entity) + "Returns (\"ML-name\" . ML-count) of ENTITY." + (let (sequence ml-name ml-count subject return-path delivered-to mailing-list) + (setq sequence (elmo-msgdb-overview-entity-get-extra-field + entity "x-sequence") + ml-name (or (elmo-msgdb-overview-entity-get-extra-field + entity "x-ml-name") + (and sequence + (car (split-string sequence " ")))) + ml-count (or (elmo-msgdb-overview-entity-get-extra-field + entity "x-mail-count") + (elmo-msgdb-overview-entity-get-extra-field + entity "x-ml-count") + (and sequence + (cadr (split-string sequence " "))))) + (and (setq subject (elmo-msgdb-overview-entity-get-subject + entity)) + (setq subject (elmo-delete-char ?\n subject)) + (string-match "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*" subject) + (progn + (or ml-name (setq ml-name (match-string 1 subject))) + (or ml-count (setq ml-count (match-string 2 subject))))) + (and (setq return-path + (elmo-msgdb-overview-entity-get-extra-field + entity "return-path")) + (string-match "^<\\([^@>]+\\)-return-\\([0-9]+\\)-" return-path) + (progn + (or ml-name (setq ml-name (match-string 1 return-path))) + (or ml-count (setq ml-count (match-string 2 return-path))))) + (and (setq delivered-to + (elmo-msgdb-overview-entity-get-extra-field + entity "delivered-to")) + (string-match "^mailing list \\([^@]+\\)@" delivered-to) + (or ml-name (setq ml-name (match-string 1 delivered-to)))) + (and (setq mailing-list + (elmo-msgdb-overview-entity-get-extra-field + entity "mailing-list")) + (string-match "\\(^\\|; \\)contact \\([^@]+\\)-[^-@]+@" mailing-list) ; *-help@, *-owner@, etc. + (or ml-name (setq ml-name (match-string 2 mailing-list)))) + (cons (and ml-name (car (split-string ml-name " "))) + (and ml-count (string-to-int ml-count))))) + +(defun wl-summary-overview-entity-compare-by-list-info (x y) + "Compare entity X and Y by mailing-list info." + (let* ((list-info-x (wl-summary-get-list-info x)) + (list-info-y (wl-summary-get-list-info y))) + (if (equal (car list-info-x) (car list-info-y)) + (if (equal (cdr list-info-x) (cdr list-info-y)) + (wl-summary-overview-entity-compare-by-date x y) + (< (or (cdr list-info-x) 0) + (or (cdr list-info-y) 0))) + (string< (or (car list-info-x) "") + (or (car list-info-y) ""))))) + (defun wl-summary-sort-by-date () (interactive) (wl-summary-rescan "date")) @@ -870,6 +932,9 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'." (defun wl-summary-sort-by-from () (interactive) (wl-summary-rescan "from")) +(defun wl-summary-sort-by-list-info () + (interactive) + (wl-summary-rescan "list-info")) (defun wl-summary-rescan (&optional sort-by) "Rescan current folder without updating." @@ -1017,7 +1082,8 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'." (if (or wl-summary-buffer-refile-list wl-summary-buffer-copy-list wl-summary-buffer-delete-list) - (if (y-or-n-p "Marks remain to be executed. Execute them? ") + (if (y-or-n-p (format "Execute remaining marks in %s? " + (wl-summary-buffer-folder-name))) (progn (wl-summary-exec) (if (or wl-summary-buffer-refile-list @@ -1323,7 +1389,8 @@ If ARG is non-nil, checking is omitted." (number-alist (elmo-msgdb-get-number-alist msgdb)) (message-id (cdr (assq number number-alist))) (ov (elmo-msgdb-overview-get-entity message-id msgdb)) - (entity ov) + (wl-message-entity ov) + (entity ov) ; backward compatibility. (size (elmo-msgdb-overview-entity-get-size ov)) (inhibit-read-only t) (buffer-read-only nil) @@ -1822,21 +1889,13 @@ If ARG is non-nil, checking is omitted." (defun wl-summary-sort () (interactive) - (let ((sort-by (let ((input-range-list '("number" "date" "subject" "from")) - (default "date") - in) - (setq in - (completing-read - (format "Sort by (%s): " default) - (mapcar - (function (lambda (x) (cons x x))) - input-range-list))) - (if (string= in "") - default - in)))) - (if (not (member sort-by '("number" "date" "subject" "from"))) - (error "Sort by %s is not implemented" sort-by)) - (wl-summary-rescan sort-by))) + (wl-summary-rescan + (completing-read + (format "Sort by (%s): " (symbol-name wl-summary-default-sort-spec)) + (mapcar (lambda (spec) + (list (symbol-name spec))) + wl-summary-sort-specs) + nil t nil nil (symbol-name wl-summary-default-sort-spec)))) (defun wl-summary-sync-marks () "Update marks in summary." @@ -2409,9 +2468,14 @@ If ARG, without confirm." (decode-mime-charset-region (point-min)(point-max) wl-summary-buffer-mime-charset 'LF)) - (when (file-exists-p view) + (if (file-exists-p view) + (setq wl-summary-buffer-view + (wl-summary-load-file-object view)) (setq wl-summary-buffer-view - (wl-summary-load-file-object view))) + (or (wl-get-assoc-list-value + wl-summary-default-view-alist + (elmo-folder-name-internal folder)) + wl-summary-default-view))) (wl-thread-resume-entity folder) (wl-summary-open-folder folder)) (setq wl-summary-buffer-view @@ -2597,7 +2661,6 @@ If ARG, without confirm." wl-summary-alike-hashtb))) (defun wl-summary-insert-headers (overview func mime-decode) - (message "Creating subject cache...") (let (ov this last alike) (buffer-disable-undo (current-buffer)) (make-local-variable 'wl-summary-alike-hashtb) @@ -2608,7 +2671,7 @@ If ARG, without confirm." (setq this (funcall func ov)) (and this (setq this (std11-unfold-string this))) (if (equal last this) - (wl-append alike (list ov)) + (setq alike (cons ov alike)) (when last (wl-summary-put-alike alike) (insert last ?\n)) @@ -2622,54 +2685,59 @@ If ARG, without confirm." elmo-mime-charset) (when (eq mime-decode 'mime) (eword-decode-region (point-min) (point-max)))) - (message "Creating subject cache...done") (run-hooks 'wl-summary-insert-headers-hook))) (defun wl-summary-search-by-subject (entity overview) (let ((summary-buf (current-buffer)) (buf (get-buffer-create wl-summary-search-buf-name)) (folder-name (wl-summary-buffer-folder-name)) - match founds found-entity) + match founds cur result) (with-current-buffer buf (let ((case-fold-search t)) (when (or (not (string= wl-summary-search-buf-folder-name folder-name)) (zerop (buffer-size))) (setq wl-summary-search-buf-folder-name folder-name) + (message "Creating subject cache...") (wl-summary-insert-headers overview (function (lambda (x) (funcall wl-summary-subject-filter-function - (elmo-msgdb-overview-entity-get-subject-no-decode x)))) - t)) + (elmo-msgdb-overview-entity-get-subject-no-decode x)))) + t) + (message "Creating subject cache...done")) (setq match (funcall wl-summary-subject-filter-function (elmo-msgdb-overview-entity-get-subject entity))) (if (string= match "") (setq match "\n")) - (goto-char (point-min)) - (while (and (not founds) - (not (= (point) (point-max))) - (search-forward match nil t)) + (goto-char (point-max)) + (while (and (null result) + (not (= (point) (point-min))) + (search-backward match nil t)) ;; check exactly match - (when (and (eolp) - (= (point-at-bol) - (match-beginning 0))) - (setq found-entity (wl-summary-get-alike)) - (if (and found-entity - ;; Is founded entity myself or children? - (not (string= - (elmo-msgdb-overview-entity-get-id entity) - (elmo-msgdb-overview-entity-get-id - (car found-entity)))) - (with-current-buffer summary-buf + (when (and (bolp) (= (point-at-eol)(match-end 0))) + (setq founds (wl-summary-get-alike)) + (with-current-buffer summary-buf + (while founds + (when (and + ;; the first element of found-entity list exists on + ;; thread tree. + (wl-thread-get-entity + (elmo-msgdb-overview-entity-get-number + (car founds))) + ;; message id is not same as myself. + (not (string= + (elmo-msgdb-overview-entity-get-id entity) + (elmo-msgdb-overview-entity-get-id (car founds)))) + ;; not a descendant. (not (wl-thread-descendant-p (elmo-msgdb-overview-entity-get-number entity) (elmo-msgdb-overview-entity-get-number - (car found-entity)))))) - ;; return matching entity - (setq founds found-entity)))) - (if founds - (car founds)))))) + (car founds))))) + (setq result (car founds) + founds nil)) + (setq founds (cdr founds)))))) + result)))) (defun wl-summary-insert-thread-entity (entity msgdb update &optional force-insert) @@ -2748,26 +2816,29 @@ If ARG, without confirm." (overview-entity entity) (parent-id (elmo-msgdb-overview-entity-get-id parent-entity)) (number (elmo-msgdb-overview-entity-get-number entity)) - (parent-number (elmo-msgdb-overview-entity-get-number parent-entity))) + (parent-number (elmo-msgdb-overview-entity-get-number parent-entity)) + insert-line) (cond ((or (not parent-id) (string= this-id parent-id)) (goto-char (point-max)) - (beginning-of-line)) + (beginning-of-line) + (setq insert-line t)) ;; parent already exists in buffer. ((wl-summary-jump-to-msg parent-number) - (wl-thread-goto-bottom-of-sub-thread))) - (let ((inhibit-read-only t) - (buffer-read-only nil)) - (wl-summary-insert-line - (wl-summary-create-line - entity - parent-entity - nil - (elmo-msgdb-get-mark (wl-summary-buffer-msgdb) number) - (wl-thread-maybe-get-children-num number) - (wl-thread-make-indent-string thr-entity) - (wl-thread-entity-get-linked thr-entity)))))) + (wl-thread-goto-bottom-of-sub-thread) + (setq insert-line t))) + (when insert-line + (let (buffer-read-only) + (wl-summary-insert-line + (wl-summary-create-line + entity + parent-entity + nil + (elmo-msgdb-get-mark (wl-summary-buffer-msgdb) number) + (wl-thread-maybe-get-children-num number) + (wl-thread-make-indent-string thr-entity) + (wl-thread-entity-get-linked thr-entity))))))) (defun wl-summary-mark-as-unread (&optional number no-server-update @@ -3062,6 +3133,29 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." "") ".")))))) +(defun wl-summary-erase (&optional number) + "Erase message actually, without moving it to trash." + (interactive) + (if (elmo-folder-writable-p wl-summary-buffer-elmo-folder) + (let* ((buffer-num (wl-summary-message-number)) + (msg-num (or number buffer-num))) + (if (null msg-num) + (message "No message.") + (let* ((msgdb (wl-summary-buffer-msgdb)) + (entity (elmo-msgdb-overview-get-entity msg-num msgdb)) + (subject (elmo-delete-char + ?\n (or (elmo-msgdb-overview-entity-get-subject + entity) + wl-summary-no-subject-message)))) + (when (yes-or-no-p + (format "Erase \"%s\" without moving it to trash? " + (truncate-string subject 30))) + (wl-summary-unmark msg-num) + (elmo-folder-delete-messages wl-summary-buffer-elmo-folder + (list msg-num)) + (wl-summary-sync nil "update"))))) + (message "Read-only folder."))) + (defun wl-summary-read-folder (default &optional purpose ignore-error no-create init) (let ((fld (completing-read @@ -3110,7 +3204,8 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (setq c (+ c (char-width (following-char))))) (and (> c len) (setq folder (concat " " folder))) (setq rs (point)) - (put-text-property rs re 'invisible t) + (when wl-summary-width + (put-text-property rs re 'invisible t)) (put-text-property rs re 'wl-summary-destination t) (goto-char re) (wl-highlight-refile-destination-string folder) @@ -3379,7 +3474,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (defun wl-summary-refile-region (beg end) - "Put copy mark on messages in the region specified by BEG and END." + "Put refile mark on messages in the region specified by BEG and END." (interactive "r") (wl-summary-refile-region-subr "refile" beg end)) @@ -4084,7 +4179,6 @@ If ARG, exit virtual folder." (t (format "%dB" size))) ""))) -(defvar wl-summary-line-subject-minimum-length nil) (defun wl-summary-line-subject () (let (no-parent subject parent-raw-subject parent-subject) (if (string= wl-thr-indent-string "") @@ -4099,24 +4193,12 @@ If ARG, exit virtual folder." (setq parent-subject (if parent-raw-subject (elmo-delete-char ?\n parent-raw-subject))) - (setq subject - (if (or no-parent - (null parent-subject) - (not (wl-summary-subject-equal - subject parent-subject))) - (funcall wl-summary-subject-function subject) - "")) - (when (and wl-summary-line-subject-minimum-length - (< (string-width subject) - wl-summary-line-subject-minimum-length)) - (while (< (string-width subject) - wl-summary-line-subject-minimum-length) - (setq subject (concat subject " ")))) - (if (and (not wl-summary-width) - wl-summary-subject-length-limit) - (truncate-string subject - wl-summary-subject-length-limit) - subject))) + (if (or no-parent + (null parent-subject) + (not (wl-summary-subject-equal + subject parent-subject))) + (funcall wl-summary-subject-function subject) + ""))) (defun wl-summary-line-from () (elmo-delete-char ?\n @@ -4125,72 +4207,22 @@ If ARG, exit virtual folder." wl-message-entity)))) (defun wl-summary-line-list-info () - (let (sequence ml-name ml-count subject return-path) - (setq sequence (elmo-msgdb-overview-entity-get-extra-field - wl-message-entity "x-sequence") - ml-name (or (elmo-msgdb-overview-entity-get-extra-field - wl-message-entity "x-ml-name") - (and sequence - (car (split-string sequence " ")))) - ml-count (or (elmo-msgdb-overview-entity-get-extra-field - wl-message-entity "x-mail-count") - (elmo-msgdb-overview-entity-get-extra-field - wl-message-entity "x-ml-count") - (and sequence - (cadr (split-string sequence " "))))) - (and (setq subject (elmo-msgdb-overview-entity-get-subject - wl-message-entity)) - (setq subject (elmo-delete-char ?\n subject)) - (string-match "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*" subject) - (progn - (or ml-name (setq ml-name (match-string 1 subject))) - (or ml-count (setq ml-count (match-string 2 subject))))) - (and (setq return-path - (elmo-msgdb-overview-entity-get-extra-field - wl-message-entity "return-path")) - (string-match "^<\\([^@>]+\\)-return-\\([0-9]+\\)-" return-path) - (progn - (or ml-name (setq ml-name (match-string 1 return-path))) - (or ml-count (setq ml-count (match-string 2 return-path))))) - (condition-case nil - (if (and ml-name ml-count) - (format "(%s %05d)" - (car (split-string ml-name " ")) - (string-to-int ml-count)) - "") - (error "")))) + (let ((list-info (wl-summary-get-list-info wl-message-entity))) + (if (car list-info) + (format (if (cdr list-info) "(%s %05d)" "(%s)") + (car list-info) (cdr list-info)) + ""))) (defun wl-summary-line-list-count () - (let (sequence ml-count subject-string return-path) - (setq ml-count - (or (elmo-msgdb-overview-entity-get-extra-field - wl-message-entity "x-mail-count") - (elmo-msgdb-overview-entity-get-extra-field - wl-message-entity "x-ml-count") - (and (setq sequence (elmo-msgdb-overview-entity-get-extra-field - wl-message-entity "x-sequence")) - (cadr (split-string sequence " "))) - (and (setq subject-string - (elmo-msgdb-overview-entity-get-subject - wl-message-entity)) - (setq subject-string - (elmo-delete-char ?\n subject-string)) - (string-match "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*" - subject-string) - (match-string 2 subject-string)) - (and (setq return-path - (elmo-msgdb-overview-entity-get-extra-field - wl-message-entity "return-path")) - (string-match "^<[^@>]+-return-\\([0-9]+\\)-" - return-path) - (match-string 1 return-path)))) + (let ((ml-count (cdr (wl-summary-get-list-info wl-message-entity)))) (if ml-count - (format "%.0f" (string-to-number ml-count)) + (format "%.0f" ml-count) ""))) (defun wl-summary-line-attached () (let ((content-type (elmo-msgdb-overview-entity-get-extra-field - wl-message-entity "content-type"))) + wl-message-entity "content-type")) + (case-fold-search t)) (if (and content-type (string-match "multipart/mixed" content-type)) "@" @@ -4365,7 +4397,8 @@ If ARG, exit virtual folder." (wl-summary-delete-all-temp-marks) (encode-coding-region (point-min) (point-max) - (or (mime-charset-to-coding-system charset 'LF) + (or (and wl-on-mule ; one in mcs-ltn1(apel<10.4) cannot take 2 arg. + (mime-charset-to-coding-system charset 'LF)) ;; Mule 2 doesn't have `*ctext*unix'. (mime-charset-to-coding-system charset))) (write-region-as-binary (point-min)(point-max) @@ -4779,6 +4812,7 @@ Return t if message exists." (defun wl-summary-jump-to-parent-message (arg) (interactive "P") (let ((cur-buf (current-buffer)) + (disp-msg wl-summary-buffer-disp-msg) (number (wl-summary-message-number)) (regexp "\\(<[^<>]*>\\)[ \t]*$") (i -1) ;; xxx @@ -4832,17 +4866,18 @@ Return t if message exists." (setq msg-id (if (null arg) (nth 0 ref-list) ;; previous (if (<= arg i) (nth (1- arg) ref-list) - (nth i ref-list))))))) - (set-buffer cur-buf) + (nth i ref-list)))))) + (set-buffer cur-buf) + (or disp-msg (wl-summary-toggle-disp-msg 'off))) (cond ((and (null msg-id) (null msg-num)) (message "No parent message!") nil) ((and msg-id (wl-summary-jump-to-msg-by-message-id msg-id)) - (wl-summary-redisplay) + (if wl-summary-buffer-disp-msg (wl-summary-redisplay)) (message "Searching parent message...done") t) ((and msg-num (wl-summary-jump-to-msg msg-num)) - (wl-summary-redisplay) + (if wl-summary-buffer-disp-msg (wl-summary-redisplay)) (message "Searching parent message...done") t) (t ; failed. @@ -4864,9 +4899,6 @@ Reply to author if invoked with ARG." (wl-message-select-buffer wl-message-buffer) (set-buffer mes-buf) (goto-char (point-min)) - (unless wl-draft-use-frame - (split-window-vertically) - (other-window 1)) (when (setq mes-buf (wl-message-get-original-buffer)) (wl-draft-reply mes-buf arg summary-buf) (unless without-setup-hook @@ -4938,9 +4970,6 @@ Use function list is `wl-summary-write-current-folder-functions'." (wl-summary-redisplay-internal folder number)) (setq mes-buf wl-message-buffer) (wl-message-select-buffer mes-buf) - (unless wl-draft-use-frame - (split-window-vertically) - (other-window 1)) ;; get original subject. (if summary-buf (save-excursion @@ -4985,7 +5014,7 @@ Use function list is `wl-summary-write-current-folder-functions'." (if downward (forward-line 1) (forward-line -1)) - (setq skip (or (string-match skip-tmark-regexp + (setq skip (or (string-match skip-tmark-regexp (save-excursion (wl-summary-temp-mark))) (and skip-pmark-regexp @@ -5004,8 +5033,12 @@ Use function list is `wl-summary-write-current-folder-functions'." (if wl-summary-buffer-disp-msg (wl-summary-redisplay)) (if interactive - (if wl-summary-buffer-next-folder-function - (funcall wl-summary-buffer-next-folder-function) + (cond + ((and (not downward) wl-summary-buffer-prev-folder-function) + (funcall wl-summary-buffer-prev-folder-function)) + ((and downward wl-summary-buffer-next-folder-function) + (funcall wl-summary-buffer-next-folder-function)) + (t (when wl-auto-select-next (setq next-entity (if downward @@ -5017,7 +5050,7 @@ Use function list is `wl-summary-write-current-folder-functions'." '(lambda () (wl-summary-next-folder-or-exit next-entity)) (format "No more messages. Type SPC to go to %s." - (wl-summary-entity-info-msg next-entity finfo)))))))) + (wl-summary-entity-info-msg next-entity finfo))))))))) (defun wl-summary-prev (&optional interactive) (interactive) @@ -5311,6 +5344,7 @@ If ASK-CODING is non-nil, coding-system for the message is asked." (defun wl-summary-supersedes-message () "Supersede current message." (interactive) + (wl-summary-toggle-disp-msg 'off) (let ((summary-buf (current-buffer)) message-buf from) (wl-summary-set-message-buffer-or-redisplay)