From: okazaki Date: Wed, 30 Aug 2000 04:43:28 +0000 (+0000) Subject: Trim trailing whitespaces. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7220b6e37df56971f1611918893483ef555a5372;p=elisp%2Fwanderlust.git Trim trailing whitespaces. --- diff --git a/wl/tm-wl.el b/wl/tm-wl.el index 4186f60..5ca53e1 100644 --- a/wl/tm-wl.el +++ b/wl/tm-wl.el @@ -37,17 +37,17 @@ (defalias 'wl-draft-editor-mode 'mime/editor-mode) (defun wl-draft-decode-message-in-buffer (&optional default-content-type) - (when default-content-type + (when default-content-type (insert "Content-type: " default-content-type "\n") (insert "\n")) (mime-editor::edit-again 'code-conversion)) (defun wl-draft-yank-current-message-entity () - "Yank currently displayed message entity. -By setting following-method as yank-content." + "Yank currently displayed message entity. +By setting following-method as yank-content." (let ((wl-draft-buffer (current-buffer)) - (mime-viewer/following-method-alist - (list (cons 'wl-message-original-mode + (mime-viewer/following-method-alist + (list (cons 'wl-message-original-mode (function wl-draft-yank-to-draft-buffer))))) (if (get-buffer (wl-current-message-buffer)) (save-excursion @@ -64,14 +64,14 @@ By setting following-method as yank-content." (interactive) (let ((mime-viewer/content-header-filter-hook 'wl-highlight-headers) (mime-viewer/ignored-field-regexp "^:$") - (mime-editor/translate-buffer-hook + (mime-editor/translate-buffer-hook (append (list 'wl-draft-config-exec) mime-editor/translate-buffer-hook))) (mime-editor/preview-message) (let ((buffer-read-only nil)) (let ((buffer-read-only nil)) - (when wl-highlight-body-too + (when wl-highlight-body-too (wl-highlight-body)) (run-hooks 'wl-draft-preview-message-hook))))) @@ -126,7 +126,7 @@ By setting following-method as yank-content." number)) (when (string= "message/rfc822" (downcase content-type)) (message (format "Bursting...%s" (setq number (+ 1 number)))) - (setq message-entity + (setq message-entity (car (mime::content-info/children (car children)))) (save-restriction (narrow-to-region (mime::content-info/point-min message-entity) @@ -139,12 +139,12 @@ By setting following-method as yank-content." (defun wl-summary-burst () (interactive) (let ((raw-buf (wl-message-get-original-buffer)) - target + target children message-entity content-type) (save-excursion (setq target wl-summary-buffer-folder-name) (while (not (elmo-folder-writable-p target)) - (setq target + (setq target (wl-summary-read-folder wl-default-folder "to extract to "))) (wl-summary-set-message-buffer-or-redisplay) (set-buffer raw-buf) @@ -170,7 +170,7 @@ By setting following-method as yank-content." (filename (read-file-name "Save to file: " (expand-file-name (or name ".") - (or wl-mime-save-dir + (or wl-mime-save-dir wl-tmp-dir)))) tmp-buf) (while (file-directory-p filename) @@ -216,9 +216,9 @@ By setting following-method as yank-content." (mime-article/decode-message/partial beg end cal) (message "Merging...") (let (cinfo the-id parameters) - (setq subject-id + (setq subject-id (eword-decode-string - (decode-mime-charset-string + (decode-mime-charset-string (std11-field-body "Subject") wl-summary-buffer-mime-charset))) (if (string-match "[0-9\n]+" subject-id) @@ -254,7 +254,7 @@ By setting following-method as yank-content." 'wl-message-original-mode 'wl-message-exit) (set-alist 'mime-viewer/over-to-previous-method-alist 'wl-message-original-mode 'wl-message-exit) - (set-alist 'mime-viewer/over-to-next-method-alist + (set-alist 'mime-viewer/over-to-next-method-alist 'wl-message-original-mode 'wl-message-exit) (add-hook 'wl-summary-redisplay-hook 'wl-message-delete-mime-out-buf) (add-hook 'wl-message-exit-hook 'wl-message-delete-mime-out-buf) @@ -280,10 +280,10 @@ By setting following-method as yank-content." (set-alist 'mime-editor/mail-inserter-alist 'wl-draft-mode (function wl-draft-insert-get-message)) (set-alist 'mime-editor/split-message-sender-alist - 'wl-draft-mode - (cdr (assq 'mail-mode + 'wl-draft-mode + (cdr (assq 'mail-mode mime-editor/split-message-sender-alist))) - (setq mime-viewer/code-converter-alist + (setq mime-viewer/code-converter-alist (append (list (cons 'wl-message-original-mode 'mime-charset/decode-buffer)) mime-viewer/code-converter-alist)) diff --git a/wl/wl-address.el b/wl/wl-address.el index 031cc97..799349f 100644 --- a/wl/wl-address.el +++ b/wl/wl-address.el @@ -156,11 +156,11 @@ And remove domain part of mail addr." (wl-match-string 1 str)))) (split-string dn ","))))) ;; prepare candidate for uniq str - (if str + (if str (setq str (concat str wl-ldap-alias-sep (car dn-list)) dn-list (cdr dn-list)) ;; first entry, pre-build with given level - (cond + (cond ((null wl-ldap-alias-dn-level) (setq level 1)) ((eq t wl-ldap-alias-dn-level) (setq level 1000)) ; xxx, big enough ((numberp wl-ldap-alias-dn-level) @@ -204,10 +204,10 @@ Matched address lists are append to CL." result cn mails) ;; check cache (mapatoms (lambda (atom) - (if (and (string-match + (if (and (string-match (concat "^" (symbol-name atom) ".*") pat) (or (null cache) - (< (car cache) + (< (car cache) (setq len (length (symbol-name atom)))))) (setq cache (cons (or len (length (symbol-name atom))) @@ -216,11 +216,11 @@ Matched address lists are append to CL." ;; get matched entries (if cache (setq entries (cdr cache)) - (condition-case nil + (condition-case nil (progn (message "Searching in LDAP...") (setq entries (ldap-search-entries - (wl-ldap-make-filter + (wl-ldap-make-filter (concat pat "*") wl-ldap-search-attribute-type-list) nil wl-ldap-search-attribute-type-list nil t)) @@ -300,7 +300,7 @@ Matched address lists are append to CL." (setq cl (cons (cons (nth 1 addr-tuple) - (concat + (concat (wl-address-quote-specials (nth 2 addr-tuple)) " <"(nth 0 addr-tuple)">")) cl))) @@ -337,7 +337,7 @@ Matched address lists are append to CL." (setq skip-chars "^, ")) ((looking-at wl-newsgroups-complete-header-regexp) (setq completion-list wl-folder-newsgroups-hashtb))))) - (wl-complete-field-body completion-list + (wl-complete-field-body completion-list epand-char skip-chars use-ldap) (indent-for-tab-command))))) @@ -378,7 +378,7 @@ Matched address lists are append to CL." (cl wl-draft-field-completion-list)) (if (null cl) nil - (setq completion + (setq completion (let ((completion-ignore-case t)) (try-completion pattern cl))) (cond ((eq completion t) @@ -427,7 +427,7 @@ Matched address lists are append to CL." (len (length pattern)) (cl completion-list)) (when use-ldap - (setq cl (wl-address-ldap-search pattern cl))) + (setq cl (wl-address-ldap-search pattern cl))) (if (null cl) nil (setq completion (try-completion pattern cl)) @@ -461,16 +461,16 @@ Matched address lists are append to CL." (defun wl-local-address-init () (message "Updating addresses...") - (setq wl-address-list + (setq wl-address-list (wl-address-make-address-list wl-address-file)) - (setq wl-address-completion-list + (setq wl-address-completion-list (wl-address-make-completion-list wl-address-list)) (if (file-readable-p wl-alias-file) - (setq wl-address-completion-list - (append wl-address-completion-list + (setq wl-address-completion-list + (append wl-address-completion-list (wl-address-make-alist-from-alias-file wl-alias-file)))) (setq wl-address-petname-hash (elmo-make-hash)) - (mapcar + (mapcar (function (lambda (x) (elmo-set-hash-val (downcase (car x)) @@ -529,10 +529,10 @@ Matched address lists are append to CL." (insert-file-contents path) (goto-char (point-min)) (while (not (eobp)) - (if (looking-at + (if (looking-at "^\\([^#\n][^ \t\n]+\\)[ \t]+\"\\(.*\\)\"[ \t]+\"\\(.*\\)\"[ \t]*.*$") - (setq ret - (wl-append-element + (setq ret + (wl-append-element ret (list (wl-match-buffer 1) (wl-match-buffer 2) @@ -552,7 +552,7 @@ Matched address lists are append to CL." "Judge whether ADDRESS is user's or not." (member (downcase (wl-address-header-extract-address address)) (or (mapcar 'downcase wl-user-mail-address-list) - (list (downcase + (list (downcase (wl-address-header-extract-address wl-from)))))) @@ -582,7 +582,7 @@ e.g. \"Mr. bar \" (concat (, string) "\"" (cdr (, token)) "\"")) ((eq 'comment (car (, token))) (concat (, string) "(" (cdr (, token)) ")")) - (t + (t (concat (, string) (cdr (, token))))))) (defun wl-address-string-without-group-list-contents (sequence) @@ -591,7 +591,7 @@ Group list contents is not included." (let (address-string route-addr-end token seq) (while sequence (setq token (car sequence)) - (cond + (cond ;; group = phrase ":" [#mailbox] ";" ((and (eq 'specials (car token)) (string= (cdr token) ":")) @@ -614,7 +614,7 @@ Group list contents is not included." (setq address-string (wl-address-concat-token address-string (car sequence))) (setq sequence (cdr sequence)))) - (t + (t (setq address-string (wl-address-concat-token address-string token)) (setq sequence (cdr sequence))))) address-string)) @@ -622,7 +622,7 @@ Group list contents is not included." (defun wl-address-petname-delete (the-email) "Delete petname in wl-address-file." (let* ( (tmp-buf (get-buffer-create " *wl-petname-tmp*")) - (output-coding-system + (output-coding-system (mime-charset-to-coding-system wl-mime-charset))) (set-buffer tmp-buf) (message "Deleting Petname...") @@ -635,9 +635,9 @@ Group list contents is not included." (kill-buffer tmp-buf))) -(defun wl-address-petname-add-or-change (the-email - default-petname - default-realname +(defun wl-address-petname-add-or-change (the-email + default-petname + default-realname &optional change-petname) "Add petname to wl-address-file, if not registerd. If already registerd, change it." diff --git a/wl/wl-dnd.el b/wl/wl-dnd.el index fd6edb6..de96abc 100644 --- a/wl/wl-dnd.el +++ b/wl/wl-dnd.el @@ -40,7 +40,7 @@ ((featurep 'cde) (defun start-drag (event what &optional typ) (if (not typ) - (funcall (intern "cde-start-drag-internal") event nil + (funcall (intern "cde-start-drag-internal") event nil (list what)) (funcall (intern "cde-start-drag-internal") event t what)))) (t (defun start-drag (event what &optional typ)))) @@ -48,7 +48,7 @@ (defun wl-dnd-start-drag (event) (interactive "@e") (mouse-set-point event) - (start-drag event (concat + (start-drag event (concat wl-summary-buffer-folder-name " " (int-to-string (wl-summary-message-number))))) @@ -64,7 +64,7 @@ (number (string-to-int (nth 1 src-spec))) target) (setq target - (wl-folder-get-folder-name-by-id (get-text-property + (wl-folder-get-folder-name-by-id (get-text-property (point) 'wl-folder-entity-id))) (message "%s is dropped at %s." number @@ -85,7 +85,7 @@ (defun wl-dnd-set-drop-target (beg end) (let (ext substr) (setq ext (make-extent beg end)) - (set-extent-property + (set-extent-property ext 'experimental-dragdrop-drop-functions '((wl-dnd-drop-func t t (buffer-substring beg end)))))) diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 959f1fd..222da83 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -45,7 +45,7 @@ (lambda (symbol) (unless (boundp symbol) (set (make-local-variable symbol) nil)))) - '(x-face-add-x-face-version-header + '(x-face-add-x-face-version-header mail-reply-buffer mail-from-style smtp-authenticate-type @@ -109,7 +109,7 @@ ((smtp-authenticate-user wl-smtp-posting-user) ((smtp-authenticate-passphrase (elmo-get-passwd - (format "%s@%s" + (format "%s@%s" smtp-authenticate-user smtp-server)))))) (smtp-connection-type)) @@ -120,21 +120,21 @@ (let (bindings binding feature) (dolist (ext exts) (setq feature (if (listp (car ext)) (caar ext) (car ext)) - binding + binding (` ((, feature) (or (, (if (listp (car ext)) (cadar ext) (let ((wl-feature (intern - (concat "wl-" (symbol-name feature))))) - (if (boundp wl-feature) + (concat "wl-" (symbol-name feature))))) + (if (boundp wl-feature) wl-feature)))) (and (boundp '(, feature)) (, feature)))))) - (when parents + (when parents (setcdr binding (list (append '(and) parents (cdr binding))))) - (setq bindings + (setq bindings (nconc bindings (list binding) - (wl-smtp-parse-extension + (wl-smtp-parse-extension (cdr ext) (cons feature parents))))) bindings))) @@ -188,7 +188,7 @@ the `wl-smtp-features' variable." ;; ... then undo escaping of matching parentheses, ;; including matching nested parentheses. (goto-char fullname-start) - (while (re-search-forward + (while (re-search-forward "\\(\\=\\|[^\\]\\(\\\\\\\\\\)*\\)\\\\(\\(\\([^\\]\\|\\\\\\\\\\)*\\)\\\\)" fullname-end 1) (replace-match "\\1(\\3)" t) @@ -233,18 +233,18 @@ the `wl-smtp-features' variable." (setq wl-draft-field-completion-list ret-val))) (defun wl-draft-make-mail-followup-to (recipients) - (if (elmo-list-member + (if (elmo-list-member (or wl-user-mail-address-list (list (wl-address-header-extract-address wl-from))) recipients) - (let ((rlist (elmo-list-delete + (let ((rlist (elmo-list-delete (or wl-user-mail-address-list (list (wl-address-header-extract-address wl-from))) (copy-sequence recipients)))) - (if (elmo-list-member rlist (mapcar 'downcase + (if (elmo-list-member rlist (mapcar 'downcase wl-subscribed-mailing-list)) rlist - (append rlist (list (wl-address-header-extract-address + (append rlist (list (wl-address-header-extract-address wl-from))))) recipients)) @@ -254,7 +254,7 @@ the `wl-smtp-features' variable." (if wl-draft-always-delete-myself (elmo-list-delete myself cc) (if (elmo-list-member myself cc) - (if (elmo-list-member (append to cc) + (if (elmo-list-member (append to cc) (mapcar 'downcase wl-subscribed-mailing-list)) ;; member list is contained in recipients. (elmo-list-delete myself cc) @@ -263,14 +263,14 @@ the `wl-smtp-features' variable." cc)))) (defun wl-draft-forward (original-subject summary-buf) - (wl-draft "" (concat "Forward: " original-subject) + (wl-draft "" (concat "Forward: " original-subject) nil nil nil nil nil nil nil nil nil summary-buf) (goto-char (point-max)) (wl-draft-insert-message) (mail-position-on-field "To")) (defun wl-draft-reply (buf no-arg summary-buf) -; (save-excursion +; (save-excursion (let ((r-list (if no-arg wl-draft-reply-without-argument-list wl-draft-reply-with-argument-list)) (eword-lexical-analyzer '(eword-analyze-quoted-string @@ -283,7 +283,7 @@ the `wl-smtp-features' variable." to mail-followup-to cc subject in-reply-to references newsgroups from addr-alist) (set-buffer buf) - (if (wl-address-user-mail-address-p + (if (wl-address-user-mail-address-p (setq from (wl-address-header-extract-address (std11-field-body "From")))) (setq to (mapconcat 'identity (elmo-multiple-field-body "To") ",") @@ -318,8 +318,8 @@ the `wl-smtp-features' variable." (elmo-multiple-fields-body-list r-cc-list)) ",")) - (setq newsgroups (wl-concat-list (cons newsgroups - (std11-field-bodies + (setq newsgroups (wl-concat-list (cons newsgroups + (std11-field-bodies r-ng-list)) ","))) (throw 'done nil)) @@ -375,16 +375,16 @@ the `wl-smtp-features' variable." (setq cc (wl-draft-delete-myself-from-cc to cc)) (if wl-insert-mail-followup-to (progn - (setq mail-followup-to + (setq mail-followup-to (wl-draft-make-mail-followup-to (append to cc))) - (setq mail-followup-to (wl-delete-duplicates mail-followup-to + (setq mail-followup-to (wl-delete-duplicates mail-followup-to nil t)))) - (setq newsgroups (wl-parse newsgroups + (setq newsgroups (wl-parse newsgroups "[ \t\f\r\n,]*\\([^ \t\f\r\n,]+\\)") newsgroups (wl-delete-duplicates newsgroups) newsgroups (if newsgroups (mapconcat 'identity newsgroups ","))) (setq to (wl-delete-duplicates to nil t)) - (setq cc (wl-delete-duplicates + (setq cc (wl-delete-duplicates (append (wl-delete-duplicates cc nil t) to (copy-sequence to)) t t)) @@ -413,7 +413,7 @@ the `wl-smtp-features' variable." references (mapconcat 'identity references " ") references (wl-parse references "[^<]*\\(<[^>]+>\\)") references (wl-delete-duplicates references) - references (if references + references (if references (mapconcat 'identity references "\n\t"))) (wl-draft to subject in-reply-to cc references newsgroups mail-followup-to @@ -450,13 +450,13 @@ the `wl-smtp-features' variable." (interactive) (save-restriction (narrow-to-region (point)(point)) - (insert + (insert (save-excursion (set-buffer mail-reply-buffer) (if decode-it (decode-mime-charset-region (point-min) (point-max) - wl-mime-charset)) - (buffer-substring-no-properties + wl-mime-charset)) + (buffer-substring-no-properties (point-min) (point-max)))) (when ignored-fields (goto-char (point-min)) @@ -501,9 +501,9 @@ the `wl-smtp-features' variable." (defun wl-draft-open-file (&optional file) (interactive) ; "*fFile to edit: ") - (wl-draft-edit-string (elmo-get-file-string + (wl-draft-edit-string (elmo-get-file-string (or file - (read-file-name "File to edit: " + (read-file-name "File to edit: " (or wl-tmp-dir "~/")))))) (defun wl-draft-edit-string (string) @@ -544,8 +544,8 @@ the `wl-smtp-features' variable." (or (re-search-forward "\n\n" nil t) (search-forward (concat mail-header-separator "\n") nil t)) (unwind-protect - (set-buffer - (wl-draft to subject in-reply-to cc references newsgroups + (set-buffer + (wl-draft to subject in-reply-to cc references newsgroups mail-followup-to content-type content-transfer-encoding (buffer-substring (point) (point-max)) @@ -571,14 +571,14 @@ the `wl-smtp-features' variable." wl-ignored-forwarded-headers)))) (defun wl-draft-insert-get-message (dummy) - (let ((fld (completing-read - "Folder name: " + (let ((fld (completing-read + "Folder name: " (if (memq 'read-folder wl-use-folder-petname) (wl-folder-get-entity-with-petname) wl-folder-entity-hashtb) nil nil wl-default-spec 'wl-read-folder-hist)) - (number (call-interactively + (number (call-interactively (function (lambda (num) (interactive "nNumber: ") num)))) @@ -606,24 +606,24 @@ the `wl-smtp-features' variable." message-buf (buffer-live-p message-buf)) (progn - (save-excursion + (save-excursion (set-buffer summary-buf) - (setq num + (setq num (save-excursion (set-buffer message-buf) wl-message-buffer-cur-number)) - (setq entity (assoc (cdr (assq num - (elmo-msgdb-get-number-alist + (setq entity (assoc (cdr (assq num + (elmo-msgdb-get-number-alist wl-summary-buffer-msgdb))) - (elmo-msgdb-get-overview + (elmo-msgdb-get-overview wl-summary-buffer-msgdb))) (setq from (elmo-msgdb-overview-entity-get-from entity)) (setq date (elmo-msgdb-overview-entity-get-date entity))) - (setq cite-title (format "At %s,\n%s wrote:" + (setq cite-title (format "At %s,\n%s wrote:" (or date "some time ago") (wl-summary-from-func-internal (or from "you")))))) - (and cite-title + (and cite-title (insert cite-title "\n")) (mail-indent-citation))) @@ -674,7 +674,7 @@ the `wl-smtp-features' variable." ;; if Summary is on the frame, select it. (select-window sum-win) ;; if summary is not on the frame, switch to it. - (if (and wl-stay-folder-window + (if (and wl-stay-folder-window (or wl-draft-resume-folder-window fld-win)) (wl-folder-select-buffer sum-buf) (switch-to-buffer sum-buf))))))) @@ -690,7 +690,7 @@ the `wl-smtp-features' variable." (delete-file wl-draft-buffer-file-name)) (let ((msg (and wl-draft-buffer-file-name (string-match "[0-9]+$" wl-draft-buffer-file-name) - (string-to-int + (string-to-int (elmo-match-string 0 wl-draft-buffer-file-name))))) (wl-draft-config-info-operation msg 'delete)))) (set-buffer-modified-p nil) ; force kill @@ -772,7 +772,7 @@ the `wl-smtp-features' variable." (> filesize wl-draft-sendlog-max-size)) (rename-file filename (concat filename ".old") t)) (if (file-writable-p filename) - (write-region (point-min) (point-max) + (write-region (point-min) (point-max) filename t 'no-msg) (message (format "%s is not writable." filename))) (kill-buffer tmp-buf))))) @@ -941,14 +941,14 @@ non-nil." (as-binary-process (when recipients (wl-smtp-extension-bind - (let ((err (smtp-via-smtp sender recipients + (let ((err (smtp-via-smtp sender recipients (current-buffer)))) (when (not (eq err t)) (wl-draft-write-sendlog 'failed 'smtp smtp-server recipients id) (error "Sending failed; SMTP protocol error:%s" err)))) (wl-draft-set-sent-message 'mail 'sent) - (wl-draft-write-sendlog + (wl-draft-write-sendlog 'ok 'smtp smtp-server recipients id))))) (if (bufferp errbuf) (kill-buffer errbuf)))))) @@ -1047,7 +1047,7 @@ non-nil." (when wl-draft-verbose-send (if (and unplugged-via sent-via);; combined message (progn - (setq wl-draft-verbose-msg + (setq wl-draft-verbose-msg (format "Sending%s and Queuing%s..." sent-via unplugged-via)) (message (concat wl-draft-verbose-msg "done"))) @@ -1076,7 +1076,7 @@ non-nil." (lambda (local) (when (and (consp local) (car local) - (string-match + (string-match wl-draft-clone-local-variable-regexp (symbol-name (car local)))) (wl-append result (list (car local)))))) @@ -1084,7 +1084,7 @@ non-nil." result)) (defun wl-draft-send (&optional kill-when-done mes-string) - "Send current draft message. + "Send current draft message. If optional argument is non-nil, current draft buffer is killed" (interactive) (wl-draft-config-exec) @@ -1093,7 +1093,7 @@ If optional argument is non-nil, current draft buffer is killed" (y-or-n-p "Send current draft. OK?")) (let ((send-mail-function 'wl-draft-raw-send) (editing-buffer (current-buffer)) - (sending-buffer (wl-draft-generate-clone-buffer + (sending-buffer (wl-draft-generate-clone-buffer " *wl-draft-sending-buffer*" (append wl-draft-config-variables (wl-draft-clone-local-variables)))) @@ -1243,7 +1243,7 @@ If optional argument is non-nil, current draft buffer is killed" (elmo-cache-save id nil nil nil) ;; for disconnected operation (setq cache-saved t)) (if (elmo-append-msg (eword-decode-string (car fcc-list)) - (buffer-substring + (buffer-substring (point-min) (point-max)) id) (wl-draft-write-sendlog 'ok 'fcc nil (car fcc-list) id) @@ -1258,7 +1258,7 @@ If optional argument is non-nil, current draft buffer is killed" (search-forward (concat "\n" mail-header-separator "\n") nil 0) (point))) (if (bolp) - (if (bobp) + (if (bobp) t (save-excursion (forward-line -1) @@ -1299,7 +1299,7 @@ If optional argument is non-nil, current draft buffer is killed" ;; To get unused buffer name. (while (get-buffer (concat wl-draft-folder "/" (int-to-string num))) (setq num (+ 1 num))) - (setq buf-name (find-file-noselect + (setq buf-name (find-file-noselect (setq file-name (elmo-get-msg-filename wl-draft-folder num)))) @@ -1328,13 +1328,13 @@ If optional argument is non-nil, current draft buffer is killed" (insert "Subject: " (or subject "") "\n") (and newsgroups (insert "Newsgroups: " newsgroups "\n")) (and mail-followup-to (insert "Mail-Followup-To: " mail-followup-to "\n")) - (and wl-insert-mail-reply-to - (insert "Mail-Reply-To: " + (and wl-insert-mail-reply-to + (insert "Mail-Reply-To: " (wl-address-header-extract-address wl-from) "\n")) (and in-reply-to (insert "In-Reply-To: " in-reply-to "\n")) (and references (insert "References: " references "\n")) - (insert (funcall wl-generate-mailer-string-func) + (insert (funcall wl-generate-mailer-string-func) "\n") (setq wl-draft-buffer-file-name file-name) (if mail-default-reply-to @@ -1355,7 +1355,7 @@ If optional argument is non-nil, current draft buffer is killed" (if edit-again (let (start) (setq start (point)) - (when content-type + (when content-type (insert "Content-type: " content-type "\n")) (when content-transfer-encoding (insert "Content-Transfer-encoding: " content-transfer-encoding "\n")) @@ -1398,11 +1398,11 @@ If optional argument is non-nil, current draft buffer is killed" ((and (interactive-p) (null to)) (mail-position-on-field "To")) (t - (goto-char (point-max)))) + (goto-char (point-max)))) (setq wl-draft-config-exec-flag t) (setq wl-draft-buffer-cur-summary-buffer (or summary-buf (get-buffer - wl-summary-buffer-name))) + wl-summary-buffer-name))) buf-name)) (defun wl-draft-elmo-nntp-send () @@ -1464,7 +1464,7 @@ If optional argument is non-nil, current draft buffer is killed" (set-buffer buf-name) (if (not (string-match (regexp-quote wl-draft-folder) (buffer-name))) - (rename-buffer (concat wl-draft-folder "/" (buffer-name)))) + (rename-buffer (concat wl-draft-folder "/" (buffer-name)))) (auto-save-mode -1) (wl-draft-mode) (setq wl-sent-message-via nil) @@ -1550,7 +1550,7 @@ If optional argument is non-nil, current draft buffer is killed" (wl-template-insert (eval content)))) (defun wl-draft-config-sub-x-face (content) - (if (and (string-match "\\.xbm\\(\\.gz\\)?$" content) + (if (and (string-match "\\.xbm\\(\\.gz\\)?$" content) (fboundp 'x-face-insert)) ; x-face.el is installed. (x-face-insert content) (wl-draft-replace-field "X-Face" (elmo-get-file-string content t) t))) @@ -1597,7 +1597,7 @@ If optional argument is non-nil, current draft buffer is killed" "Change headers in draft preparation time." (interactive) (unless wl-draft-reedit - (let ((config-alist + (let ((config-alist (or config-alist (and (boundp 'wl-draft-prepared-config-alist) wl-draft-prepared-config-alist) ;; For compatible. @@ -1802,7 +1802,7 @@ If optional argument is non-nil, current draft buffer is killed" failure nil) (setq wl-sent-message-via nil) (wl-draft-queue-info-operation (car msgs) 'load) - (elmo-read-msg-no-cache wl-queue-folder (car msgs) + (elmo-read-msg-no-cache wl-queue-folder (car msgs) (current-buffer)) (condition-case err (setq failure (funcall @@ -1813,7 +1813,7 @@ If optional argument is non-nil, current draft buffer is killed" (error (elmo-display-error err t) (setq failure t)) - (quit + (quit (setq failure t))) (unless failure (elmo-delete-msgs wl-queue-folder (cons (car msgs) nil)) @@ -1950,11 +1950,11 @@ been implemented yet. Partial support for SWITCH-FUNCTION now supported." (cons (cons "to" to) wl-user-agent-headers-and-body-alist)))) (if subject - (if (wl-string-match-assoc "subject" + (if (wl-string-match-assoc "subject" wl-user-agent-headers-and-body-alist 'ignore-case) (setcdr - (wl-string-match-assoc "subject" + (wl-string-match-assoc "subject" wl-user-agent-headers-and-body-alist 'ignore-case) subject) diff --git a/wl/wl-expire.el b/wl/wl-expire.el index f6bc13f..fbcc23c 100644 --- a/wl/wl-expire.el +++ b/wl/wl-expire.el @@ -137,10 +137,10 @@ (elmo-create-folder dst-folder)) (error "%s: create folder failed" dst-folder)) (if wl-expire-add-seen-list - (elmo-msgdb-add-msgs-to-seen-list + (elmo-msgdb-add-msgs-to-seen-list dst-folder refile-list - msgdb + msgdb (concat wl-summary-important-mark wl-summary-read-uncached-mark))) (if (elmo-move-msgs folder @@ -185,10 +185,10 @@ If REFILE-LIST includes reserve mark message, so copy." (setq copy-reserve-message t)))) (when refile-list (if wl-expire-add-seen-list - (elmo-msgdb-add-msgs-to-seen-list + (elmo-msgdb-add-msgs-to-seen-list dst-folder refile-list - msgdb + msgdb (concat wl-summary-important-mark wl-summary-read-uncached-mark))) (unless @@ -207,9 +207,9 @@ If REFILE-LIST includes reserve mark message, so copy." (when copy-reserve-message (setq refile-list (wl-expire-delete-reserve-marked-msgs-from-list - refile-list + refile-list mark-alist)) - (when refile-list + (when refile-list (if (setq ret-val (elmo-delete-msgs folder refile-list @@ -243,7 +243,7 @@ If REFILE-LIST includes reserve mark message, so copy." (t (setq dst-folder-base (elmo-concat-path (format "%s%s" archive-spec (car spec)) - (elmo-replace-msgid-as-filename + (elmo-replace-msgid-as-filename src-folder))))) (setq dst-folder-fmt (format fmt dst-folder-base @@ -475,7 +475,7 @@ Refile to archive folder followed message date." expires) (when (and (or (setq expires (wl-expire-folder-p folder)) (progn (and (interactive-p) - (message "no match %s in wl-expire-alist" + (message "no match %s in wl-expire-alist" folder)) nil)) (or (not (interactive-p)) @@ -514,7 +514,7 @@ Refile to archive folder followed message date." (setq msgs (cdr msgs)))))) ((eq val-type 'date) (let* ((overview (elmo-msgdb-get-overview msgdb)) - (key-date (elmo-date-get-offset-datevec + (key-date (elmo-date-get-offset-datevec (timezone-fix-time (current-time-string) (current-time-zone) nil) value t))) @@ -718,7 +718,7 @@ Refile to archive folder followed message date." action src-folder msgs))) (if (file-writable-p filename) - (write-region (point-min) (point-max) + (write-region (point-min) (point-max) filename t 'no-msg) (message (format "%s is not writable." filename))) (kill-buffer tmp-buf))))) diff --git a/wl/wl-fldmgr.el b/wl/wl-fldmgr.el index 2cbdaaf..b3dc8d5 100644 --- a/wl/wl-fldmgr.el +++ b/wl/wl-fldmgr.el @@ -128,7 +128,7 @@ (defmacro wl-fldmgr-assign-id (entity &optional id) (` (let ((entity-id (or (, id) wl-folder-entity-id))) (put-text-property 0 (length (, entity)) - 'wl-folder-entity-id + 'wl-folder-entity-id entity-id (, entity))))) @@ -454,7 +454,7 @@ return value is diffs '(-new -unread -all)." ;; return value is ;; (path indent-level (group . type) previous-entity-id target-entity) ;; previous-entity-id is (id-name-alist-prev-id . entity-alist-prev-id) -;; example: +;; example: ;; '((("Desktop" group) ("ML" group) "+ml/wl") '(3 2) ("ML" . group) nil "+ml/wl") (defun wl-fldmgr-get-path-from-buffer (&optional prev) @@ -879,7 +879,7 @@ return value is diffs '(-new -unread -all)." ((looking-at wl-folder-group-regexp) ;; group (let* ((indent (wl-match-buffer 1)) (old-group (wl-folder-get-realname (wl-match-buffer 3))) - (group-entity (wl-folder-search-group-entity-by-name + (group-entity (wl-folder-search-group-entity-by-name old-group wl-folder-entity)) group) (if (eq (nth 1 group-entity) 'access) @@ -950,7 +950,7 @@ return value is diffs '(-new -unread -all)." (message "Can't insert access group") (setq group (or group-name (wl-fldmgr-read-string - (read-from-minibuffer + (read-from-minibuffer (if access "Access Type Group: " "Group: "))))) (when (or access (string-match "[\t ]*/$" group)) (setq group (if access group @@ -1272,19 +1272,19 @@ return value is diffs '(-new -unread -all)." (progn (if (string= old-petname "") (setq old-petname name)) - (while (wl-folder-buffer-search-group old-petname) - (beginning-of-line) + (while (wl-folder-buffer-search-group old-petname) + (beginning-of-line) (and (looking-at "^\\([ ]*\\)") (setq indent (wl-match-buffer 1))) (wl-fldmgr-delete-line) (wl-folder-insert-entity indent - (wl-folder-search-group-entity-by-name - name wl-folder-entity) + (wl-folder-search-group-entity-by-name + name wl-folder-entity) t))) (while (wl-folder-buffer-search-entity name searchname) (save-excursion - (beginning-of-line) + (beginning-of-line) (and (looking-at "^\\([ ]*\\)") (setq indent (wl-match-buffer 1))) (wl-fldmgr-delete-line)) @@ -1361,7 +1361,7 @@ return value is diffs '(-new -unread -all)." (if (and wl-fldmgr-make-backup (file-exists-p wl-folders-file)) (rename-file wl-folders-file (concat wl-folders-file ".bak") t)) - (let ((output-coding-system (mime-charset-to-coding-system + (let ((output-coding-system (mime-charset-to-coding-system wl-mime-charset))) (write-region (point-min) diff --git a/wl/wl-folder.el b/wl/wl-folder.el index f1d22e6..8f8cd63 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -140,9 +140,9 @@ (define-key wl-folder-mode-map 'button2 'wl-folder-click) (define-key wl-folder-mode-map 'button4 'wl-folder-prev-entity) (define-key wl-folder-mode-map 'button5 'wl-folder-next-entity) - (define-key wl-folder-mode-map [(shift button4)] + (define-key wl-folder-mode-map [(shift button4)] 'wl-folder-prev-unread) - (define-key wl-folder-mode-map [(shift button5)] + (define-key wl-folder-mode-map [(shift button5)] 'wl-folder-next-unread)) (if wl-on-nemacs (defun wl-folder-setup-mouse ()) @@ -188,7 +188,7 @@ (define-key wl-folder-mode-map "E" 'wl-folder-empty-trash) (define-key wl-folder-mode-map "F" 'wl-folder-flush-queue) (define-key wl-folder-mode-map "q" 'wl-exit) - (define-key wl-folder-mode-map "z" 'wl-folder-suspend) + (define-key wl-folder-mode-map "z" 'wl-folder-suspend) (define-key wl-folder-mode-map "\M-t" 'wl-toggle-plugged) (define-key wl-folder-mode-map "\C-t" 'wl-plugged-change) (define-key wl-folder-mode-map "<" 'beginning-of-buffer) @@ -251,14 +251,14 @@ (defun wl-folder-buffer-search-group (group) (re-search-forward - (concat + (concat "^\\([ \t]*\\)\\[[\\+-]\\]" (regexp-quote group) ":[-0-9-]+/[0-9-]+/[0-9-]+") nil t)) (defun wl-folder-buffer-search-entity (folder &optional searchname) (let ((search (or searchname (wl-folder-get-petname folder)))) (re-search-forward - (concat + (concat "^[ \t]*" (regexp-quote search) ":[-0-9\\*-]+/[0-9\\*-]+/[0-9\\*-]+") nil t))) @@ -468,7 +468,7 @@ (if (not (elmo-list-folder wl-queue-folder)) (message "No sending queue exists.") (if wl-stay-folder-window - (wl-folder-select-buffer + (wl-folder-select-buffer (wl-summary-get-buffer-create wl-queue-folder))) (wl-summary-goto-folder-subr wl-queue-folder 'force-update nil) (unwind-protect @@ -487,7 +487,7 @@ (wl-auto-select-first nil) trash-buf emptied) (if wl-stay-folder-window - (wl-folder-select-buffer + (wl-folder-select-buffer (wl-summary-get-buffer-create wl-trash-folder))) (wl-summary-goto-folder-subr wl-trash-folder 'force-update nil nil t) (setq trash-buf (current-buffer)) @@ -506,7 +506,7 @@ (if wl-stay-folder-window (wl-folder-toggle-disp-summary 'off wl-trash-folder) (switch-to-buffer cur-buf)) - (and trash-buf + (and trash-buf (kill-buffer trash-buf))))) (defun wl-folder-goto-top-of-current-folder (&optional arg) @@ -515,7 +515,7 @@ Optional argument ARG is repeart count." (interactive "P") (if (re-search-backward "^ *\\[[\\+-]\\]" nil t (if arg (prefix-numeric-value arg))) - (beginning-of-line) + (beginning-of-line) (goto-char (point-min)))) (defun wl-folder-goto-bottom-of-current-folder (indent) @@ -537,7 +537,7 @@ Optional argument ARG is repeart count." (goto-char (point-max)))) (defsubst wl-folder-update-group (entity diffs &optional is-group) - (let ((path (wl-folder-get-path + (let ((path (wl-folder-get-path wl-folder-entity (wl-folder-get-entity-id entity) entity))) @@ -586,7 +586,7 @@ Optional argument ARG is repeart count." (interactive "P") (beginning-of-line) (let (entity beg end indent opened fname err fld-name) - (cond + (cond ((looking-at wl-folder-group-regexp) (save-excursion (setq fname (wl-folder-get-realname (wl-match-buffer 3))) @@ -594,7 +594,7 @@ Optional argument ARG is repeart count." (setq opened (wl-match-buffer 2)) (if (string= opened "+") (progn - (setq entity (wl-folder-search-group-entity-by-name + (setq entity (wl-folder-search-group-entity-by-name fname wl-folder-entity)) (setq beg (point)) @@ -616,7 +616,7 @@ Optional argument ARG is repeart count." (quit (setq err t) (setcdr (assoc fname wl-folder-group-alist) nil)) - (error + (error (elmo-display-error errobj t) (ding) (setq err t) @@ -634,7 +634,7 @@ Optional argument ARG is repeart count." (progn (wl-folder-goto-bottom-of-current-folder indent) (beginning-of-line) (point)))) - (setq entity (wl-folder-search-group-entity-by-name + (setq entity (wl-folder-search-group-entity-by-name fname wl-folder-entity)) (let ((buffer-read-only nil)) @@ -649,10 +649,10 @@ Optional argument ARG is repeart count." ((setq fld-name (wl-folder-entity-name)) (if wl-on-nemacs (progn - (wl-folder-set-current-entity-id + (wl-folder-set-current-entity-id (wl-folder-get-entity-from-buffer)) (setq fld-name (wl-folder-get-realname fld-name))) - (wl-folder-set-current-entity-id + (wl-folder-set-current-entity-id (get-text-property (point) 'wl-folder-entity-id)) (setq fld-name (wl-folder-get-folder-name-by-id wl-folder-buffer-cur-entity-id))) @@ -663,7 +663,7 @@ Optional argument ARG is repeart count." (if (and summary-buf (get-buffer-window summary-buf)) (delete-window))) - (wl-summary-goto-folder-subr fld-name + (wl-summary-goto-folder-subr fld-name (wl-summary-get-sync-range fld-name) nil arg t))))) (set-buffer-modified-p nil)) @@ -690,7 +690,7 @@ Optional argument ARG is repeart count." (save-excursion (if entity () (setq entity - (wl-folder-search-group-entity-by-name + (wl-folder-search-group-entity-by-name (wl-folder-get-realname (wl-match-buffer 3)) wl-folder-entity))) (let ((inhibit-read-only t) @@ -716,7 +716,7 @@ Optional argument ARG is repeart count." (quit (setq err t) (setcdr (assoc (car entity) wl-folder-group-alist) nil)) - (error + (error (elmo-display-error errobj t) (ding) (setq err t) @@ -769,7 +769,7 @@ Optional argument ARG is repeart count." (save-excursion (cond ((consp entity) - (let ((flist (if auto + (let ((flist (if auto (elmo-delete-if 'wl-folder-no-auto-check-folder-p (nth 2 entity)) @@ -795,12 +795,12 @@ Optional argument ARG is repeart count." (t (message "Uncheck(unplugged) \"%s\"" entity))))) (if ret-val - (message "Checking \"%s\" is done." + (message "Checking \"%s\" is done." (if (consp entity) (car entity) entity))) (run-hooks 'wl-folder-check-entity-hook) ret-val)) -;; All contained folders are imap4 and persistent flag, then +;; All contained folders are imap4 and persistent flag, then ;; use server diff. (defun wl-folder-use-server-diff-p (folder) (let ((spec (elmo-folder-get-spec folder))) @@ -826,7 +826,7 @@ Optional argument ARG is repeart count." (if (wl-string-member entity wl-strict-diff-folders) (elmo-strict-folder-diff entity) (elmo-folder-diff entity)) - (error + (error ;; maybe not exist folder. (if (and (not (memq 'elmo-open-error (get (car err) 'error-conditions))) @@ -846,9 +846,9 @@ Optional argument ARG is repeart count." (setq nums (cons unsync nomif))) (wl-folder-entity-hashtb-set wl-folder-entity-hashtb entity (list (car nums) - (setq + (setq unread - (or + (or ;; If server diff, All unreads are ;; treated as unsync. (if elmo-use-server-diff 0) @@ -951,7 +951,7 @@ Optional argument ARG is repeart count." (defun wl-folder-set-current-entity-id (entity-id) (let ((buf (get-buffer wl-folder-buffer-name))) (if buf - (save-excursion + (save-excursion (set-buffer buf) (setq wl-folder-buffer-cur-entity-id entity-id) (setq wl-folder-buffer-cur-path (wl-folder-get-path wl-folder-entity @@ -966,7 +966,7 @@ Optional argument ARG is repeart count." (goto-char wl-folder-buffer-cur-point))))) (defun wl-folder-check-current-entity () - "Check folder at position. + "Check folder at position. If current line is group folder, check all sub entries." (interactive) (let* ((entity-name (wl-folder-get-entity-from-buffer)) @@ -1001,13 +1001,13 @@ If current line is group folder, check all sub entries." (or (< 0 new) (< 0 unread))) (save-window-excursion (save-excursion - (wl-summary-goto-folder-subr entity + (wl-summary-goto-folder-subr entity (wl-summary-get-sync-range entity) nil nil nil t) (wl-summary-exit)))))))) (defun wl-folder-sync-current-entity (&optional unread-only) - "Synchronize the folder at position. + "Synchronize the folder at position. If current line is group folder, check all subfolders." (interactive "P") (save-excursion @@ -1043,7 +1043,7 @@ If current line is group folder, check all subfolders." (if (or (< 0 new) (< 0 unread)) (save-window-excursion (save-excursion - (wl-summary-goto-folder-subr entity + (wl-summary-goto-folder-subr entity (wl-summary-get-sync-range entity) nil) (wl-summary-mark-as-read-all) @@ -1051,7 +1051,7 @@ If current line is group folder, check all subfolders." (sit-for 0)))))) (defun wl-folder-mark-as-read-all-current-entity () - "Mark as read all messages in the folder at position. + "Mark as read all messages in the folder at position. If current line is group folder, all subfolders are marked." (interactive) (save-excursion @@ -1080,7 +1080,7 @@ If current line is group folder, all subfolders are marked." entity) (while (< (point) end) ;; normal folder entity - (if (looking-at "^[\t ]*\\([^\\[]+\\):\\(.*\\)\n") + (if (looking-at "^[\t ]*\\([^\\[]+\\):\\(.*\\)\n") (save-excursion (setq entity (wl-folder-get-entity-from-buffer)) (if (not (elmo-folder-plugged-p entity)) @@ -1102,7 +1102,7 @@ If current line is group folder, all subfolders are marked." (goto-char beg) (while (< (point) end) ;; normal folder entity - (if (looking-at "^[\t ]*\\([^\\[]+\\):\\(.*\\)\n") + (if (looking-at "^[\t ]*\\([^\\[]+\\):\\(.*\\)\n") (save-excursion (let ((inhibit-read-only t) entity) @@ -1124,7 +1124,7 @@ If current line is group folder, all subfolders are marked." (goto-char beg) (while (< (point) end) ;; normal folder entity - (if (looking-at "^[\t ]*\\([^\\[]+\\):\\(.*\\)\n") + (if (looking-at "^[\t ]*\\([^\\[]+\\):\\(.*\\)\n") (save-excursion (let ((inhibit-read-only t) entity) @@ -1178,7 +1178,7 @@ If current line is group folder, all subfolders are marked." (while (setq entity (wl-create-folder-entity-from-buffer)) (unless (eq entity 'ignore) (wl-append flist (list entity)))) - (if (looking-at "^[\t ]*}[\t ]*$") ; end of group + (if (looking-at "^[\t ]*}[\t ]*$") ; end of group (progn (goto-char (+ 1 (match-end 0))) (if (wl-string-assoc name wl-folder-petname-alist) @@ -1198,7 +1198,7 @@ If current line is group folder, all subfolders are marked." ;; (setq flist (car flist)) ;; (list name 'access flist unsublist))) (append (list name 'access) (wl-create-access-folder-entity name)))) - ;((looking-at "^[\t ]*\\([^\t \n}]+\\)[\t ]*\\(\"[^\"]*\"\\)?[\t ]*$") ; normal folder entity + ;((looking-at "^[\t ]*\\([^\t \n}]+\\)[\t ]*\\(\"[^\"]*\"\\)?[\t ]*$") ; normal folder entity ((looking-at "^[\t ]*=[ \t]+\\([^\n]+\\)$"); petname definition (goto-char (+ 1 (match-end 0))) (let ((rest (elmo-match-buffer 1)) @@ -1248,7 +1248,7 @@ If current line is group folder, all subfolders are marked." (setq ret-val (list wl-folder-desktop-name 'group ret-val)))) (defun wl-folder-entity-assign-id (entity &optional hashtb on-noid) - (let ((hashtb (or hashtb + (let ((hashtb (or hashtb (setq wl-folder-entity-id-name-hashtb (elmo-make-hash wl-folder-entity-id)))) (entities (list entity)) @@ -1262,7 +1262,7 @@ If current line is group folder, all subfolders are marked." 'wl-folder-entity-id (car entity)))) (put-text-property 0 (length (car entity)) - 'wl-folder-entity-id + 'wl-folder-entity-id wl-folder-entity-id (car entity)) (wl-folder-set-id-name wl-folder-entity-id @@ -1275,8 +1275,8 @@ If current line is group folder, all subfolders are marked." (get-text-property 0 'wl-folder-entity-id entity))) - (put-text-property 0 (length entity) - 'wl-folder-entity-id + (put-text-property 0 (length entity) + 'wl-folder-entity-id wl-folder-entity-id entity) (wl-folder-set-id-name wl-folder-entity-id @@ -1327,7 +1327,7 @@ If current line is group folder, all subfolders are marked." (delete-window) (select-window (get-buffer-window cur-buf)))) (t - (setq wl-folder-buffer-disp-summary + (setq wl-folder-buffer-disp-summary (not wl-folder-buffer-disp-summary)) (let ((cur-buf (current-buffer)) folder-name) @@ -1335,7 +1335,7 @@ If current line is group folder, all subfolders are marked." (setq folder-name (wl-folder-get-entity-from-buffer)) (if wl-folder-buffer-disp-summary (progn - (wl-folder-select-buffer + (wl-folder-select-buffer (wl-summary-get-buffer-create folder-name)) (unwind-protect (wl-summary-goto-folder-subr folder-name 'no-sync nil) @@ -1486,7 +1486,7 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (save-excursion (let (buf) (if (setq buf (get-buffer wl-folder-buffer-name)) - (wl-folder-entity-hashtb-set + (wl-folder-entity-hashtb-set wl-folder-entity-hashtb name value buf)) ;; (elmo-folder-set-info-hashtb (elmo-string name) ;; nil @@ -1529,7 +1529,7 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (defun wl-folder-update-newest (indent entity) (let (ret-val new unread all) - (cond + (cond ((consp entity) (let ((inhibit-read-only t) (buffer-read-only nil) @@ -1556,7 +1556,7 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (setq flist-unsub (nth 2 update-flist)) (setq removed (nth 3 update-flist)) (elmo-msgdb-flist-save - (car entity) + (car entity) (list (wl-folder-make-save-access-list flist) (wl-folder-make-save-access-list flist-unsub))) @@ -1579,7 +1579,7 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (defun wl-folder-insert-entity (indent entity &optional onlygroup) (let (ret-val new unread all) - (cond + (cond ((consp entity) (let ((inhibit-read-only t) (buffer-read-only nil) @@ -1611,7 +1611,7 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." ; (setq flist-unsub (nth 2 update-flist)) ; (setq removed (nth 3 update-flist)) ; (elmo-msgdb-flist-save -; (car entity) +; (car entity) ; (list ; (wl-folder-make-save-access-list flist) ; (wl-folder-make-save-access-list flist-unsub))) @@ -1634,17 +1634,17 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." ; entity nil) ; wl-folder-newsgroups-hashtb)))) ; (message "fetching folder entries...done.")) - (insert indent "[" (if as-opened "-" "+") "]" + (insert indent "[" (if as-opened "-" "+") "]" (wl-folder-get-petname (car entity))) (setq group-name-end (point)) (insert ":0/0/0\n") (put-text-property beg (point) 'wl-folder-entity-id - (get-text-property 0 'wl-folder-entity-id + (get-text-property 0 'wl-folder-entity-id (car entity))) (when removed (setq beg (point)) (while removed - (insert indent " " + (insert indent " " wl-folder-removed-mark (if (listp (car removed)) (concat "[+]" (caar removed)) @@ -1659,7 +1659,7 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (i 0)) (while flist (setq ret-val - (wl-folder-insert-entity + (wl-folder-insert-entity (concat indent " ") (car flist))) (setq new (+ (or new 0) (or (nth 0 ret-val) 0))) (setq unread (+ (or unread 0) (or (nth 1 ret-val) 0))) @@ -1680,15 +1680,15 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (setq ret-val (list new unread all)) (wl-highlight-folder-current-line ret-val))) (setq ret-val (wl-folder-calc-finfo entity)) - (insert indent "[" (if as-opened "-" "+") "]" - (wl-folder-get-petname (car entity)) - (format ":%d/%d/%d" + (insert indent "[" (if as-opened "-" "+") "]" + (wl-folder-get-petname (car entity)) + (format ":%d/%d/%d" (or (nth 0 ret-val) 0) (or (nth 1 ret-val) 0) (or (nth 2 ret-val) 0)) "\n") (put-text-property beg (point) 'wl-folder-entity-id - (get-text-property 0 'wl-folder-entity-id + (get-text-property 0 'wl-folder-entity-id (car entity))) (save-excursion (forward-line -1) (wl-highlight-folder-current-line ret-val))))) @@ -1699,7 +1699,7 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." beg) (setq beg (point)) (insert indent (wl-folder-get-petname entity) - (format ":%s/%s/%s\n" + (format ":%s/%s/%s\n" (or (setq new (nth 0 nums)) "*") (or (setq unread (and (nth 0 nums)(nth 1 nums) (+ (nth 0 nums)(nth 1 nums)))) @@ -1718,7 +1718,7 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (wl-folder-check-entity wl-folder-entity)) (defun wl-folder-entity-hashtb-set (entity-hashtb name value buffer) - (let (cur-val + (let (cur-val (new-diff 0) (unread-diff 0) (all-diff 0) @@ -1726,7 +1726,7 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." entity-list) (setq cur-val (wl-folder-get-entity-info name entity-hashtb)) (setq new-diff (- (or (nth 0 value) 0) (or (nth 0 cur-val) 0))) - (setq unread-diff + (setq unread-diff (+ new-diff (- (or (nth 1 value) 0) (or (nth 1 cur-val) 0)))) (setq all-diff (- (or (nth 2 value) 0) (or (nth 2 cur-val) 0))) @@ -1868,7 +1868,7 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." ((consp entity) (if (eq (nth 1 entity) 'access) (when (eq (elmo-folder-get-type (car entity)) 'nntp) - (wl-append folders + (wl-append folders (wl-folder-create-newsgroups-from-nntp-access entity)) (setq make-hashtb t)) (and entities @@ -2000,16 +2000,16 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (message "Initializing folder...done.")) (defun wl-folder-get-realname (petname) - (or (car - (wl-string-rassoc + (or (car + (wl-string-rassoc petname wl-folder-petname-alist)) petname)) (defun wl-folder-get-petname (folder) - (or (cdr - (wl-string-assoc - folder + (or (cdr + (wl-string-assoc + folder wl-folder-petname-alist)) folder)) @@ -2031,24 +2031,24 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (save-excursion (beginning-of-line) (setq id (get-text-property (point) 'wl-folder-entity-id)) - (when (looking-at "^[ ]*\\(.*\\):\\([0-9\\*-]*\\)/\\([0-9\\*-]*\\)/\\([0-9\\*]*\\)") - ;;(looking-at "^[ ]*\\([^\\[].+\\):\\([0-9\\*-]*/[0-9\\*-]*/[0-9\\*]*\\)") - (setq cur-new (string-to-int + (when (looking-at "^[ ]*\\(.*\\):\\([0-9\\*-]*\\)/\\([0-9\\*-]*\\)/\\([0-9\\*]*\\)") + ;;(looking-at "^[ ]*\\([^\\[].+\\):\\([0-9\\*-]*/[0-9\\*-]*/[0-9\\*]*\\)") + (setq cur-new (string-to-int (wl-match-buffer 2))) - (setq cur-unread (string-to-int + (setq cur-unread (string-to-int (wl-match-buffer 3))) - (setq cur-all (string-to-int + (setq cur-all (string-to-int (wl-match-buffer 4))) (delete-region (match-beginning 2) (match-end 4)) (goto-char (match-beginning 2)) - (insert (format "%s/%s/%s" + (insert (format "%s/%s/%s" (setq new-new (+ cur-new (nth 0 diffs))) (setq new-unread (+ cur-unread (nth 1 diffs))) (setq new-all (+ cur-all (nth 2 diffs))))) (put-text-property (match-beginning 2) (point) 'wl-folder-entity-id id) - (if wl-use-highlight-mouse-line + (if wl-use-highlight-mouse-line (put-text-property (match-beginning 2) (point) 'mouse-face 'highlight)) (wl-highlight-folder-group-line (list new-new new-unread new-all)) @@ -2062,13 +2062,13 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (save-excursion (beginning-of-line) (setq id (get-text-property (point) 'wl-folder-entity-id)) - (if (looking-at "^[ ]*\\(.*\\):\\([0-9\\*-]*/[0-9\\*-]*/[0-9\\*]*\\)") - ;;(looking-at "^[ ]*\\([^\\[].+\\):\\([0-9\\*-]*/[0-9\\*-]*/[0-9\\*]*\\)") + (if (looking-at "^[ ]*\\(.*\\):\\([0-9\\*-]*/[0-9\\*-]*/[0-9\\*]*\\)") + ;;(looking-at "^[ ]*\\([^\\[].+\\):\\([0-9\\*-]*/[0-9\\*-]*/[0-9\\*]*\\)") (progn (delete-region (match-beginning 2) (match-end 2)) (goto-char (match-beginning 2)) - (insert (format "%s/%s/%s" + (insert (format "%s/%s/%s" (or (nth 0 nums) "*") (or (and (nth 0 nums)(nth 1 nums) (+ (nth 0 nums)(nth 1 nums))) @@ -2107,7 +2107,7 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (if (and summary-buf (get-buffer-window summary-buf)) (delete-window))) - (wl-summary-goto-folder-subr fld-name + (wl-summary-goto-folder-subr fld-name (wl-summary-get-sync-range fld-name) nil sticky t))) @@ -2295,7 +2295,7 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (wl-folder-get-petname (if (stringp (car path)) (car path) - (wl-folder-get-folder-name-by-id + (wl-folder-get-folder-name-by-id (car path)))))) (beginning-of-line) (setq path (cdr path)) @@ -2541,15 +2541,15 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." ((consp entity) (let ((flist (nth 2 entity)) (sum-done 0) - (sum-all 0) + (sum-all 0) result) (while flist (setq result (wl-folder-prefetch-entity (car flist))) (setq sum-done (+ sum-done (car result))) (setq sum-all (+ sum-all (cdr result))) (setq flist (cdr flist))) - (message "Prefetched %d/%d message(s) in \"%s\"." - sum-done sum-all + (message "Prefetched %d/%d message(s) in \"%s\"." + sum-done sum-all (wl-folder-get-petname (car entity))) (cons sum-done sum-all))) ((stringp entity) @@ -2559,7 +2559,7 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." entity)) wl-summary-highlight)) wl-summary-exit-next-move - wl-auto-select-first ret-val + wl-auto-select-first ret-val count) (setq count (or (car nums) 0)) (setq count (+ count (wl-folder-count-incorporates entity))) @@ -2567,7 +2567,7 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (< 0 count)) (save-window-excursion (save-excursion - (wl-summary-goto-folder-subr entity + (wl-summary-goto-folder-subr entity (wl-summary-get-sync-range entity) nil) (setq ret-val (wl-summary-incorporate)) @@ -2585,7 +2585,7 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." sum)) (defun wl-folder-prefetch-current-entity (&optional no-check) - "Prefetch all uncached messages in the folder at position. + "Prefetch all uncached messages in the folder at position. If current line is group folder, all subfolders are prefetched." (interactive "P") (save-excursion @@ -2623,7 +2623,7 @@ If current line is group folder, all subfolders are prefetched." (wl-summary-exit)))))))) (defun wl-folder-drop-unsync-current-entity (&optional force-check) - "Drop all unsync messages in the folder at position. + "Drop all unsync messages in the folder at position. If current line is group folder, all subfolders are dropped. If optional arg exists, don't check any folders." (interactive "P") @@ -2633,7 +2633,7 @@ If optional arg exists, don't check any folders." wl-folder-check-entity-hook summary-buf entity) (when (and entity-name - (y-or-n-p (format + (y-or-n-p (format "Drop all unsync messages in %s?" entity-name))) (setq entity (if group @@ -2664,8 +2664,8 @@ If optional arg exists, don't check any folders." (defun wl-folder-create-subr (entity) (if (not (elmo-folder-creatable-p entity)) (error "Folder %s is not found" entity) - (if (y-or-n-p - (format "Folder %s does not exist, create it?" + (if (y-or-n-p + (format "Folder %s does not exist, create it?" entity)) (progn (setq wl-folder-entity-hashtb diff --git a/wl/wl-highlight.el b/wl/wl-highlight.el index dffc78c..d30040a 100644 --- a/wl/wl-highlight.el +++ b/wl/wl-highlight.el @@ -746,14 +746,14 @@ (beginning-of-line) (setq bol (point)) (save-excursion (end-of-line) (setq eol (point))) - (setq fsymbol + (setq fsymbol (let ((unsync (nth 0 numbers)) (unread (nth 1 numbers))) (cond ((and unsync (eq unsync 0)) (if (and unread (> unread 0)) 'wl-highlight-folder-unread-face 'wl-highlight-folder-zero-face)) - ((and unsync + ((and unsync (>= unsync wl-folder-many-unsync-threshold)) 'wl-highlight-folder-many-face) (t @@ -767,7 +767,7 @@ (catch 'highlighted (while highlights (setq fregexp (symbol-value - (intern (format "wl-highlight-folder-%s-regexp" + (intern (format "wl-highlight-folder-%s-regexp" (car highlights))))) (setq fsymbol (intern (format "wl-highlight-folder-%s-face" (car highlights)))) @@ -796,7 +796,7 @@ ((string= temp-mark "D") (setq fsymbol 'wl-highlight-summary-deleted-face)) ((string= temp-mark "*") - (setq fsymbol 'wl-highlight-summary-temp-face)) + (setq fsymbol 'wl-highlight-summary-temp-face)) ((string= mark wl-summary-new-mark) (setq fsymbol 'wl-highlight-summary-new-face)) ((member mark (list wl-summary-unread-cached-mark @@ -812,7 +812,7 @@ (setq fsymbol 'wl-highlight-summary-thread-top-face) (setq fsymbol 'wl-highlight-summary-normal-face)))) (put-text-property 0 (length line) 'face fsymbol line)) - (if wl-use-highlight-mouse-line + (if wl-use-highlight-mouse-line (put-text-property 0 (length line) 'mouse-face 'highlight line))) (defun-hilit2 wl-highlight-summary-current-line (&optional smark regexp temp-too) @@ -820,9 +820,9 @@ (save-excursion (let ((inhibit-read-only t) (case-fold-search nil) temp-mark status-mark - (sregexp (concat - "^" - wl-summary-buffer-number-regexp + (sregexp (concat + "^" + wl-summary-buffer-number-regexp "\\(.\\)\\(.\\)../..\(.*\)..:.. \\(" wl-highlight-thread-indent-string-regexp "\\)[[<]")) @@ -830,7 +830,7 @@ (beginning-of-line) (setq bol (point)) (save-excursion (end-of-line) (setq eol (point))) - (if smark + (if smark (setq status-mark smark) (setq looked-at (looking-at sregexp)) (setq status-mark (buffer-substring (match-beginning 2) @@ -851,7 +851,7 @@ ((string= temp-mark "o") (setq fsymbol 'wl-highlight-summary-refiled-face))))) (if (not fsymbol) - (cond + (cond ((and (string= temp-mark "+") (member status-mark (list wl-summary-unread-cached-mark wl-summary-unread-uncached-mark @@ -877,12 +877,12 @@ ;; (t (if (and looked-at (string= (buffer-substring - (match-beginning 3) + (match-beginning 3) (match-end 3)) "")) (setq fsymbol 'wl-highlight-summary-thread-top-face) (setq fsymbol 'wl-highlight-summary-normal-face))))) (put-text-property bol eol 'face fsymbol) - (if wl-use-highlight-mouse-line + (if wl-use-highlight-mouse-line (put-text-property bol;(1- (match-end 0)) eol 'mouse-face 'highlight)) ; (put-text-property (match-beginning 3) (match-end 3) @@ -923,7 +923,7 @@ Variables used: (if (not wl-on-nemacs) (defsubst wl-delete-all-overlays () - (mapcar (lambda (x) + (mapcar (lambda (x) (delete-overlay x)) (overlays-in (point-min) (point-max))))) @@ -942,7 +942,7 @@ Variables used: (get-text-property (point) 'wl-folder-entity-id) (car fp)) (setq fp (cdr fp)) - (setq ov (make-overlay + (setq ov (make-overlay (match-beginning 1) (match-end 1))) (setq wl-folder-buffer-cur-point (point)) @@ -950,7 +950,7 @@ Variables used: (forward-line 1))))) (defun-hilit2 wl-highlight-refile-destination-string (string) - (put-text-property 0 (length string) 'face + (put-text-property 0 (length string) 'face 'wl-highlight-refile-destination-face string)) @@ -964,7 +964,7 @@ Variables used: Faces used: wl-highlight-summary-unread-face unread messages wl-highlight-summary-important-face important messages - wl-highlight-summary-deleted-face messages mark as deleted + wl-highlight-summary-deleted-face messages mark as deleted wl-highlight-summary-refiled-face messages mark as refiled wl-highlight-summary-copied-face messages mark as copied wl-highlight-summary-new-face new messages @@ -972,7 +972,7 @@ Faces used: Variables used: wl-highlight-summary-unread-regexp matches unread messages wl-highlight-summary-important-regexp matches important messages - wl-highlight-summary-deleted-regexp matches messages mark as deleted + wl-highlight-summary-deleted-regexp matches messages mark as deleted wl-highlight-summary-refiled-regexp matches messages mark as refiled wl-highlight-summary-copied-regexp matches messages mark as copied wl-highlight-summary-new-regexp matches new messages @@ -1082,9 +1082,9 @@ Returns start point of signature." (and (re-search-backward "^[^A-Za-z0-9> \t\n]+ *$" beg t) (> (- (match-end 0) (match-beginning 0)) 10);; "10" is a magic number. - (re-search-backward - (concat "^" - (regexp-quote (buffer-substring (match-beginning 0) (match-end 0))) + (re-search-backward + (concat "^" + (regexp-quote (buffer-substring (match-beginning 0) (match-end 0))) "$") beg t))) ;; look for user specified signature-separator @@ -1102,13 +1102,13 @@ Returns start point of signature." Faces used: wl-highlight-message-headers the part before the colon wl-highlight-message-header-contents the part after the colon - wl-highlight-message-important-header-contents contents of \"special\" + wl-highlight-message-important-header-contents contents of \"special\" headers - wl-highlight-message-important-header-contents2 contents of \"special\" + wl-highlight-message-important-header-contents2 contents of \"special\" headers - wl-highlight-message-unimportant-header-contents contents of unimportant + wl-highlight-message-unimportant-header-contents contents of unimportant headers - wl-highlight-message-cited-text quoted text from other + wl-highlight-message-cited-text quoted text from other messages wl-highlight-message-citation-header header of quoted texts wl-highlight-message-signature signature @@ -1137,7 +1137,7 @@ interpreted as cited text.)" (widen) ;; take off signature (if (and hack-sig (not too-big)) - (setq end (funcall wl-highlight-signature-search-func + (setq end (funcall wl-highlight-signature-search-func (- end wl-max-signature-size) end))) (if hack-sig (put-text-property end (point-max) @@ -1149,8 +1149,8 @@ interpreted as cited text.)" (goto-char start) ;; If this search fails then the narrowing performed above ;; is sufficient - (if (re-search-forward (format - "^$\\|%s" + (if (re-search-forward (format + "^$\\|%s" (regexp-quote mail-header-separator)) nil t) (narrow-to-region (point-min) (point))) (goto-char start) @@ -1191,9 +1191,9 @@ interpreted as cited text.)" nil (let (prefix prefix-face-alist pair end) (while (not (eobp)) - (cond + (cond ((null wl-highlight-force-citation-header-regexp) - nil) + nil) ((looking-at wl-highlight-force-citation-header-regexp) (setq current 'wl-highlight-message-citation-header) (setq end (match-end 0))) @@ -1206,11 +1206,11 @@ interpreted as cited text.)" (unless pair (setq prefix-face-alist (append prefix-face-alist - (list - (setq pair - (cons + (list + (setq pair + (cons prefix - (nth + (nth (% (length prefix-face-alist) (length wl-highlight-citation-face-list)) diff --git a/wl/wl-message.el b/wl/wl-message.el index 019ae60..d080cfb 100644 --- a/wl/wl-message.el +++ b/wl/wl-message.el @@ -60,7 +60,7 @@ (defvar wl-original-buffer-cur-number nil) (defvar wl-original-buffer-cur-msgdb nil) -(mapcar +(mapcar (function make-variable-buffer-local) (list 'wl-message-buffer-cur-folder 'wl-message-buffer-cur-number)) @@ -126,7 +126,7 @@ (if (bobp) () (scroll-down)) - (select-window (get-buffer-window cur-buf)))) + (select-window (get-buffer-window cur-buf)))) (defun wl-message-scroll-up (amount) (let ((view-message-buffer (get-buffer-create wl-message-buf-name)) @@ -196,7 +196,7 @@ (save-excursion (set-buffer inbuf) (let ((buffer-read-only nil)) - (decode-mime-charset-region (point-min) + (decode-mime-charset-region (point-min) (save-excursion (goto-char (point-min)) (re-search-forward "^$" nil t) @@ -207,7 +207,7 @@ (save-excursion (set-buffer inbuf) (let ((buffer-read-only nil)) - (save-excursion + (save-excursion (set-buffer outbuf) (elmo-set-buffer-multibyte nil)) (copy-to-buffer outbuf (point-min) (point-max)) @@ -227,7 +227,7 @@ (save-excursion (set-buffer inbuf) (let ((buffer-read-only nil)) - (decode-mime-charset-region (point-min) + (decode-mime-charset-region (point-min) (save-excursion (goto-char (point-min)) (re-search-forward "^$" nil t) @@ -240,7 +240,7 @@ (interactive) (let ((cur-buf (current-buffer)) (view-message-buffer (get-buffer-create wl-message-buf-name)) - ret-val) + ret-val) (wl-select-buffer view-message-buffer) (move-to-window-line 0) (if (and wl-break-pages @@ -259,9 +259,9 @@ (static-if (fboundp 'luna-make-entity) (defsubst wl-message-make-mime-entity (backend number backend folder msgdb) (luna-make-entity (mm-expand-class-name 'elmo) - :location (get-buffer-create + :location (get-buffer-create (concat mmelmo-entity-buffer-name "0")) - :imap (eq backend 'elmo-imap4) + :imap (eq backend 'elmo-imap4) :folder folder :number number :msgdb msgdb :size 0)) @@ -339,16 +339,16 @@ (let ((ret-val (get-buffer wl-original-buf-name))) (if (not ret-val) (save-excursion - (set-buffer (setq ret-val + (set-buffer (setq ret-val (get-buffer-create wl-original-buf-name))) (wl-message-original-mode))) ret-val)) (if wl-use-semi - (defalias 'wl-message-get-original-buffer + (defalias 'wl-message-get-original-buffer 'mmelmo-get-original-buffer) - (defalias 'wl-message-get-original-buffer + (defalias 'wl-message-get-original-buffer 'wl-message-normal-get-original-buffer)) (defvar wl-message-redisplay-func 'wl-normal-message-redisplay) @@ -364,19 +364,19 @@ ;; nil means don't fetch all. (defun wl-message-decide-backend (folder number message-id size) - (let ((dont-do-that (and + (let ((dont-do-that (and (not (setq wl-message-cache-used (or (elmo-buffer-cache-hit (list folder number message-id)) - (elmo-cache-exists-p message-id + (elmo-cache-exists-p message-id folder number)))) (integerp size) (not (elmo-local-file-p folder number)) wl-fetch-confirm-threshold (>= size wl-fetch-confirm-threshold) - (not (y-or-n-p - (format "Fetch entire message? (%dbytes)" + (not (y-or-n-p + (format "Fetch entire message? (%dbytes)" size)))))) (message "") (cond ((and dont-do-that @@ -403,7 +403,7 @@ &optional force-reload) (let* ((cur-buf (current-buffer)) (view-message-buffer (wl-message-get-buffer-create)) - (message-id (cdr (assq number + (message-id (cdr (assq number (elmo-msgdb-get-number-alist msgdb)))) (size (elmo-msgdb-overview-entity-get-size (elmo-msgdb-overview-get-entity number msgdb))) @@ -421,7 +421,7 @@ (erase-buffer) (if backend (let (mime-display-header-hook ;; bind to nil... - (wl-message-ignored-field-list + (wl-message-ignored-field-list (if (eq flag 'all-header) nil wl-message-ignored-field-list)) @@ -431,7 +431,7 @@ folder number)) (setq cur-entity (wl-message-make-mime-entity - backend + backend (if (eq backend 'elmo-imap4) (cdr real-fld-num) number) @@ -448,7 +448,7 @@ (if mmelmo-imap4-skipped-parts (progn (message "Skipped fetching of %s." - (mapconcat + (mapconcat (lambda (x) (format "[%s]" x)) mmelmo-imap4-skipped-parts ",")))) @@ -486,13 +486,13 @@ ret-val )) -(defun wl-normal-message-redisplay (folder number flag msgdb +(defun wl-normal-message-redisplay (folder number flag msgdb &optional force-reload) (interactive) (let* ((cur-buf (current-buffer)) (original-message-buffer (wl-message-get-original-buffer)) (view-message-buffer (wl-message-get-buffer-create)) - (message-id (cdr (assq number + (message-id (cdr (assq number (elmo-msgdb-get-number-alist msgdb)))) (size (elmo-msgdb-overview-entity-get-size (elmo-msgdb-overview-get-entity number msgdb))) @@ -509,10 +509,10 @@ (not (and (integerp size) wl-fetch-confirm-threshold (>= size wl-fetch-confirm-threshold) - (not (elmo-cache-exists-p message-id + (not (elmo-cache-exists-p message-id folder number)) (not (y-or-n-p - (format "Fetch entire message? (%dbytes)" + (format "Fetch entire message? (%dbytes)" size)))))) (progn (save-excursion @@ -521,8 +521,8 @@ (elmo-read-msg-with-buffer-cache folder number original-message-buffer msgdb force-reload))) ;; decode MIME message. - (wl-message-decode - view-message-buffer + (wl-message-decode + view-message-buffer original-message-buffer flag) (setq ret-val t)) (save-excursion @@ -537,7 +537,7 @@ (wl-message-narrow-to-page) (error nil)) ; ignore errors. (setq mode-line-buffer-identification - (format "Wanderlust: << %s / %s >>" + (format "Wanderlust: << %s / %s >>" (if (memq 'modeline wl-use-folder-petname) (wl-folder-get-petname folder) folder) @@ -546,7 +546,7 @@ (unwind-protect (run-hooks 'wl-message-redisplay-hook) ;; go back to summary mode - (set-buffer-modified-p nil) + (set-buffer-modified-p nil) (setq buffer-read-only t) (set-buffer cur-buf) (setq summary-win (get-buffer-window cur-buf)) @@ -579,7 +579,7 @@ (defun wl-message-button-refer-article (data) "Read article specified by Message-ID DATA at point." - (switch-to-buffer-other-window + (switch-to-buffer-other-window wl-message-buffer-cur-summary-buffer) (if (wl-summary-jump-to-msg-by-message-id data) (wl-summary-redisplay))) @@ -598,13 +598,13 @@ (setq beg (save-excursion (beginning-of-line) (point))) (setq end (save-excursion (end-of-line) (point))) (search-forward ">" end t) ;Move point to end of "<....>". - (if (and (re-search-backward "\\(<[^<> \t\n]+@[^<> \t\n]+>\\)" + (if (and (re-search-backward "\\(<[^<> \t\n]+@[^<> \t\n]+>\\)" beg t) - (not (string-match "mailto:" + (not (string-match "mailto:" (setq msg-id (wl-match-buffer 1))))) (progn (goto-char point) - (switch-to-buffer-other-window + (switch-to-buffer-other-window wl-message-buffer-cur-summary-buffer) (if (wl-summary-jump-to-msg-by-message-id msg-id) (wl-summary-redisplay))) diff --git a/wl/wl-mime.el b/wl/wl-mime.el index 57a54bb..abed57e 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -50,17 +50,17 @@ (defalias 'wl-draft-editor-mode 'mime-edit-mode) -(defalias 'wl-draft-decode-message-in-buffer +(defalias 'wl-draft-decode-message-in-buffer 'mime-edit-decode-message-in-buffer) (defun wl-draft-yank-current-message-entity () - "Yank currently displayed message entity. + "Yank currently displayed message entity. By setting following-method as yank-content." (let ((wl-draft-buffer (current-buffer)) - (mime-view-following-method-alist - (list (cons 'mmelmo-original-mode + (mime-view-following-method-alist + (list (cons 'mmelmo-original-mode (function wl-draft-yank-to-draft-buffer)))) - (mime-preview-following-method-alist + (mime-preview-following-method-alist (list (cons 'mmelmo-original-mode (function wl-draft-yank-to-draft-buffer))))) (if (get-buffer (wl-current-message-buffer)) @@ -73,12 +73,12 @@ By setting following-method as yank-content." (defalias 'wl-draft-enclose-digest-region 'mime-edit-enclose-digest-region) ;; SEMI 1.13.5 or later. -;; (mime-display-message -;; MESSAGE &optional +;; (mime-display-message +;; MESSAGE &optional ;; PREVIEW-BUFFER MOTHER DEFAULT-KEYMAP-OR-FUNCTION ORIGINAL-MAJOR-MODE) ;; SEMI 1.13.4 or earlier. -;; (mime-display-message -;; MESSAGE &optional +;; (mime-display-message +;; MESSAGE &optional ;; PREVIEW-BUFFER MOTHER DEFAULT-KEYMAP-OR-FUNCTION) (static-if (or (and mime-user-interface-product (eq (nth 0 (aref mime-user-interface-product 1)) 1) @@ -97,9 +97,9 @@ By setting following-method as yank-content." (, default-keymap-or-function)))) ;; User agent field of XEmacs has problem on SEMI 1.13.4 or earlier. (setq mime-edit-user-agent-value - (concat + (concat (mime-product-name mime-user-interface-product) "/" - (mapconcat + (mapconcat #'number-to-string (mime-product-version mime-user-interface-product) ".") " (" (mime-product-code-name mime-user-interface-product) @@ -108,7 +108,7 @@ By setting following-method as yank-content." (mime-product-version mime-library-product) ".") " (" (mime-product-code-name mime-library-product) ") " (if (featurep 'xemacs) - (concat + (concat (if (featurep 'mule) "MULE") " XEmacs" (if (string-match "\\s +\\((\\|\\\"\\)" emacs-version) @@ -161,7 +161,7 @@ By setting following-method as yank-content." mime-edit-translate-buffer-hook))) (mime-edit-preview-message) (let ((buffer-read-only nil)) - (when wl-highlight-body-too + (when wl-highlight-body-too (wl-highlight-body)) (run-hooks 'wl-draft-preview-message-hook)))) @@ -212,7 +212,7 @@ By setting following-method as yank-content." (while children (setq content-type (mime-entity-content-type (car children))) (if (eq (cdr (assq 'type content-type)) 'multipart) - (setq number (wl-summary-burst-subr + (setq number (wl-summary-burst-subr (mime-entity-children (car children)) target number)) @@ -235,7 +235,7 @@ By setting following-method as yank-content." (save-excursion (setq target wl-summary-buffer-folder-name) (while (not (elmo-folder-writable-p target)) - (setq target + (setq target (wl-summary-read-folder wl-default-folder "to extract to"))) (wl-summary-set-message-buffer-or-redisplay) (save-excursion @@ -256,7 +256,7 @@ By setting following-method as yank-content." ;;; Yet another save method. (defun wl-mime-save-content (entity situation) (let ((filename (read-file-name "Save to file: " - (expand-file-name + (expand-file-name (or (mime-entity-safe-filename entity) ".") (or wl-mime-save-dir @@ -275,7 +275,7 @@ By setting following-method as yank-content." "Internal method for wl to combine message/partial messages automatically." (interactive) - (let* ((msgdb (save-excursion + (let* ((msgdb (save-excursion (set-buffer wl-message-buffer-cur-summary-buffer) wl-summary-buffer-msgdb)) (mime-display-header-hook 'wl-highlight-headers) @@ -293,9 +293,9 @@ automatically." (not (y-or-n-p "Merge partials?"))) (with-current-buffer mother (mime-store-message/partial-piece entity situation)) - (setq subject-id + (setq subject-id (eword-decode-string - (decode-mime-charset-string + (decode-mime-charset-string (wl-mime-entity-read-field entity 'Subject) wl-summary-buffer-mime-charset))) (if (string-match "[0-9\n]+" subject-id) @@ -313,7 +313,7 @@ automatically." (elmo-msgdb-overview-entity-get-number (car overviews)))) (situation (mime-entity-situation message)) (the-id (or (cdr (assoc "id" situation)) ""))) - (when (string= (downcase the-id) + (when (string= (downcase the-id) (downcase id)) (with-current-buffer mother (mime-store-message/partial-piece message situation)) @@ -335,7 +335,7 @@ automatically." 'mmelmo-original-mode 'wl-message-exit) (set-alist 'mime-view-over-to-previous-method-alist 'mmelmo-original-mode 'wl-message-exit) - (set-alist 'mime-view-over-to-next-method-alist + (set-alist 'mime-view-over-to-next-method-alist 'mmelmo-original-mode 'wl-message-exit) (set-alist 'mime-preview-over-to-previous-method-alist 'mmelmo-original-mode 'wl-message-exit) @@ -355,10 +355,10 @@ automatically." '((mode . "extract") (major-mode . mmelmo-original-mode) (method . wl-mime-save-content))) - (set-alist 'mime-preview-following-method-alist + (set-alist 'mime-preview-following-method-alist 'mmelmo-original-mode (function wl-message-follow-current-entity)) - (set-alist 'mime-view-following-method-alist + (set-alist 'mime-view-following-method-alist 'mmelmo-original-mode (function wl-message-follow-current-entity)) (set-alist 'mime-edit-message-inserter-alist @@ -366,7 +366,7 @@ automatically." (set-alist 'mime-edit-mail-inserter-alist 'wl-draft-mode (function wl-draft-insert-get-message)) (set-alist 'mime-edit-split-message-sender-alist - 'wl-draft-mode + 'wl-draft-mode (cdr (assq 'mail-mode mime-edit-split-message-sender-alist))) (set-alist 'mime-raw-representation-type-alist 'mmelmo-original-mode 'binary) diff --git a/wl/wl-mule.el b/wl/wl-mule.el index 71af151..8d7adc1 100644 --- a/wl/wl-mule.el +++ b/wl/wl-mule.el @@ -63,14 +63,14 @@ Special commands: (save-excursion (end-of-line) (setq eol (point))) (if (and numbers (nth 0 numbers) (nth 1 numbers)) (progn - (setq fsymbol + (setq fsymbol (let ((unsync (nth 0 numbers)) (unread (nth 1 numbers))) (cond ((and unsync (eq unsync 0)) (if (and unread (> unread 0)) 'wl-highlight-folder-unread-face 'wl-highlight-folder-zero-face)) - ((and unsync + ((and unsync (>= unsync wl-folder-many-unsync-threshold)) 'wl-highlight-folder-many-face) (t @@ -79,8 +79,8 @@ Special commands: (setq matched t))) (catch 'highlighted (while highlights - (setq fregexp (symbol-value - (intern (format "wl-highlight-folder-%s-regexp" + (setq fregexp (symbol-value + (intern (format "wl-highlight-folder-%s-regexp" (car highlights))))) (if (not wl-highlight-group-folder-by-numbers) (setq fsymbol (intern (format "wl-highlight-folder-%s-face" @@ -98,7 +98,7 @@ Special commands: 'wl-highlight-folder-killed-face) (put-text-property bol eol 'face 'wl-highlight-folder-unknown-face))) - (if wl-use-highlight-mouse-line + (if wl-use-highlight-mouse-line (wl-highlight-folder-mouse-line))))) (defun wl-highlight-plugged-current-line ()) @@ -197,7 +197,7 @@ Special commands: ;; for "ja-mule-canna-2.3.mini" on PocketBSD (defun-maybe make-face (a)) -(eval-when-compile +(eval-when-compile (require 'static)) (static-cond ((and (fboundp 'defface) @@ -234,7 +234,7 @@ Special commands: Each keyword should be listed in `custom-face-attributes'. If FRAME is nil, set the default face." - (while atts + (while atts (let* ((name (nth 0 atts)) (value (nth 1 atts)) (fun (nth 1 (assq name wl-face-attributes)))) diff --git a/wl/wl-nemacs.el b/wl/wl-nemacs.el index 016586a..bb48858 100644 --- a/wl/wl-nemacs.el +++ b/wl/wl-nemacs.el @@ -70,7 +70,7 @@ (defalias 'wl-draft-mode 'mail-mode)) (defun wl-draft-key-setup ()) -;; ??? +;; ??? (defvar mime-article/kanji-code-alist (list (cons t (mime-charset-to-coding-system default-mime-charset)))) @@ -142,7 +142,7 @@ However, if `mail-yank-prefix' is non-nil, insert that prefix on each line." (defun-maybe find-file-name-handler (filename operation)) (defun-maybe read-event () - (setq unread-command-events + (setq unread-command-events (if (fboundp 'read-char-exclusive) (read-char-exclusive) ;; XXX Emacs18.59 does not have read-char-exclusive(). diff --git a/wl/wl-refile.el b/wl/wl-refile.el index 607b105..2f55d57 100644 --- a/wl/wl-refile.el +++ b/wl/wl-refile.el @@ -85,17 +85,17 @@ (defun wl-refile-learn (entity dst) (let (tocc-list from key hit ml) (setq dst (elmo-string dst)) - (setq tocc-list + (setq tocc-list (mapcar (function - (lambda (entity) + (lambda (entity) (downcase (wl-address-header-extract-address entity)))) - (wl-parse-addresses + (wl-parse-addresses (concat (elmo-msgdb-overview-entity-get-to entity) "," (elmo-msgdb-overview-entity-get-cc entity))))) (while tocc-list - (if (wl-string-member - (car tocc-list) + (if (wl-string-member + (car tocc-list) (mapcar (function downcase) wl-subscribed-mailing-list)) (setq ml (car tocc-list) tocc-list nil) @@ -103,10 +103,10 @@ (if ml (setq key ml) ; subscribed entity!! (or (wl-address-user-mail-address-p - (setq from - (downcase + (setq from + (downcase (wl-address-header-extract-address - (elmo-msgdb-overview-entity-get-from + (elmo-msgdb-overview-entity-get-from entity))))) (setq key from)) (if (or wl-refile-msgid-alist @@ -167,7 +167,7 @@ If RULE does not match ENTITY, returns nil." (let ((case-fold-search t) fields guess pairs value) - (cond + (cond ((stringp rule) rule) ((listp (car rule)) (setq fields (car rule)) @@ -250,11 +250,11 @@ If RULE does not match ENTITY, returns nil." guess)) (defun wl-refile-guess-by-history (entity) - (let ((tocc-list + (let ((tocc-list (mapcar (function (lambda (entity) (downcase (wl-address-header-extract-address entity)))) - (wl-parse-addresses + (wl-parse-addresses (concat (elmo-msgdb-overview-entity-get-to entity) "," (elmo-msgdb-overview-entity-get-cc entity))))) @@ -281,7 +281,7 @@ If RULE does not match ENTITY, returns nil." (elmo-msgdb-overview-entity-get-from entity))))) ;; search from alist (or (cdr (assoc from wl-refile-alist)) - (format "%s/%s" wl-refile-default-from-folder + (format "%s/%s" wl-refile-default-from-folder (wl-refile-get-account-part-from-address from))))) (defun wl-refile-guess-by-msgid (entity) diff --git a/wl/wl-score.el b/wl/wl-score.el index 0cfd20e..4cef66f 100644 --- a/wl/wl-score.el +++ b/wl/wl-score.el @@ -104,12 +104,12 @@ (defvar wl-score-edit-exit-func nil "Function run on exit from the score buffer.") -(mapcar +(mapcar (function make-variable-buffer-local) (list 'wl-current-score-file 'wl-score-alist)) -;; Utility functions +;; Utility functions (defun wl-score-simplify-buffer-fuzzy () "Simplify string in the buffer fuzzily. @@ -1182,7 +1182,7 @@ See `wl-score-simplify-buffer-fuzzy' for details." (defun wl-summary-rescore-msgs (number-alist) (mapcar 'car - (nthcdr + (nthcdr (max (- (length number-alist) wl-summary-rescore-partial-threshold) 0) @@ -1200,7 +1200,7 @@ See `wl-score-simplify-buffer-fuzzy' for details." (unless arg (wl-summary-rescore-msgs number-alist))) (setq expunged (wl-summary-score-update-all-lines t)) - (if expunged + (if expunged (message "%d message(s) are expunged by scoring." (length expunged))) (set-buffer-modified-p nil))) @@ -1262,7 +1262,7 @@ See `wl-score-simplify-buffer-fuzzy' for details." ;; mark as read. (setq mark-alist (elmo-msgdb-get-mark-alist wl-summary-buffer-msgdb)) (mapcar (function (lambda (x) - (setq mark-alist + (setq mark-alist (elmo-msgdb-mark-set mark-alist x nil)))) dels) (elmo-mark-as-read wl-summary-buffer-folder-name @@ -1277,7 +1277,7 @@ See `wl-score-simplify-buffer-fuzzy' for details." ;; Update Folder mode (wl-folder-set-folder-updated wl-summary-buffer-folder-name (list 0 - (wl-summary-count-unread + (wl-summary-count-unread mark-alist) (length num-db))) (wl-summary-update-modeline))) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 31dc8c9..91c015e 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -72,8 +72,8 @@ (defvar wl-summary-buffer-folder-indicator nil) (defvar wl-summary-buffer-disp-msg nil) (defvar wl-summary-buffer-disp-folder nil) -(defvar wl-summary-buffer-refile-list nil) -(defvar wl-summary-buffer-delete-list nil) +(defvar wl-summary-buffer-refile-list nil) +(defvar wl-summary-buffer-delete-list nil) (defvar wl-summary-buffer-last-displayed-msg nil) (defvar wl-summary-buffer-current-msg nil) (defvar wl-summary-buffer-unread-status " (0 new/0 unread)") @@ -92,7 +92,7 @@ (defvar wl-summary-buffer-persistent nil) (defvar wl-summary-buffer-thread-nodes nil) (defvar wl-summary-buffer-target-mark-list nil) -(defvar wl-summary-buffer-copy-list nil) +(defvar wl-summary-buffer-copy-list nil) (defvar wl-summary-buffer-prev-refile-destination nil) (defvar wl-summary-buffer-prev-copy-destination nil) (defvar wl-summary-buffer-saved-message nil) @@ -120,7 +120,7 @@ (defvar wl-ps-preprint-hook nil) (defvar wl-ps-print-hook nil) -(mapcar +(mapcar (function make-variable-buffer-local) (list 'wl-summary-buffer-msgdb 'wl-summary-buffer-disp-msg @@ -168,7 +168,7 @@ ;; internal functions (dummy) (unless (fboundp 'wl-summary-append-message-func-internal) - (defun wl-summary-append-message-func-internal (entity overview + (defun wl-summary-append-message-func-internal (entity overview mark-alist update &optional force-insert))) (unless (fboundp 'wl-summary-from-func-internal) @@ -260,7 +260,7 @@ ["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]) "----" ("Message Operation" ["Mark as read" wl-summary-mark-as-read t] @@ -344,9 +344,9 @@ (defun wl-summary-setup-mouse () (define-key wl-summary-mode-map 'button4 'wl-summary-prev) (define-key wl-summary-mode-map 'button5 'wl-summary-next) - (define-key wl-summary-mode-map [(shift button4)] + (define-key wl-summary-mode-map [(shift button4)] 'wl-summary-up) - (define-key wl-summary-mode-map [(shift button5)] + (define-key wl-summary-mode-map [(shift button5)] 'wl-summary-down) (define-key wl-summary-mode-map 'button2 'wl-summary-click)) (if wl-on-nemacs @@ -441,7 +441,7 @@ (define-key wl-summary-mode-map "O" 'wl-summary-copy) (define-key wl-summary-mode-map "\M-o" 'wl-summary-refile-prev-destination) ; (define-key wl-summary-mode-map "\M-O" 'wl-summary-copy-prev-destination) - (define-key wl-summary-mode-map "\C-o" 'wl-summary-auto-refile) + (define-key wl-summary-mode-map "\C-o" 'wl-summary-auto-refile) (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) @@ -552,7 +552,7 @@ (while mark-alist (setq mark (cadr (car mark-alist))) (and mark - (cond + (cond ((string= mark wl-summary-new-mark) (setq new (+ 1 new))) ((or (string= mark wl-summary-unread-uncached-mark) @@ -560,7 +560,7 @@ (setq unread (+ 1 unread))))) (setq mark-alist (cdr mark-alist))) (if (eq major-mode 'wl-summary-mode) - (setq wl-summary-buffer-new-count new + (setq wl-summary-buffer-new-count new wl-summary-buffer-unread-count unread)) (+ new unread))) @@ -581,7 +581,7 @@ If optional argument is non-nil, Supersedes message" (save-excursion (let ((mmelmo-force-fetch-entire-message t)) (if (null (wl-summary-message-number)) - (message "No message.") + (message "No message.") (wl-summary-set-message-buffer-or-redisplay) (set-buffer (wl-message-get-original-buffer)) (wl-draft-edit-string (buffer-substring (point-min) @@ -709,21 +709,21 @@ Returns nil if selecting folder was in failure." (when (wl-summary-sticky-p) (make-local-variable 'wl-message-buf-name) (setq wl-message-buf-name (format "%s:%s" wl-message-buf-name folder))) - (setq wl-summary-buffer-mime-charset (or (wl-get-assoc-list-value + (setq wl-summary-buffer-mime-charset (or (wl-get-assoc-list-value wl-folder-mime-charset-alist folder) wl-mime-charset)) - (setq wl-summary-buffer-weekday-name-lang - (or (wl-get-assoc-list-value + (setq wl-summary-buffer-weekday-name-lang + (or (wl-get-assoc-list-value wl-folder-weekday-name-lang-alist folder) wl-summary-weekday-name-lang)) (setq wl-summary-buffer-thread-indent-set - (wl-get-assoc-list-value + (wl-get-assoc-list-value wl-folder-thread-indent-set-alist folder)) (setq wl-summary-buffer-persistent (wl-folder-persistent-p folder)) - (setq + (setq wl-thread-indent-level-internal (or (nth 0 wl-summary-buffer-thread-indent-set) wl-thread-indent-level) @@ -742,8 +742,8 @@ Returns nil if selecting folder was in failure." wl-thread-space-str-internal (or (nth 5 wl-summary-buffer-thread-indent-set) wl-thread-space-str)) - (setq wl-thread-indent-regexp - (concat + (setq wl-thread-indent-regexp + (concat (regexp-quote wl-thread-have-younger-brother-str-internal) "\\|" (regexp-quote wl-thread-youngest-child-str-internal) "\\|" (regexp-quote wl-thread-vertical-str-internal) "\\|" @@ -755,37 +755,37 @@ Returns nil if selecting folder was in failure." "Major mode for reading threaded messages. The keys that are defined for this mode are:\\ -SPC Read messages. -DEL Back-scroll this message. -. Force to display this message. +SPC Read messages. +DEL Back-scroll this message. +. Force to display this message. RET Make this message scroll up with one line. M-RET - Make this message scroll down with one line. C-n Go to the next line. C-p Go to the previous line. -n Move to below then display. +n Move to below then display. N Move to next unread. -p Move to above then display. +p Move to above then display. P Move to previous unread. s Sync current folder. -t Same as 's' but force update. +t Same as 's' but force update. g Go to the folder which you input. w Write a message. A new draft is prepared. -a Answer to this message. A new draft is prepared in Draft mode. -f Forward this message to a third person. A new draft is prepared in +a Answer to this message. A new draft is prepared in Draft mode. +f Forward this message to a third person. A new draft is prepared in Draft mode and this message is automatically attached. v Toggle \"Summary and Folder view\". - You can quickly put the delete marks since the next message is not + You can quickly put the delete marks since the next message is not displayed. i Prefetch message if uncached. -o Put the refile mark('o') on this message. +o Put the refile mark('o') on this message. ! Mark current message as unread. $ Toggle mark current message as important. d Put the delete mark('D') on this message. c Check all messages as read. -* Put the temporal mark('*') on this message. +* Put the temporal mark('*') on this message. u Cancel the mark on this message. -x Process marked messages. +x Process marked messages. mo Put the refile mark onto all messages marked with '*'. This is very convenient to refile all messages picked by '?'. @@ -794,7 +794,7 @@ mi Prefetch all messages marked with '*'. mu Unmark all target-marked messages. mt Put the '*' mark onto all messages which belong to th current thread. ma Put the '*' mark onto all messages. -? Pick messages according to a pick pattern which you input, +? Pick messages according to a pick pattern which you input, then put the '*' mark onto them. q Goto folder mode. " @@ -803,14 +803,14 @@ q Goto folder mode. (setq major-mode 'wl-summary-mode) (setq mode-name "Summary") (use-local-map wl-summary-mode-map) -;; (setq default-directory (or wl-tmp-dir (expand-file-name "~/"))) +;; (setq default-directory (or wl-tmp-dir (expand-file-name "~/"))) (setq buffer-read-only t) (setq truncate-lines t) ; (make-local-variable 'tab-width) ; (setq tab-width 1) (buffer-disable-undo (current-buffer)) (if wl-use-semi - (setq wl-summary-buffer-message-redisplay-func + (setq wl-summary-buffer-message-redisplay-func 'wl-mmelmo-message-redisplay) (setq wl-summary-buffer-message-redisplay-func 'wl-normal-message-redisplay)) @@ -830,9 +830,9 @@ q Goto folder mode. "Compare entity by date" (condition-case nil (string< - (timezone-make-date-sortable + (timezone-make-date-sortable (elmo-msgdb-overview-entity-get-date x)) - (timezone-make-date-sortable + (timezone-make-date-sortable (elmo-msgdb-overview-entity-get-date y))) (error))) ;; ignore error. @@ -874,7 +874,7 @@ q Goto folder mode. "Rescan current folder without updating." (interactive) (let* ((cur-buf (current-buffer)) - (msgdb wl-summary-buffer-msgdb) + (msgdb wl-summary-buffer-msgdb) (overview (elmo-msgdb-get-overview msgdb)) (number-alist (elmo-msgdb-get-number-alist msgdb)) (mark-alist (elmo-msgdb-get-mark-alist msgdb)) @@ -885,7 +885,7 @@ q Goto folder mode. (inhibit-read-only t) (buffer-read-only nil) expunged) - (fset 'wl-summary-append-message-func-internal + (fset 'wl-summary-append-message-func-internal (wl-summary-get-append-message-func)) (erase-buffer) (message "Re-scanning...") @@ -948,7 +948,7 @@ q Goto folder mode. (message "%d message(s) are expunged by scoring." (length expunged)))) (wl-summary-set-message-modified) (wl-summary-count-unread mark-alist) - (wl-summary-update-modeline) + (wl-summary-update-modeline) (goto-char (point-max)) (forward-line -1) (set-buffer-modified-p nil))) @@ -960,7 +960,7 @@ q Goto folder mode. (wl-summary-toggle-disp-msg 'off) (unwind-protect (setq retval - (wl-summary-goto-folder-subr next-entity + (wl-summary-goto-folder-subr next-entity 'force-update nil nil ; not sticky @@ -989,8 +989,8 @@ q Goto folder mode. "%" "%%") (if (null (car finfo)) " (? new/? unread)" - (format - " (%d new/%d unread)" + (format + " (%d new/%d unread)" (nth 0 finfo) (+ (nth 0 finfo) (nth 1 finfo)))))) @@ -1016,11 +1016,11 @@ q Goto folder mode. (let (path) (when (wl-summary-message-modified-p) (setq path (elmo-msgdb-expand-path wl-summary-buffer-folder-name)) - (elmo-msgdb-overview-save - path + (elmo-msgdb-overview-save + path (elmo-msgdb-get-overview wl-summary-buffer-msgdb)) - (elmo-msgdb-number-save - path + (elmo-msgdb-number-save + path (elmo-msgdb-get-number-alist wl-summary-buffer-msgdb)) (elmo-folder-set-info-max-by-numdb (elmo-string wl-summary-buffer-folder-name) @@ -1029,10 +1029,10 @@ q Goto folder mode. (setq wl-summary-buffer-message-modified nil) (run-hooks 'wl-summary-buffer-message-saved-hook)) (when (wl-summary-mark-modified-p) - (or path + (or path (setq path (elmo-msgdb-expand-path wl-summary-buffer-folder-name))) - (elmo-msgdb-mark-save + (elmo-msgdb-mark-save path (elmo-msgdb-get-mark-alist wl-summary-buffer-msgdb)) ;; (elmo-folder-set-info-hashtb @@ -1072,12 +1072,12 @@ q Goto folder mode. ;; already in summary buffer. (when wl-summary-buffer-persistent ;; save the current summary buffer view. - (if (and wl-summary-cache-use + (if (and wl-summary-cache-use (or (wl-summary-message-modified-p) (wl-summary-mark-modified-p) (wl-summary-thread-modified-p))) (wl-summary-save-view-cache sticky)) - ;; save msgdb ... + ;; save msgdb ... (wl-summary-msgdb-save))) (defun wl-summary-force-exit () @@ -1131,7 +1131,7 @@ q Goto folder mode. (beginning-of-line)) (if (setq summary-win (get-buffer-window summary-buf)) (delete-window summary-win)) - (if (or force-exit + (if (or force-exit (not sticky)) (progn (set-buffer summary-buf) @@ -1176,7 +1176,7 @@ q Goto folder mode. (elmo-msgdb-mark-alist-to-seen-list (elmo-msgdb-get-number-alist wl-summary-buffer-msgdb) - (elmo-msgdb-get-mark-alist + (elmo-msgdb-get-mark-alist wl-summary-buffer-msgdb) (concat wl-summary-important-mark wl-summary-read-uncached-mark)) @@ -1213,7 +1213,7 @@ q Goto folder mode. ((string= range "no-sync") ;; do nothing. ) - (t + (t (setq seen-list (elmo-msgdb-seen-load msgdb-dir)) (setq mes (wl-summary-sync-update3 seen-list unset-cursor)) (elmo-msgdb-seen-save msgdb-dir nil) ; delete all seen. @@ -1227,7 +1227,7 @@ q Goto folder mode. (let ((fields wl-summary-edit-addresses-candidate-fields) body candidates components) (while fields - (setq body + (setq body (mapconcat 'identity (elmo-multiple-field-body (car fields)) ",")) (setq body (wl-parse-addresses body)) @@ -1267,7 +1267,7 @@ q Goto folder mode. (eq char ?\r) (eq char ? )) ;; Change Addresses - (wl-address-petname-add-or-change + (wl-address-petname-add-or-change the-email (elmo-get-hash-val the-email wl-address-petname-hash) (wl-address-header-extract-realname @@ -1286,7 +1286,7 @@ q Goto folder mode. (t (message "") nil))) ;; Add Petname - (wl-address-petname-add-or-change + (wl-address-petname-add-or-change the-email name-in-addr name-in-addr) "added")) @@ -1310,7 +1310,7 @@ Optional argument ADDR-STR is used as a target address if specified." (when candidates (setq address (car (car candidates))) (setq address - (completing-read + (completing-read (format "Target address (%s): " address) (mapcar (function (lambda (x) (cons (car x) (car x)))) @@ -1349,15 +1349,15 @@ If optional argument is non-nil, checking is omitted." ;; prefetching procedure. (save-excursion (let* ((msgdb wl-summary-buffer-msgdb) - (mark-alist (elmo-msgdb-get-mark-alist msgdb)) + (mark-alist (elmo-msgdb-get-mark-alist msgdb)) (number-alist (elmo-msgdb-get-number-alist msgdb)) (message-id (cdr (assq number number-alist))) - (ov (assoc message-id + (ov (assoc message-id (elmo-msgdb-get-overview msgdb))) (entity ov) (size (elmo-msgdb-overview-entity-get-size ov)) (inhibit-read-only t) - (buffer-read-only nil) + (buffer-read-only nil) (force-read (and size (or (null wl-prefetch-threshold) (< size wl-prefetch-threshold)))) @@ -1370,17 +1370,17 @@ If optional argument is non-nil, checking is omitted." (widen) (y-or-n-p (format - "Message from %s has %d bytes. Prefetch it?" - (concat + "Message from %s has %d bytes. Prefetch it?" + (concat "[ " - (save-match-data - (wl-set-string-width + (save-match-data + (wl-set-string-width wl-from-width (wl-summary-from-func-internal (eword-decode-string - (elmo-delete-char + (elmo-delete-char ?\" - (or + (or (elmo-msgdb-overview-entity-get-from ov) "??")))))) " ]") size)))) @@ -1419,11 +1419,11 @@ If optional argument is non-nil, checking is omitted." msgdb) (setq new-mark (cond - ((string= mark + ((string= mark wl-summary-unread-uncached-mark) wl-summary-unread-cached-mark) ((string= mark wl-summary-new-mark) - (setq wl-summary-buffer-new-count + (setq wl-summary-buffer-new-count (- wl-summary-buffer-new-count 1)) (setq wl-summary-buffer-unread-count (+ wl-summary-buffer-unread-count 1)) @@ -1444,7 +1444,7 @@ If optional argument is non-nil, checking is omitted." new-mark))))))) ;(defvar wl-summary-message-uncached-marks -; (list wl-summary-new-mark +; (list wl-summary-new-mark ; wl-summary-unread-uncached-mark ; wl-summary-read-uncached-mark)) @@ -1541,7 +1541,7 @@ If optional argument is non-nil, checking is omitted." (let ((inhibit-read-only t) (buffer-read-only nil) (case-fold-search nil)) - (while (re-search-forward + (while (re-search-forward (concat "^" wl-summary-buffer-number-regexp ".\\(.\\)") nil t) (delete-region (match-beginning 1) (match-end 1)) (insert " "))))) @@ -1617,7 +1617,7 @@ If optional argument is non-nil, checking is omitted." ;; closed (wl-summary-mark-as-read t) ; mark itself. (setq children (wl-thread-get-children-msgs number)) - (while children + (while children (wl-thread-msg-mark-as-read (car children)) (setq children (cdr children)))) (forward-line 1)))) @@ -1646,9 +1646,9 @@ If optional argument is non-nil, checking is omitted." (wl-summary-mark-as-unread) ;; closed (wl-summary-mark-as-unread) ; mark itself. - (setq children + (setq children (delq number (wl-thread-get-children-msgs number))) - (while children + (while children (wl-thread-msg-mark-as-unread (car children)) (setq children (cdr children)))) (forward-line 1)))) @@ -1677,9 +1677,9 @@ If optional argument is non-nil, checking is omitted." (wl-summary-mark-as-important) ;; closed (wl-summary-mark-as-important) ; mark itself. - (setq children + (setq children (delq number (wl-thread-get-children-msgs number))) - (while children + (while children (wl-thread-msg-mark-as-important (car children)) (setq children (cdr children)))) (forward-line 1)))) @@ -1719,16 +1719,16 @@ If optional argument is non-nil, checking is omitted." (progn (insert " ") (setq mark-alist - (elmo-msgdb-mark-set + (elmo-msgdb-mark-set mark-alist - msg ;(cdr (assq msg number-alist)) + msg ;(cdr (assq msg number-alist)) nil))) ;; New mark and unread-uncached mark (insert wl-summary-read-uncached-mark) (setq mark-alist (elmo-msgdb-mark-set mark-alist msg - ; (cdr (assq msg number-alist)) + ; (cdr (assq msg number-alist)) wl-summary-read-uncached-mark))) (if wl-summary-highlight (wl-highlight-summary-current-line nil nil t))))) @@ -1738,7 +1738,7 @@ If optional argument is non-nil, checking is omitted." (elmo-msgdb-set-mark-alist msgdb mark-alist) (wl-folder-update-unread wl-summary-buffer-folder-name 0) (setq wl-summary-buffer-unread-count 0) - (setq wl-summary-buffer-new-count 0) + (setq wl-summary-buffer-new-count 0) (wl-summary-update-modeline) (message "Setting all msgs as read...done.") (set-buffer-modified-p nil)))) @@ -1760,7 +1760,7 @@ If optional argument is non-nil, checking is omitted." (when (looking-at "^ *\\([0-9]+\\)[^0-9]\\([^0-9]\\)") (progn (setq mark (wl-match-buffer 2)) - (cond + (cond ((or (string= mark wl-summary-new-mark) (string= mark wl-summary-unread-uncached-mark) (string= mark wl-summary-important-mark)) @@ -1768,7 +1768,7 @@ If optional argument is non-nil, checking is omitted." ) ((string= mark wl-summary-unread-cached-mark) (setq new-mark wl-summary-unread-uncached-mark)) - (t + (t (setq new-mark wl-summary-read-uncached-mark))) (when new-mark (setq number (string-to-int (wl-match-buffer 1))) @@ -1815,17 +1815,17 @@ If optional argument is non-nil, checking is omitted." (setq set-mark wl-summary-unread-cached-mark) (if (string= mark wl-summary-read-uncached-mark) ; u -> ' ' (setq set-mark " "))) - (if (string= mark " ") + (if (string= mark " ") (setq set-mark wl-summary-read-uncached-mark) ;' ' -> u - (if (string= mark wl-summary-unread-cached-mark) + (if (string= mark wl-summary-unread-cached-mark) (setq set-mark wl-summary-unread-uncached-mark) ; ! -> U ))) (when set-mark (delete-region (match-beginning 2) (match-end 2)) (insert set-mark) (setq mark-alist - (elmo-msgdb-mark-set - mark-alist msg ; msgid + (elmo-msgdb-mark-set + mark-alist msg ; msgid (if (string= set-mark " ") nil set-mark))) (if wl-summary-highlight (wl-highlight-summary-current-line)))) @@ -1917,7 +1917,7 @@ If optional argument is non-nil, checking is omitted." (wl-thread-delete-message (car msgs)))) (setq update-list (delq (car msgs) update-list))) (goto-char (point-min)) - (if (re-search-forward (format "^ *%d[^0-9]\\([^0-9]\\).*$" + (if (re-search-forward (format "^ *%d[^0-9]\\([^0-9]\\).*$" (car msgs)) nil t) (progn (delete-region (match-beginning 0) (match-end 0)) @@ -1935,7 +1935,7 @@ If optional argument is non-nil, checking is omitted." (wl-thread-update-line-msgs (elmo-uniq-list update-list) (unless deleting-info 'no-msg)) (wl-thread-cleanup-symbols msgs2)) - (wl-summary-count-unread + (wl-summary-count-unread (elmo-msgdb-get-mark-alist wl-summary-buffer-msgdb)) (wl-summary-update-modeline) (wl-folder-update-unread @@ -1943,9 +1943,9 @@ If optional argument is non-nil, checking is omitted." (+ wl-summary-buffer-unread-count wl-summary-buffer-new-count))))) (defun wl-summary-set-as-read-mark-alist (mark-alist) - (let ((marks (list (cons wl-summary-unread-cached-mark + (let ((marks (list (cons wl-summary-unread-cached-mark nil) - (cons wl-summary-unread-uncached-mark + (cons wl-summary-unread-uncached-mark wl-summary-read-uncached-mark) (cons wl-summary-new-mark wl-summary-read-uncached-mark))) @@ -1984,7 +1984,7 @@ If optional argument is non-nil, checking is omitted." (let ((inhibit-read-only t) (buffer-read-only nil) (regexp (concat "^" wl-summary-buffer-number-regexp ".\\(\\%s\\)"))) - (while (re-search-forward + (while (re-search-forward (format regexp (regexp-quote before)) nil t) (delete-region (match-beginning 1) (match-end 1)) (insert after) @@ -2003,11 +2003,11 @@ If optional argument is non-nil, checking is omitted." (t;; (equal type 'trash) wl-trash-folder))))) -(defun wl-summary-delete-important-msgs-from-list (delete-list +(defun wl-summary-delete-important-msgs-from-list (delete-list mark-alist) (let ((dlist delete-list)) (while dlist - (if (string= wl-summary-important-mark + (if (string= wl-summary-important-mark (car (cdr (assq (car dlist) mark-alist)))) (setq delete-list (delete (car dlist) delete-list))) (setq dlist (cdr dlist))) @@ -2033,9 +2033,9 @@ If optional argument is non-nil, checking is omitted." (default "date") in) (setq in - (completing-read + (completing-read (format "Sort by (%s): " default) - (mapcar + (mapcar (function (lambda (x) (cons x x))) input-range-list))) (if (string= in "") @@ -2051,11 +2051,11 @@ If optional argument is non-nil, checking is omitted." (let ((plugged (elmo-folder-plugged-p wl-summary-buffer-folder-name)) (last-progress 0) (i 0) - mark-alist unread-marks msgs mark importants unreads + mark-alist unread-marks msgs mark importants unreads importants-in-db unreads-in-db has-imap4 diff diffs mes num-ma progress) ;; synchronize marks. - (when (not (eq (elmo-folder-get-type + (when (not (eq (elmo-folder-get-type wl-summary-buffer-folder-name) 'internal)) (message "Updating marks...") @@ -2064,13 +2064,13 @@ If optional argument is non-nil, checking is omitted." wl-summary-new-mark) mark-alist (elmo-msgdb-get-mark-alist wl-summary-buffer-msgdb) num-ma (length mark-alist) - importants (elmo-list-folder-important + importants (elmo-list-folder-important wl-summary-buffer-folder-name (elmo-msgdb-get-overview wl-summary-buffer-msgdb)) - has-imap4 (elmo-folder-contains-type + has-imap4 (elmo-folder-contains-type wl-summary-buffer-folder-name 'imap4) unreads (if (and has-imap4 plugged) - (elmo-list-folder-unread + (elmo-list-folder-unread wl-summary-buffer-folder-name mark-alist unread-marks))) (while mark-alist @@ -2127,12 +2127,12 @@ If optional argument is non-nil, checking is omitted." (setq in wl-summary-update-confirm-threshold) (catch 'end (while t - (setq in (read-from-minibuffer "Update number: " + (setq in (read-from-minibuffer "Update number: " (int-to-string in)) in (string-to-int in)) (if (< len in) (throw 'end len)) - (if (y-or-n-p (format "%d messages are disappeared. OK?" + (if (y-or-n-p (format "%d messages are disappeared. OK?" (max (- len in) 0))) (throw 'end in)))) (nthcdr (max (- len in) 0) appends)) @@ -2164,7 +2164,7 @@ If optional argument is non-nil, checking is omitted." update-thread update-top-list mark expunged msgs unreads importants) ;(setq seen-list nil) ;for debug. - (fset 'wl-summary-append-message-func-internal + (fset 'wl-summary-append-message-func-internal (wl-summary-get-append-message-func)) ;; Flush pending append operations (disconnected operation). (setq seen-list @@ -2192,7 +2192,7 @@ If optional argument is non-nil, checking is omitted." ;; Don't delete important-marked msgs other than 'internal. (unless (eq (elmo-folder-get-type folder) 'internal) (setq delete-list - (wl-summary-delete-important-msgs-from-list delete-list + (wl-summary-delete-important-msgs-from-list delete-list mark-alist))) (if (and has-nntp (elmo-nntp-max-number-precedes-list-active-p)) @@ -2218,11 +2218,11 @@ If optional argument is non-nil, checking is omitted." (message "Deleting...done.")) ;;(set-buffer cur-buf) ;; Change "New" marks to "Uncached Unread" marks. - (wl-summary-set-status-marks mark-alist - wl-summary-new-mark + (wl-summary-set-status-marks mark-alist + wl-summary-new-mark wl-summary-unread-uncached-mark) - (wl-summary-set-status-marks-on-buffer - wl-summary-new-mark + (wl-summary-set-status-marks-on-buffer + wl-summary-new-mark wl-summary-unread-uncached-mark) ;; Confirm appended message number. (setq append-list (wl-summary-confirm-appends initial-append-list)) @@ -2235,8 +2235,8 @@ If optional argument is non-nil, checking is omitted." (if append-list (progn (setq i 0) - (setq result (elmo-msgdb-create - folder + (setq result (elmo-msgdb-create + folder append-list wl-summary-new-mark wl-summary-unread-cached-mark ; ! @@ -2263,12 +2263,12 @@ If optional argument is non-nil, checking is omitted." (while curp (setq entity (car curp)) (when (setq update-thread - (wl-summary-append-message-func-internal - entity overview mark-alist + (wl-summary-append-message-func-internal + entity overview mark-alist (not sync-all))) (wl-append update-top-list update-thread)) (if elmo-use-database - (elmo-database-msgid-put + (elmo-database-msgid-put (car entity) folder (elmo-msgdb-overview-entity-get-number entity))) (setq curp (cdr curp)) @@ -2310,7 +2310,7 @@ If optional argument is non-nil, checking is omitted." (if elmo-use-database (elmo-database-close)) (run-hooks 'wl-summary-sync-updated-hook) - (setq ret-val (format "Updated (-%d/+%d) message(s)" + (setq ret-val (format "Updated (-%d/+%d) message(s)" (length delete-list) num))) ;; synchronize marks. (if wl-summary-auto-sync-marks @@ -2318,14 +2318,14 @@ If optional argument is non-nil, checking is omitted." ;; scoring (when wl-use-scoring (setq wl-summary-scored nil) - (wl-summary-score-headers nil msgdb + (wl-summary-score-headers nil msgdb (and sync-all (wl-summary-rescore-msgs number-alist)) sync-all) (when (and wl-summary-scored (setq expunged (wl-summary-score-update-all-lines))) - (setq ret-val (concat ret-val - (format " (%d expunged)" + (setq ret-val (concat ret-val + (format " (%d expunged)" (length expunged)))))) ;; crosspost (setq crossed2 (wl-summary-update-crosspost)) @@ -2340,8 +2340,8 @@ If optional argument is non-nil, checking is omitted." (and ret-val (setq ret-val (concat ret-val ".")))) ;; Update Folder mode - (wl-folder-set-folder-updated folder (list 0 - (wl-summary-count-unread + (wl-folder-set-folder-updated folder (list 0 + (wl-summary-count-unread (elmo-msgdb-get-mark-alist msgdb)) (length in-folder))) @@ -2357,7 +2357,7 @@ If optional argument is non-nil, checking is omitted." (if (and wl-summary-highlight (not (get-text-property (point) 'face))) (save-excursion - (forward-line (- 0 + (forward-line (- 0 (or wl-summary-partial-highlight-above-lines wl-summary-highlight-partial-threshold))) @@ -2395,7 +2395,7 @@ If optional argument is non-nil, checking is omitted." "+"))))) (defun wl-summary-update-modeline () - (setq wl-summary-buffer-unread-status + (setq wl-summary-buffer-unread-status (format " {%s}(%d new/%d unread)" (if (eq wl-summary-buffer-view 'thread) "T" "S") @@ -2405,8 +2405,8 @@ If optional argument is non-nil, checking is omitted." (defsubst wl-summary-jump-to-msg (&optional number) (interactive) - (let ((num (or number - (string-to-int + (let ((num (or number + (string-to-int (read-from-minibuffer "Jump to Message(No.): "))))) (setq num (int-to-string num)) (if (re-search-forward (concat "^[ \t]*" num "[^0-9]") nil t) @@ -2457,9 +2457,9 @@ If optional argument is non-nil, checking is omitted." "Execute append operations that are done while offline status." (when (and (elmo-folder-plugged-p wl-summary-buffer-folder-name) elmo-enable-disconnected-operation) - (let* ((resumed-list (elmo-dop-append-list-load + (let* ((resumed-list (elmo-dop-append-list-load wl-summary-buffer-folder-name t)) - (append-list (elmo-dop-append-list-load + (append-list (elmo-dop-append-list-load wl-summary-buffer-folder-name)) (appends (append resumed-list append-list)) (number-alist (elmo-msgdb-get-number-alist wl-summary-buffer-msgdb)) @@ -2485,7 +2485,7 @@ If optional argument is non-nil, checking is omitted." ;; delete resume-file (elmo-dop-append-list-save wl-summary-buffer-folder-name nil t) (when append-list - (elmo-dop-flush-pending-append-operations + (elmo-dop-flush-pending-append-operations wl-summary-buffer-folder-name append-list))))) seen-list) @@ -2519,7 +2519,7 @@ If optional argument is non-nil, checking is omitted." (let ((inhibit-read-only t) (buffer-read-only nil)) (erase-buffer)) - ;; (if wl-summary-cache-use (wl-summary-save-view-cache)) + ;; (if wl-summary-cache-use (wl-summary-save-view-cache)) (message "Deleting...done.") t) nil)))) @@ -2528,7 +2528,7 @@ If optional argument is non-nil, checking is omitted." "Toggle thread status (T)hread and (S)equencial." (interactive "P") (when (or arg - (y-or-n-p (format "Toggle threading? (y=%s): " + (y-or-n-p (format "Toggle threading? (y=%s): " (if (eq wl-summary-buffer-view 'thread) "\"off\"" "\"on\"")))) (if (eq wl-summary-buffer-view 'thread) @@ -2543,7 +2543,7 @@ If optional argument is non-nil, checking is omitted." (save-excursion (let ((tmp-buffer (get-buffer-create " *wl-summary-load-file-object*")) insert-file-contents-pre-hook ; To avoid autoconv-xmas... - insert-file-contents-post-hook + insert-file-contents-post-hook ret-val) (if (not (file-readable-p filename)) () @@ -2551,7 +2551,7 @@ If optional argument is non-nil, checking is omitted." (as-binary-input-file (insert-file-contents filename)) (setq ret-val (condition-case nil - (read (current-buffer)) + (read (current-buffer)) (error (error "reading failed"))))) (kill-buffer tmp-buffer) ret-val))) @@ -2586,11 +2586,11 @@ If optional argument is non-nil, checking is omitted." (message "Current summary buffer is already sticky.") (when (or force (y-or-n-p "Stick current summary buffer?")) (wl-summary-toggle-disp-msg 'off) - (wl-summary-switch-to-clone-buffer - (wl-summary-sticky-buffer-name + (wl-summary-switch-to-clone-buffer + (wl-summary-sticky-buffer-name wl-summary-buffer-folder-name)) ;;; ???hang up -; (rename-buffer (wl-summary-sticky-buffer-name +; (rename-buffer (wl-summary-sticky-buffer-name ; wl-summary-buffer-folder-name))) (message "Folder `%s' is now sticky." wl-summary-buffer-folder-name)))) @@ -2640,7 +2640,7 @@ If optional argument is non-nil, checking is omitted." copy-variables) (switch-to-buffer buf) (kill-buffer cur-buf) - (wl-summary-count-unread + (wl-summary-count-unread (elmo-msgdb-get-mark-alist wl-summary-buffer-msgdb)) (wl-summary-update-modeline) (if msg @@ -2657,7 +2657,7 @@ If optional argument is non-nil, checking is omitted." (defun wl-summary-get-buffer-create (folder &optional force-sticky) (if force-sticky - (get-buffer-create + (get-buffer-create (wl-summary-sticky-buffer-name folder)) (or (get-buffer (wl-summary-sticky-buffer-name folder)) (get-buffer-create wl-summary-buffer-name)))) @@ -2687,7 +2687,7 @@ If optional argument is non-nil, checking is omitted." (delete-window mes-win) (run-hooks 'wl-summary-toggle-disp-off-hook)))) -(defun wl-summary-goto-folder-subr (&optional folder scan-type other-window +(defun wl-summary-goto-folder-subr (&optional folder scan-type other-window sticky interactive scoring) "Display target folder on summary" (interactive) @@ -2741,18 +2741,18 @@ If optional argument is non-nil, checking is omitted." (point-min)(point-max) wl-summary-buffer-mime-charset)) (when (file-exists-p view) - (setq wl-summary-buffer-view + (setq wl-summary-buffer-view (wl-summary-load-file-object view))) (if (eq wl-summary-buffer-view 'thread) (wl-thread-resume-entity fld)))) ;; Load msgdb (setq wl-summary-buffer-msgdb nil) ; new msgdb - (setq wl-summary-buffer-msgdb + (setq wl-summary-buffer-msgdb (wl-summary-msgdb-load-async fld)) (if (null wl-summary-buffer-msgdb) - (setq wl-summary-buffer-msgdb + (setq wl-summary-buffer-msgdb (elmo-msgdb-load (elmo-string fld)))) - (wl-summary-count-unread + (wl-summary-count-unread (elmo-msgdb-get-mark-alist wl-summary-buffer-msgdb)) (wl-summary-update-modeline))) (wl-summary-buffer-number-column-detect t) @@ -2767,7 +2767,7 @@ If optional argument is non-nil, checking is omitted." interactive (not wl-ask-range)) (setq scan-type (wl-summary-get-sync-range fld))) - (cond + (cond ((eq scan-type nil) (wl-summary-sync 'unset-cursor)) ((eq scan-type 'all) @@ -2787,7 +2787,7 @@ If optional argument is non-nil, checking is omitted." (goto-char (point-min)) (if (wl-summary-cursor-down t) (let ((unreadp (wl-thread-next-mark-p - (wl-thread-entity-get-mark + (wl-thread-entity-get-mark (wl-summary-message-number)) wl-summary-move-order))) (cond ((and wl-auto-select-first unreadp) @@ -2795,7 +2795,7 @@ If optional argument is non-nil, checking is omitted." ((not unreadp) (setq retval 'more-next)))) (goto-char (point-max)) - (if (elmo-folder-plugged-p folder) + (if (elmo-folder-plugged-p folder) (forward-line -1) (wl-summary-prev)) (setq retval 'more-next)) @@ -2806,15 +2806,15 @@ If optional argument is non-nil, checking is omitted." (> (count-lines (point-min) (point-max)) wl-summary-highlight-partial-threshold)) (save-excursion - (forward-line (- - 0 + (forward-line (- + 0 (or wl-summary-partial-highlight-above-lines wl-summary-highlight-partial-threshold))) (wl-highlight-summary (point) (point-max))) (wl-highlight-summary (point-min) (point-max)))) (if (null wl-summary-buffer-msgdb) ;; one more try. - (setq wl-summary-buffer-msgdb + (setq wl-summary-buffer-msgdb (elmo-msgdb-load (elmo-string fld)))) (if (eq retval 'disp-msg) (wl-summary-redisplay)) @@ -2843,15 +2843,15 @@ If optional argument is non-nil, checking is omitted." (when (re-search-backward (format "^ *%s..../..\(.*\)..:.. " parent-number) nil t) (goto-char (match-end 0)) - (while (string-match wl-thread-indent-regexp + (while (string-match wl-thread-indent-regexp (char-to-string - (char-after (point)))) + (char-after (point)))) (setq depth (+ 1 depth)) (forward-char)) (/ depth wl-thread-indent-level-internal)))) (defun wl-summary-goto-bottom-of-current-thread () - (if (re-search-forward (concat "^" wl-summary-buffer-number-regexp + (if (re-search-forward (concat "^" wl-summary-buffer-number-regexp "..../..\(.*\)..:.. [[<]") nil t) () (goto-char (point-max)))) @@ -2859,30 +2859,30 @@ If optional argument is non-nil, checking is omitted." (defun wl-summary-goto-top-of-current-thread () (wl-summary-jump-to-msg (wl-thread-entity-get-number - (wl-thread-entity-get-top-entity (wl-thread-get-entity + (wl-thread-entity-get-top-entity (wl-thread-get-entity (wl-summary-message-number)))))) (defun wl-summary-goto-bottom-of-sub-thread (&optional depth) (interactive) - (let ((depth (or depth + (let ((depth (or depth (wl-thread-get-depth-of-current-line)))) (forward-line 1) (while (and (not (eobp)) - (>= (wl-thread-get-depth-of-current-line) + (>= (wl-thread-get-depth-of-current-line) depth)) (forward-line 1)) (beginning-of-line))) (defun wl-summary-insert-line (line) "Insert LINE in the Summary." - (if wl-use-highlight-mouse-line + (if wl-use-highlight-mouse-line ;; remove 'mouse-face of current line. (put-text-property (save-excursion (beginning-of-line)(point)) (save-excursion (end-of-line)(point)) 'mouse-face nil)) (insert line "\n") - (if wl-use-highlight-mouse-line + (if wl-use-highlight-mouse-line ;; remove 'mouse-face of current line. (put-text-property (save-excursion (beginning-of-line)(point)) @@ -2898,7 +2898,7 @@ If optional argument is non-nil, checking is omitted." summary-line msg) (setq msg (elmo-msgdb-overview-entity-get-number entity)) (when (setq summary-line - (wl-summary-overview-create-summary-line + (wl-summary-overview-create-summary-line msg entity nil 0 mark-alist)) (let ((inhibit-read-only t) buffer-read-only) @@ -2999,7 +2999,7 @@ If optional argument is non-nil, checking is omitted." (let (update-list entity-stack) (while entity (let* ((this-id (elmo-msgdb-overview-entity-get-id entity)) - (parent-entity + (parent-entity (elmo-msgdb-overview-get-parent-entity entity overview));; temp ;;(parent-id (elmo-msgdb-overview-entity-get-id parent-entity)) (parent-number (elmo-msgdb-overview-entity-get-number parent-entity)) @@ -3029,10 +3029,10 @@ If optional argument is non-nil, checking is omitted." ;; If subject is change, divide thread. (if (and parent-number wl-summary-divide-thread-when-subject-changed - (not (wl-summary-subject-equal - (or (elmo-msgdb-overview-entity-get-subject + (not (wl-summary-subject-equal + (or (elmo-msgdb-overview-entity-get-subject entity) "") - (or (elmo-msgdb-overview-entity-get-subject + (or (elmo-msgdb-overview-entity-get-subject parent-entity) "")))) (setq parent-number nil)) ;; @@ -3052,9 +3052,9 @@ If optional argument is non-nil, checking is omitted." (setq entity (pop entity-stack))))) update-list)) -(defun wl-summary-update-thread (entity - overview - mark-alist +(defun wl-summary-update-thread (entity + overview + mark-alist thr-entity parent-entity) (let* ((depth 0) @@ -3063,13 +3063,13 @@ If optional argument is non-nil, checking is omitted." (parent-id (elmo-msgdb-overview-entity-get-id parent-entity)) (parent-number (elmo-msgdb-overview-entity-get-number parent-entity)) summary-line msg subject-differ) - (cond + (cond ((or (not parent-id) (string= this-id parent-id)) (goto-char (point-max)) (beginning-of-line)) ;; parent already exists in buffer. - ((setq depth (or (wl-summary-summary-line-already-exists-p + ((setq depth (or (wl-summary-summary-line-already-exists-p parent-number (current-buffer)) -1)) (setq depth (+ 1 depth)) (wl-thread-goto-bottom-of-sub-thread))) @@ -3083,7 +3083,7 @@ If optional argument is non-nil, checking is omitted." (buffer-read-only nil)) (wl-summary-insert-line summary-line)))))) -(defun wl-summary-mark-as-unread (&optional number +(defun wl-summary-mark-as-unread (&optional number no-server-update no-modeline-update) (interactive) @@ -3096,7 +3096,7 @@ If optional argument is non-nil, checking is omitted." (mark-alist (elmo-msgdb-get-mark-alist msgdb)) ;;(number-alist (elmo-msgdb-get-number-alist msgdb)) new-mark visible mark) - (if number + (if number (progn (setq visible (wl-summary-jump-to-msg number)) (unless (setq mark (cadr (assq number mark-alist))) @@ -3114,8 +3114,8 @@ If optional argument is non-nil, checking is omitted." (if (or (and (not visible) ;; already exists in msgdb. (assq number (elmo-msgdb-get-number-alist msgdb))) - (re-search-forward - (format (concat "^ *\\(" + (re-search-forward + (format (concat "^ *\\(" (if number (int-to-string number) "[0-9]+") "\\)[^0-9]\\(%s\\|%s\\)") @@ -3144,12 +3144,12 @@ If optional argument is non-nil, checking is omitted." new-mark)) (elmo-msgdb-set-mark-alist msgdb mark-alist) (unless no-modeline-update - (setq wl-summary-buffer-unread-count + (setq wl-summary-buffer-unread-count (+ 1 wl-summary-buffer-unread-count)) (wl-summary-update-modeline) - (wl-folder-update-unread + (wl-folder-update-unread folder - (+ wl-summary-buffer-unread-count + (+ wl-summary-buffer-unread-count wl-summary-buffer-new-count))) (wl-summary-set-mark-modified) (if (and visible wl-summary-highlight) @@ -3233,7 +3233,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." ;; opened...only myself is checked. (if (wl-summary-check-mark number mark) (wl-append msglist (list number))) - (unless (wl-thread-entity-get-opened entity) + (unless (wl-thread-entity-get-opened entity) ;; closed...children is also checked. (if (setq result (wl-thread-get-children-msgs-with-mark number @@ -3242,7 +3242,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (forward-line 1))) (elmo-uniq-list msglist)) (let* ((case-fold-search nil) - (re (format (concat wl-summary-message-regexp "%s") + (re (format (concat wl-summary-message-regexp "%s") (regexp-quote mark)))) (while (re-search-forward re nil t) (setq msglist (cons (wl-summary-message-number) msglist))) @@ -3272,7 +3272,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (if (not (or moves dels copies)) (message "No marks") (save-excursion - (let ((del-fld (wl-summary-get-delete-folder + (let ((del-fld (wl-summary-get-delete-folder wl-summary-buffer-folder-name)) (start (point)) (unread-marks (list wl-summary-unread-cached-mark @@ -3302,18 +3302,18 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (goto-char start) ; avoid moving cursor to ; the bottom line. (while dst-msgs - ;;(elmo-msgdb-add-msgs-to-seen-list - ;; (car (car dst-msgs)) ;dst-folder - ;; (cdr (car dst-msgs)) ;msgs - ;; wl-summary-buffer-msgdb + ;;(elmo-msgdb-add-msgs-to-seen-list + ;; (car (car dst-msgs)) ;dst-folder + ;; (cdr (car dst-msgs)) ;msgs + ;; wl-summary-buffer-msgdb ;; (concat wl-summary-important-mark ;; wl-summary-read-uncached-mark)) (setq result nil) (condition-case nil - (setq result (elmo-move-msgs wl-summary-buffer-folder-name + (setq result (elmo-move-msgs wl-summary-buffer-folder-name (cdr (car dst-msgs)) (car (car dst-msgs)) - wl-summary-buffer-msgdb + wl-summary-buffer-msgdb refile-len refile-executed (not (null (cdr dst-msgs))) @@ -3329,7 +3329,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (setq wl-summary-buffer-refile-list (wl-delete-associations (cdr (car dst-msgs)) wl-summary-buffer-refile-list))) - (setq refile-failures + (setq refile-failures (+ refile-failures (length (cdr (car dst-msgs)))))) (setq refile-executed (+ refile-executed (length (cdr (car dst-msgs))))) (setq dst-msgs (cdr dst-msgs))) @@ -3337,20 +3337,20 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." ;; begin cOpy... (setq dst-msgs (wl-inverse-alist copies wl-summary-buffer-copy-list)) (while dst-msgs - ;;(elmo-msgdb-add-msgs-to-seen-list - ;; (car (car dst-msgs)) ;dst-folder - ;; (cdr (car dst-msgs)) ;msgs - ;; wl-summary-buffer-msgdb + ;;(elmo-msgdb-add-msgs-to-seen-list + ;; (car (car dst-msgs)) ;dst-folder + ;; (cdr (car dst-msgs)) ;msgs + ;; wl-summary-buffer-msgdb ;; (concat wl-summary-important-mark ;; wl-summary-read-uncached-mark)) (setq result nil) (condition-case nil - (setq result (elmo-move-msgs wl-summary-buffer-folder-name + (setq result (elmo-move-msgs wl-summary-buffer-folder-name (cdr (car dst-msgs)) (car (car dst-msgs)) - wl-summary-buffer-msgdb + wl-summary-buffer-msgdb copy-len - copy-executed + copy-executed (not (null (cdr dst-msgs))) t ; t is no-delete (copy) nil ; same number @@ -3368,7 +3368,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (+ copy-failures (length (cdr (car dst-msgs)))))) (setq copy-executed (+ copy-executed (length (cdr (car dst-msgs))))) (setq dst-msgs (cdr dst-msgs))) - ;; end cOpy + ;; end cOpy (wl-summary-folder-info-update) (wl-summary-set-message-modified) (wl-summary-set-mark-modified) @@ -3451,8 +3451,8 @@ If optional argument DST is specified, put mark without asking destination folder. If optional argument NUMBER is specified, mark message specified by NUMBER. -If folder is read-only, message should be copied. -See `wl-refile-policy-alist' for more details." +If folder is read-only, message should be copied. +See `wl-refile-policy-alist' for more details." (interactive) (let ((policy (wl-get-assoc-list-value wl-refile-policy-alist wl-summary-buffer-folder-name))) @@ -3475,14 +3475,14 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (interactive) (let* ((buffer-num (wl-summary-message-number)) (msg-num (or number buffer-num)) - (msgid (and msg-num + (msgid (and msg-num (cdr (assq msg-num (elmo-msgdb-get-number-alist wl-summary-buffer-msgdb))))) (entity (and msg-num (elmo-msgdb-overview-get-entity msg-num wl-summary-buffer-msgdb))) - (variable + (variable (intern (format "wl-summary-buffer-%s-list" copy-or-refile))) folder mark already tmp-folder) (catch 'done @@ -3501,17 +3501,17 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (error "Already marked as `%s'" mark)) (throw 'done nil))) (setq folder (and msg-num - (or dst (wl-summary-read-folder + (or dst (wl-summary-read-folder (or (wl-refile-guess entity) wl-trash-folder) (format "for %s" copy-or-refile))))) ;; Cache folder hack by okada@opaopa.org (if (and (eq (car (elmo-folder-get-spec folder)) 'cache) (not (string= folder (setq tmp-folder - (concat "'cache/" + (concat "'cache/" (elmo-cache-get-path-subr (elmo-msgid-to-cache msgid))))))) - (progn + (progn (setq folder tmp-folder) (message "Force refile to %s." folder))) (if (string= folder wl-summary-buffer-folder-name) @@ -3528,7 +3528,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (if (string= "refile" copy-or-refile) (wl-refile-learn entity folder)) (wl-summary-unmark msg-num) - (set variable (append + (set variable (append (symbol-value variable) (list (cons msg-num folder)))) (when (or interactive @@ -3563,7 +3563,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (wl-summary-prev) (wl-summary-next))) -(defsubst wl-summary-no-auto-refile-message-p (msg mark-alist) +(defsubst wl-summary-no-auto-refile-message-p (msg mark-alist) (member (cadr (assq msg mark-alist)) wl-summary-auto-refile-skip-marks)) (defun wl-summary-auto-refile (&optional open-all) @@ -3572,7 +3572,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (message "Marking...") (save-excursion (if (and (eq wl-summary-buffer-view 'thread) - open-all) + open-all) (wl-thread-open-all)) (let* ((spec wl-summary-buffer-folder-name) (overview (elmo-msgdb-get-overview @@ -3585,7 +3585,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (goto-line 1) (while (not (eobp)) (setq number (wl-summary-message-number)) - (when (and (not (wl-summary-no-auto-refile-message-p number + (when (and (not (wl-summary-no-auto-refile-message-p number mark-alist)) (setq dst (wl-refile-guess-by-rule @@ -3602,12 +3602,12 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." ;; process invisible children. (if (not (wl-thread-entity-get-opened (setq thr-entity (wl-thread-get-entity number)))) - (mapcar + (mapcar (function (lambda (x) - (when (and (setq dst + (when (and (setq dst (wl-refile-guess-by-rule - (elmo-msgdb-overview-get-entity + (elmo-msgdb-overview-get-entity x wl-summary-buffer-msgdb))) (not (equal dst spec))) (if (wl-summary-refile dst x) @@ -3615,7 +3615,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (message "Marking...%d message(s)." count)))) (elmo-delete-if (function (lambda (x) - (wl-summary-no-auto-refile-message-p + (wl-summary-no-auto-refile-message-p x mark-alist))) (wl-thread-entity-get-descendant thr-entity))))) @@ -3625,7 +3625,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (message "Marked %d message(s)." count))))) (defun wl-summary-unmark (&optional number) - "Unmark marks (temporary, refile, copy, delete)of current line. + "Unmark marks (temporary, refile, copy, delete)of current line. If optional argument NUMBER is specified, unmark message specified by NUMBER." (interactive) (save-excursion @@ -3640,7 +3640,7 @@ If optional argument NUMBER is specified, unmark message specified by NUMBER." (setq visible (wl-summary-jump-to-msg number)) (setq visible t)) ;; Delete mark on buffer. - (when (and visible + (when (and visible (looking-at "^ *\\([0-9]+\\)\\([^0-9]\\)")) (goto-char (match-end 2)) (or number @@ -3655,7 +3655,7 @@ If optional argument NUMBER is specified, unmark message specified by NUMBER." (if (or (string= cur-mark "o") (string= cur-mark "O")) (wl-summary-remove-destination)) - (if wl-summary-highlight + (if wl-summary-highlight (wl-highlight-summary-current-line nil nil score-mark)) (set-buffer-modified-p nil)) ;; Remove from temporary mark structure. @@ -3810,14 +3810,14 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (defun wl-summary-target-mark-all () (interactive) (wl-summary-target-mark-region (point-min) (point-max)) - (setq wl-summary-buffer-target-mark-list - (mapcar 'car + (setq wl-summary-buffer-target-mark-list + (mapcar 'car (elmo-msgdb-get-number-alist wl-summary-buffer-msgdb)))) (defun wl-summary-delete-all-mark (mark) (goto-char (point-min)) (let ((case-fold-search nil)) - (while (re-search-forward (format "^ *[0-9]+%s" + (while (re-search-forward (format "^ *[0-9]+%s" (regexp-quote mark)) nil t) (wl-summary-unmark)) (cond ((string= mark "*") @@ -3894,7 +3894,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (setq mlist (cdr mlist))) (setq wl-summary-buffer-target-mark-list nil))) (setq field (downcase field)) - (cond + (cond ((string-match field "from") (setq get-func 'elmo-msgdb-overview-entity-get-from)) ((string-match field "subject") @@ -3922,7 +3922,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (progn (message "Searching...") (let ((elmo-mime-charset wl-summary-buffer-mime-charset)) - (setq result (elmo-search wl-summary-buffer-folder-name + (setq result (elmo-search wl-summary-buffer-folder-name (list server-side-search)))) (if from-list (setq result (elmo-list-filter from-list result))) @@ -3931,11 +3931,11 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (message "Searching...") (while overview (when (and (string-match value - (or + (or (funcall get-func (car overview)) "")) (or (not from-list) - (memq + (memq (elmo-msgdb-overview-entity-get-number (car overview)) from-list))) (setq result @@ -3966,9 +3966,9 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (if arg (wl-summary-unvirtual) (let* ((completion-ignore-case t) - (field (completing-read (format "Field name (%s): " + (field (completing-read (format "Field name (%s): " wl-summary-pick-field-default) - '(("From" . "From") + '(("From" . "From") ("Subject" . "Subject") ("To" . "To") ("Cc" . "Cc") @@ -3978,7 +3978,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (value (read-from-minibuffer "Value: "))) (if (string= field "") (setq field wl-summary-pick-field-default)) - (wl-summary-goto-folder-subr (concat "/" (downcase field) "=" value "/" + (wl-summary-goto-folder-subr (concat "/" (downcase field) "=" value "/" wl-summary-buffer-folder-name) 'update nil nil t)))) @@ -4007,7 +4007,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (delq number wl-summary-buffer-delete-list))) (t (let (pair) - (cond + (cond ((setq pair (assq number wl-summary-buffer-copy-list)) (setq wl-summary-buffer-copy-list (delq pair wl-summary-buffer-copy-list))) @@ -4078,7 +4078,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (delete-region (match-beginning 1) (match-end 1))) (goto-char (match-beginning 1)) (insert new-mark) - (if wl-summary-highlight + (if wl-summary-highlight (wl-highlight-summary-current-line)) (save-excursion (goto-char pos) @@ -4125,7 +4125,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." ;; process invisible messages. (setq mlist wl-summary-buffer-target-mark-list) (while mlist - (set variable + (set variable (append (symbol-value variable) (list (cons (car mlist) folder)))) (setq wl-summary-buffer-target-mark-list @@ -4154,7 +4154,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (delete-region (match-beginning 1) (match-end 1)) (insert " ") (setq number (wl-summary-mark-as-read t)) - (if wl-summary-highlight + (if wl-summary-highlight (wl-highlight-summary-current-line)) (if number (setq wl-summary-buffer-target-mark-list @@ -4165,7 +4165,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (setq wl-summary-buffer-target-mark-list (delq (car mlist) wl-summary-buffer-target-mark-list)) (setq mlist (cdr mlist))) - (wl-summary-count-unread + (wl-summary-count-unread (elmo-msgdb-get-mark-alist wl-summary-buffer-msgdb)) (wl-summary-update-modeline)))) @@ -4183,7 +4183,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (delete-region (match-beginning 1) (match-end 1)) (insert " ") (setq number (wl-summary-mark-as-unread)) - (if wl-summary-highlight + (if wl-summary-highlight (wl-highlight-summary-current-line)) (if number (setq wl-summary-buffer-target-mark-list @@ -4195,7 +4195,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (setq wl-summary-buffer-target-mark-list (delq (car mlist) wl-summary-buffer-target-mark-list)) (setq mlist (cdr mlist))) - (wl-summary-count-unread + (wl-summary-count-unread (elmo-msgdb-get-mark-alist wl-summary-buffer-msgdb)) (wl-summary-update-modeline)))) @@ -4213,7 +4213,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (delete-region (match-beginning 1) (match-end 1)) (insert " ") (setq number (wl-summary-mark-as-important)) - (if wl-summary-highlight + (if wl-summary-highlight (wl-highlight-summary-current-line)) (if number (setq wl-summary-buffer-target-mark-list @@ -4225,7 +4225,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (setq wl-summary-buffer-target-mark-list (delq (car mlist) wl-summary-buffer-target-mark-list)) (setq mlist (cdr mlist))) - (wl-summary-count-unread + (wl-summary-count-unread (elmo-msgdb-get-mark-alist wl-summary-buffer-msgdb)) (wl-summary-update-modeline)))) @@ -4251,9 +4251,9 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (interactive) (wl-summary-pick wl-summary-buffer-target-mark-list 'delete)) -(defun wl-summary-mark-as-read (&optional notcrosses +(defun wl-summary-mark-as-read (&optional notcrosses leave-server-side-mark-untouched - displayed + displayed number no-cache) (interactive) @@ -4267,7 +4267,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." ;;(number-alist (elmo-msgdb-get-number-alist msgdb)) (case-fold-search nil) mark unread visible uncached new-mark) - (if number + (if number (progn (setq visible (wl-summary-jump-to-msg number)) (setq mark (cadr (assq number mark-alist)))) @@ -4275,7 +4275,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (beginning-of-line) (if (or (not visible) (looking-at - (format "^ *\\([0-9]+\\)[^0-9]\\(%s\\|%s\\|%s\\|%s\\).*$" + (format "^ *\\([0-9]+\\)[^0-9]\\(%s\\|%s\\|%s\\|%s\\).*$" (regexp-quote wl-summary-read-uncached-mark) (regexp-quote wl-summary-unread-uncached-mark) (regexp-quote wl-summary-unread-cached-mark) @@ -4283,32 +4283,32 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (progn (setq mark (or mark (wl-match-buffer 2))) (when mark - (cond + (cond ((string= mark wl-summary-new-mark) ; N - (setq wl-summary-buffer-new-count + (setq wl-summary-buffer-new-count (- wl-summary-buffer-new-count 1)) (setq uncached t) (setq unread t)) ((string= mark wl-summary-unread-uncached-mark) ; U - (setq wl-summary-buffer-unread-count + (setq wl-summary-buffer-unread-count (- wl-summary-buffer-unread-count 1)) (setq uncached t) (setq unread t)) ((string= mark wl-summary-unread-cached-mark) ; ! - (setq wl-summary-buffer-unread-count + (setq wl-summary-buffer-unread-count (- wl-summary-buffer-unread-count 1)) (setq unread t)) (t ;; no need to mark server. (setq leave-server-side-mark-untouched t))) (wl-summary-update-modeline) - (wl-folder-update-unread + (wl-folder-update-unread folder - (+ wl-summary-buffer-unread-count + (+ wl-summary-buffer-unread-count wl-summary-buffer-new-count))) (setq number (or number (string-to-int (wl-match-buffer 1)))) ;; set server side mark... - (setq new-mark (if (and uncached no-cache) + (setq new-mark (if (and uncached no-cache) wl-summary-read-uncached-mark nil)) (if (not leave-server-side-mark-untouched) @@ -4349,7 +4349,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (mark-alist (elmo-msgdb-get-mark-alist msgdb)) (number-alist (elmo-msgdb-get-number-alist msgdb)) message-id visible) - (if number + (if number (progn (setq visible (wl-summary-jump-to-msg number)) (setq mark (or mark (cadr (assq number mark-alist))))) @@ -4399,7 +4399,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (elmo-force-cache-msg folder number message-id (elmo-msgdb-get-location msgdb)))) (unless no-server-update - (elmo-msgdb-global-mark-set message-id + (elmo-msgdb-global-mark-set message-id wl-summary-important-mark))) (elmo-msgdb-set-mark-alist msgdb mark-alist) (wl-summary-set-mark-modified))) @@ -4410,7 +4410,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (defsubst wl-summary-format-date (date-string) (condition-case nil - (let ((datevec (timezone-fix-time date-string nil + (let ((datevec (timezone-fix-time date-string nil wl-summary-fix-timezone))) (format "%02d/%02d(%s)%02d:%02d" (aref datevec 1) @@ -4422,12 +4422,12 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (aref datevec 4))) (error "??/??(??)??:??"))) -(defun wl-summary-overview-create-summary-line (msg - entity - parent-entity +(defun wl-summary-overview-create-summary-line (msg + entity + parent-entity depth mark-alist - &optional + &optional children-num temp-mark thr-entity subject-differ) @@ -4445,15 +4445,15 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (setq linked (wl-thread-entity-get-linked thr-entity))) (if (string= thr-str "") (setq no-parent t)) ; no parent - (if (and wl-summary-width + (if (and wl-summary-width wl-summary-indent-length-limit (< wl-summary-indent-length-limit (string-width thr-str))) - (setq thr-str (wl-set-string-width + (setq thr-str (wl-set-string-width wl-summary-indent-length-limit thr-str))) - (setq from - (wl-set-string-width + (setq from + (wl-set-string-width (if children-num (- wl-from-width (length children-num) 2) wl-from-width) @@ -4462,20 +4462,20 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (elmo-msgdb-overview-entity-get-from entity))))) (setq subject (elmo-delete-char ?\n - (or (elmo-msgdb-overview-entity-get-subject + (or (elmo-msgdb-overview-entity-get-subject entity) wl-summary-no-subject-message))) - (setq parent-raw-subject + (setq parent-raw-subject (elmo-msgdb-overview-entity-get-subject parent-entity)) - (setq parent-subject - (if parent-raw-subject + (setq parent-subject + (if parent-raw-subject (elmo-delete-char ?\n parent-raw-subject))) (setq mark (or (cadr (assq msg mark-alist)) " ")) - (setq line - (concat + (setq line + (concat (setq before-indent - (format (concat "%" - (int-to-string + (format (concat "%" + (int-to-string wl-summary-buffer-number-column) "s%s%s%s %s") msg @@ -4494,18 +4494,18 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (setq subject (if (or no-parent (null parent-subject) - (not (wl-summary-subject-equal + (not (wl-summary-subject-equal subject parent-subject))) (wl-summary-subject-func-internal subject) "")) (if (and (not wl-summary-width) wl-subject-length-limit) (truncate-string subject wl-subject-length-limit) subject))))) - (if wl-summary-width (setq line - (wl-set-string-width + (if wl-summary-width (setq line + (wl-set-string-width (- wl-summary-width 1) line))) (if wl-summary-highlight - (wl-highlight-summary-line-string line + (wl-highlight-summary-line-string line mark temp-mark thr-str)) @@ -4517,7 +4517,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (goto-char (point-min)) (setq wl-summary-buffer-number-column (or - (if (and update + (if (and update (setq end (if (re-search-forward "^ *[0-9]+[^0-9]" nil t) (point)))) (- end (progn (beginning-of-line) (point)) 1)) @@ -4665,7 +4665,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (save-excursion (set-buffer tmp-buffer) (widen) - (encode-mime-charset-region + (encode-mime-charset-region (point-min) (point-max) charset) (as-binary-output-file (write-region (point-min) @@ -4689,7 +4689,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (defsubst wl-summary-get-sync-range (folder) (intern (or (and (elmo-folder-plugged-p folder) - (wl-get-assoc-list-value + (wl-get-assoc-list-value wl-folder-sync-range-alist folder)) wl-default-sync-range))) @@ -4698,11 +4698,11 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (defun wl-summary-input-range (folder) "returns update or all or rescan." ;; for the case when parts are expanded in the bottom of the folder - (let ((input-range-list '("update" "all" "rescan" "first:" "last:" + (let ((input-range-list '("update" "all" "rescan" "first:" "last:" "no-sync" "rescan-noscore")) - (default (or (wl-get-assoc-list-value + (default (or (wl-get-assoc-list-value wl-folder-sync-range-alist - folder) + folder) wl-default-sync-range)) range) (setq range @@ -4720,7 +4720,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (view-message-buffer (wl-message-get-buffer-create)) (cur-buf (current-buffer)) (summary-win (get-buffer-window (current-buffer)))) - (cond + (cond ((eq arg 'on) (setq wl-summary-buffer-disp-folder t) ;; hide your folder window @@ -4750,7 +4750,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (switch-to-buffer cur-buf)) (t (if (setq fld-buf (get-buffer wl-folder-buffer-name)) - (if (setq fld-win (get-buffer-window fld-buf)) + (if (setq fld-win (get-buffer-window fld-buf)) (setq wl-summary-buffer-disp-folder nil) (setq wl-summary-buffer-disp-folder t))) (if (not wl-summary-buffer-disp-folder) @@ -4805,7 +4805,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (view-message-buffer (wl-message-get-buffer-create)) (cur-buf (current-buffer)) summary-win) - (cond + (cond ((eq arg 'on) (setq wl-summary-buffer-disp-msg t) ;; hide your folder window @@ -4832,7 +4832,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." ;; hide your folder window ;; (setq fld-buf (get-buffer wl-folder-buffer-name)) ;; (if (setq fld-win (get-buffer-window fld-buf)) -;; (delete-window fld-win))) +;; (delete-window fld-win))) (run-hooks 'wl-summary-toggle-disp-on-hook)) (wl-delete-all-overlays) (save-excursion @@ -4882,7 +4882,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (setq cur-folder wl-message-buffer-cur-folder) (setq cur-number wl-message-buffer-cur-number)) (if (and (not ignore-original) - (not + (not (and (eq number (wl-message-original-buffer-number)) (string= folder (wl-message-original-buffer-folder))))) (progn @@ -4981,7 +4981,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." ;; for XEmacs! (if (and elmo-use-database (setq errmsg - (format + (format "No message with id \"%s\" in the database." msgid)) (setq otherfld (elmo-database-msgid-get msgid))) (if (cdr (wl-summary-jump-to-msg-internal @@ -4998,7 +4998,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (wl-summary-jump-to-msg-by-message-id-via-nntp msgid)) ((eq schar ?s) (wl-summary-jump-to-msg-by-message-id-via-nntp - msgid + msgid (read-from-minibuffer "NNTP Server: "))) (t (message errmsg) @@ -5049,7 +5049,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (defun wl-summary-jump-to-msg-internal (folder msg scan-type &optional msgid) (let (wl-auto-select-first entity) (if (or (string= folder wl-summary-buffer-folder-name) - (y-or-n-p + (y-or-n-p (format "Message was found in the folder \"%s\". Jump to it? " folder))) @@ -5066,7 +5066,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." wl-folder-entity 'folder)) (if entity - (wl-folder-set-current-entity-id + (wl-folder-set-current-entity-id (wl-folder-get-entity-id entity)))) (if (null msg) (message "Message was not found currently in this folder.") @@ -5084,16 +5084,16 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (message "No message.") (when (eq wl-summary-buffer-view 'thread) (cond ((and arg (not (numberp arg))) - (setq msg-num - (wl-thread-entity-get-number + (setq msg-num + (wl-thread-entity-get-number (wl-thread-entity-get-top-entity (wl-thread-get-entity number))))) ((and arg (numberp arg)) (setq i 0) (setq msg-num number) (while (< i arg) - (setq msg-num - (wl-thread-entity-get-number + (setq msg-num + (wl-thread-entity-get-number (wl-thread-entity-get-parent-entity (wl-thread-get-entity msg-num)))) (setq i (1+ i)))) @@ -5217,17 +5217,17 @@ Reply to author if invoked with argument." (other-window 1) ;; get original subject. (if summary-buf - (save-excursion + (save-excursion (set-buffer summary-buf) (setq num (wl-summary-message-number)) - (setq entity (assoc (cdr (assq num - (elmo-msgdb-get-number-alist + (setq entity (assoc (cdr (assq num + (elmo-msgdb-get-number-alist wl-summary-buffer-msgdb))) - (elmo-msgdb-get-overview + (elmo-msgdb-get-overview wl-summary-buffer-msgdb))) (and entity - (setq subject - (or (elmo-msgdb-overview-entity-get-subject entity) + (setq subject + (or (elmo-msgdb-overview-entity-get-subject entity) ""))))) (wl-draft-forward subject summary-buf) (unless without-setup-hook @@ -5301,7 +5301,7 @@ Reply to author if invoked with argument." (setq next-entity (wl-summary-get-prev-folder)) (if next-entity (setq finfo (wl-folder-get-entity-info next-entity)))) - (wl-ask-folder + (wl-ask-folder '(lambda () (wl-summary-next-folder-or-exit next-entity)) (format "No more messages. Type SPC to go to %s." @@ -5325,7 +5325,7 @@ Reply to author if invoked with argument." wl-summary-buffer-number-regexp skip-mark-regexp (regexp-quote wl-summary-unread-cached-mark) - (regexp-quote wl-summary-important-mark)))) + (regexp-quote wl-summary-important-mark)))) (unless (re-search-forward regex nil t) (forward-line 1) (setq goto-next t)) @@ -5340,7 +5340,7 @@ Reply to author if invoked with argument." (setq next-entity (wl-summary-get-next-folder)) (if next-entity (setq finfo (wl-folder-get-entity-info next-entity)))) - (wl-ask-folder + (wl-ask-folder '(lambda () (wl-summary-next-folder-or-exit next-entity)) (format "No more messages. Type SPC to go to %s." @@ -5366,7 +5366,7 @@ Reply to author if invoked with argument." (if (and skip-no-unread (eq wl-auto-select-next 'skip-no-unread)) (wl-summary-next-folder-or-exit next-entity t) - (wl-ask-folder + (wl-ask-folder '(lambda () (wl-summary-next-folder-or-exit next-entity t)) (format "No more unread messages. Type SPC to go to %s." @@ -5423,7 +5423,7 @@ Reply to author if invoked with argument." (if (and skip-no-unread (eq wl-auto-select-next 'skip-no-unread)) (wl-summary-next-folder-or-exit next-entity) - (wl-ask-folder + (wl-ask-folder '(lambda () (wl-summary-next-folder-or-exit next-entity)) (format "No more unread messages. Type SPC to go to %s." @@ -5432,7 +5432,7 @@ Reply to author if invoked with argument." (defun wl-summary-goto-last-displayed-msg () (interactive) (unless wl-summary-buffer-last-displayed-msg - (setq wl-summary-buffer-last-displayed-msg + (setq wl-summary-buffer-last-displayed-msg wl-summary-buffer-current-msg)) (if wl-summary-buffer-last-displayed-msg (progn @@ -5455,28 +5455,28 @@ Reply to author if invoked with argument." (num (or number (wl-summary-message-number))) (wl-mime-charset wl-summary-buffer-mime-charset) (default-mime-charset wl-summary-buffer-mime-charset) - (wl-message-redisplay-func + (wl-message-redisplay-func wl-summary-buffer-message-redisplay-func) fld-buf fld-win thr-entity) (if (and wl-thread-open-reading-thread (eq wl-summary-buffer-view 'thread) - (not (wl-thread-entity-get-opened - (setq thr-entity (wl-thread-get-entity + (not (wl-thread-entity-get-opened + (setq thr-entity (wl-thread-get-entity num)))) (wl-thread-entity-get-children thr-entity)) (wl-thread-force-open)) (if num (progn (setq wl-summary-buffer-disp-msg t) - (setq wl-summary-buffer-last-displayed-msg + (setq wl-summary-buffer-last-displayed-msg wl-summary-buffer-current-msg) ;; hide folder window (if (and (not wl-stay-folder-window) (setq fld-buf (get-buffer wl-folder-buffer-name))) (if (setq fld-win (get-buffer-window fld-buf)) - (delete-window fld-win))) + (delete-window fld-win))) (setq wl-current-summary-buffer (current-buffer)) - (if (wl-message-redisplay fld num 'mime msgdb force-reload) + (if (wl-message-redisplay fld num 'mime msgdb force-reload) (wl-summary-mark-as-read nil ;; cached, then change server-mark. (if wl-message-cache-used @@ -5503,12 +5503,12 @@ Reply to author if invoked with argument." (fld (or folder wl-summary-buffer-folder-name)) (num (or number (wl-summary-message-number))) (wl-mime-charset wl-summary-buffer-mime-charset) - (default-mime-charset wl-summary-buffer-mime-charset) + (default-mime-charset wl-summary-buffer-mime-charset) wl-break-pages) (if num (progn (setq wl-summary-buffer-disp-msg t) - (setq wl-summary-buffer-last-displayed-msg + (setq wl-summary-buffer-last-displayed-msg wl-summary-buffer-current-msg) (setq wl-current-summary-buffer (current-buffer)) (wl-normal-message-redisplay fld num 'no-mime msgdb) @@ -5530,12 +5530,12 @@ Reply to author if invoked with argument." (fld (or folder wl-summary-buffer-folder-name)) (num (or number (wl-summary-message-number))) (wl-mime-charset wl-summary-buffer-mime-charset) - (default-mime-charset wl-summary-buffer-mime-charset) + (default-mime-charset wl-summary-buffer-mime-charset) (wl-message-redisplay-func wl-summary-buffer-message-redisplay-func)) (if num (progn (setq wl-summary-buffer-disp-msg t) - (setq wl-summary-buffer-last-displayed-msg + (setq wl-summary-buffer-last-displayed-msg wl-summary-buffer-current-msg) (setq wl-current-summary-buffer (current-buffer)) (if (wl-message-redisplay fld num 'all-header msgdb); t if displayed. @@ -5580,7 +5580,7 @@ Reply to author if invoked with argument." message-id (std11-field-body "message-id") distribution (std11-field-body "distribution")) ;; Make sure that this article was written by the user. - (unless (wl-address-user-mail-address-p + (unless (wl-address-user-mail-address-p (wl-address-header-extract-address (car (wl-parse-addresses from)))) (error "This article is not yours")) @@ -5617,7 +5617,7 @@ Reply to author if invoked with argument." (save-excursion (setq from (std11-field-body "from")) ;; Make sure that this article was written by the user. - (unless (wl-address-user-mail-address-p + (unless (wl-address-user-mail-address-p (wl-address-header-extract-address (car (wl-parse-addresses from)))) (error "This article is not yours")) @@ -5686,7 +5686,7 @@ Reply to author if invoked with argument." "Send this message via pipe." (interactive (list current-prefix-arg nil)) (if (null (wl-summary-message-number)) - (message "No message.") + (message "No message.") (setq command (read-string "Shell command on message: " wl-summary-shell-command-last)) (if (y-or-n-p "Send this message to pipe? ") @@ -5704,7 +5704,7 @@ Reply to author if invoked with argument." (defun wl-summary-print-message (&optional arg) (interactive "P") (if (null (wl-summary-message-number)) - (message "No message.") + (message "No message.") (save-excursion (wl-summary-set-message-buffer-or-redisplay) (if (or (not (interactive-p)) @@ -5723,7 +5723,7 @@ Reply to author if invoked with argument." (defun wl-summary-print-message-with-ps-print (&optional filename) (interactive) (if (null (wl-summary-message-number)) - (message "No message.") + (message "No message.") (setq filename (ps-print-preprint current-prefix-arg)) (if (or (not (interactive-p)) (y-or-n-p "Print ok?")) @@ -5736,15 +5736,15 @@ Reply to author if invoked with argument." (buffer (generate-new-buffer " *print*")) (entity (progn (set-buffer summary-buffer) - (assoc (cdr (assq + (assoc (cdr (assq (wl-summary-message-number) - (elmo-msgdb-get-number-alist + (elmo-msgdb-get-number-alist wl-summary-buffer-msgdb))) - (elmo-msgdb-get-overview + (elmo-msgdb-get-overview wl-summary-buffer-msgdb)))) (wl-ps-subject (and entity - (or (elmo-msgdb-overview-entity-get-subject entity) + (or (elmo-msgdb-overview-entity-get-subject entity) ""))) (wl-ps-from (and entity @@ -5760,8 +5760,8 @@ Reply to author if invoked with argument." (let ((ps-left-header (list (concat "(" wl-ps-subject ")") (concat "(" wl-ps-from ")"))) - (ps-right-header - (list "/pagenumberstring load" + (ps-right-header + (list "/pagenumberstring load" (concat "(" wl-ps-date ")")))) (run-hooks 'wl-ps-print-hook) (funcall wl-ps-print-buffer-func filename)) @@ -5777,7 +5777,7 @@ Reply to author if invoked with argument." wl-summary-buffer-msgdb))) (wl-folder-set-folder-updated folder (list 0 - (+ wl-summary-buffer-unread-count + (+ wl-summary-buffer-unread-count wl-summary-buffer-new-count) (length num-db))))) @@ -5827,7 +5827,7 @@ Reply to author if invoked with argument." flds)) (defun wl-summary-update-crosspost () - (let* ((msgdb wl-summary-buffer-msgdb) + (let* ((msgdb wl-summary-buffer-msgdb) (number-alist (elmo-msgdb-get-number-alist msgdb)) (mark-alist (elmo-msgdb-get-mark-alist msgdb)) (spec-list (elmo-folder-get-primitive-spec-list @@ -5906,8 +5906,8 @@ Reply to author if invoked with argument." (set-buffer (setq orig-buf (wl-message-get-original-buffer))) (goto-char (point-min)) (cond ((= i 1) ; first - (if (setq filename (wl-message-uu-substring - orig-buf tmp-buf t + (if (setq filename (wl-message-uu-substring + orig-buf tmp-buf t (= i k))) nil (error "Can't find begin line."))) @@ -5931,7 +5931,7 @@ Reply to author if invoked with argument." wl-tmp-dir)) (setq filename (expand-file-name filename decode-dir))) (if (file-exists-p filename) - (or (yes-or-no-p (format "File %s exists. Save anyway? " + (or (yes-or-no-p (format "File %s exists. Save anyway? " filename)) (error ""))) (elmo-bind-directory @@ -5976,9 +5976,9 @@ Reply to author if invoked with argument." (incf multi-num) (setcar pair (+ (* multi-num elmo-multi-divide-number) (car pair)))) - (elmo-msgdb-set-number-alist - wl-summary-buffer-msgdb - (nconc + (elmo-msgdb-set-number-alist + wl-summary-buffer-msgdb + (nconc (elmo-msgdb-get-number-alist wl-summary-buffer-msgdb) (list (cons (car pair) nil)))) (setq sum (+ sum (cdr pair))) @@ -5986,7 +5986,7 @@ Reply to author if invoked with argument." (wl-summary-set-message-modified) (wl-folder-set-folder-updated wl-summary-buffer-folder-name (list 0 - (+ wl-summary-buffer-unread-count + (+ wl-summary-buffer-unread-count wl-summary-buffer-new-count) sum)) (message "Dropping...done.")))) @@ -6026,7 +6026,7 @@ Reply to author if invoked with argument." (t wl-cache-prefetch-folder-list))) -(defconst wl-cache-prefetch-idle-time +(defconst wl-cache-prefetch-idle-time (if (featurep 'lisp-float-type) (/ (float 1) (float 10)) 1)) (defun wl-cache-prefetch-next (fld msg &optional summary) @@ -6060,7 +6060,7 @@ Reply to author if invoked with argument." (elmo-msgdb-get-number-alist msgdb))))) (if (not (elmo-buffer-cache-hit (list folder next message-id))) (let* ((size (elmo-msgdb-overview-entity-get-size - (assoc message-id + (assoc message-id (elmo-msgdb-get-overview msgdb))))) (when (or (elmo-local-file-p folder next) (not (and (integerp size) diff --git a/wl/wl-template.el b/wl/wl-template.el index dfe7ebc..7bb8349 100644 --- a/wl/wl-template.el +++ b/wl/wl-template.el @@ -132,8 +132,8 @@ Enterring WL-Template mode calls the value of `wl-template-mode-hook'." mail-header-separator) (wl-highlight-message (point-min) (point-max) t) (and wl-highlight-x-face-func - (funcall - wl-highlight-x-face-func + (funcall + wl-highlight-x-face-func (point-min) (re-search-forward mail-header-separator nil t))) (setq mode-line-process (concat ":" wl-template)) (set-buffer-modified-p nil)))) diff --git a/wl/wl-thread.el b/wl/wl-thread.el index b17bd5b..abc3db6 100644 --- a/wl/wl-thread.el +++ b/wl/wl-thread.el @@ -40,7 +40,7 @@ (defvar wl-thread-entity-hashtb nil) ; obarray (defvar wl-thread-indent-regexp nil) -(mapcar +(mapcar (function make-variable-buffer-local) (list 'wl-thread-entity-hashtb 'wl-thread-entities ; -> ".wl-thread-entity" @@ -55,12 +55,12 @@ (defun wl-meaning-of-mark (mark) (if (not (elmo-folder-plugged-p wl-summary-buffer-folder-name)) - (cond + (cond ((string= mark wl-summary-unread-cached-mark) 'unread) ((string= mark wl-summary-important-mark) 'important)) - (cond + (cond ((string= mark wl-summary-new-mark) 'new) ((or (string= mark wl-summary-unread-uncached-mark) @@ -79,7 +79,7 @@ (or (string= mark wl-summary-unread-uncached-mark) (string= mark wl-summary-unread-cached-mark) (string= mark wl-summary-new-mark))) - (t + (t (or (string= mark wl-summary-unread-uncached-mark) (string= mark wl-summary-unread-cached-mark) (string= mark wl-summary-new-mark) @@ -98,7 +98,7 @@ (defun wl-thread-resume-entity (fld) (let (entities top-list) - (setq entities (wl-summary-load-file-object + (setq entities (wl-summary-load-file-object (expand-file-name wl-thread-entity-file (elmo-msgdb-expand-path fld)))) (setq top-list @@ -109,7 +109,7 @@ (message "Resuming thread structure...") ;; set obarray value. (setq wl-thread-entity-hashtb (elmo-make-hash (* (length entities) 2))) - (mapcar + (mapcar '(lambda (x) (elmo-set-hash-val (format "#%d" (car x)) x @@ -191,7 +191,7 @@ (defsubst wl-thread-entity-insert-as-children (to entity) (let ((children (nth 2 to))) - (setcar (cddr to) (wl-append children + (setcar (cddr to) (wl-append children (list (car entity)))) (setq wl-thread-entities (cons entity wl-thread-entities)) (elmo-set-hash-val (format "#%d" (car entity)) entity @@ -230,7 +230,7 @@ (wl-push msgs msgs-stack) (setq msgs children)) (setq entity (wl-thread-get-entity (car msgs)))) - ret-val)) + ret-val)) (defsubst wl-thread-entity-get-parent-entity (entity) (wl-thread-get-entity (wl-thread-entity-get-parent entity))) @@ -243,12 +243,12 @@ cur-entity)) (defun wl-thread-entity-parent-invisible-p (entity) - "If parent of ENTITY is invisible, the top invisible ancestor entity of + "If parent of ENTITY is invisible, the top invisible ancestor entity of ENTITY is returned." (let ((cur-entity entity) ret-val) (catch 'done - (while (setq cur-entity (wl-thread-entity-get-parent-entity + (while (setq cur-entity (wl-thread-entity-get-parent-entity cur-entity)) (if (null (wl-thread-entity-get-number cur-entity)) ;; top!! @@ -300,7 +300,7 @@ ENTITY is returned." (setcdr success entity) (throw 'done nil)) (setq failure (assq meaning failure-list)) - (unless (cdr failure) + (unless (cdr failure) (setcdr (assq meaning failure-list) entity))))) (setq msgs (cdr msgs))) (unless msgs @@ -324,7 +324,7 @@ ENTITY is returned." (setcdr success entity) (throw 'done nil)) (setq failure (assq meaning failure-list)) - (unless (cdr failure) + (unless (cdr failure) (setcdr (assq meaning failure-list) entity))))) (setq msgs (cdr msgs)) (setq children (wl-thread-entity-get-children entity)) @@ -361,7 +361,7 @@ ENTITY is returned." (let* ((parent (or parent (wl-thread-entity-get-parent-entity entity))) (brothers (wl-thread-entity-get-children parent))) - (if parent + (if parent (cdr (memq (wl-thread-entity-get-number entity) brothers)) ;; top!! @@ -384,7 +384,7 @@ ENTITY is returned." (setcdr success entity) (throw 'done nil)) (setq failure (assq meaning failure-list)) - (unless (cdr failure) + (unless (cdr failure) (setcdr (assq meaning failure-list) entity)))))) ;; check older brothers (while older-brother @@ -398,12 +398,12 @@ ENTITY is returned." (setq entity (wl-thread-entity-get-parent-entity entity)))))) (defun wl-thread-entity-get-prev-marked-entity (entity prev-marks) - (let ((older-brothers (reverse + (let ((older-brothers (reverse (wl-thread-entity-get-older-brothers entity))) marked) (or (catch 'done (while older-brothers - (wl-thread-entity-check-prev-mark + (wl-thread-entity-check-prev-mark (wl-thread-get-entity (car older-brothers)) prev-marks) (if (setq marked (wl-thread-meaning-alist-get-result @@ -431,7 +431,7 @@ ENTITY is returned." (cons (list (cons 'unread nil) (cons 'new nil)) (list (cons 'important nil)))) - (t + (t (cons (list (cons 'unread nil) (cons 'new nil) (cons 'important nil)) @@ -439,14 +439,14 @@ ENTITY is returned." mark ret-val) (if hereto (when (wl-thread-next-mark-p (setq mark - (wl-thread-entity-get-mark + (wl-thread-entity-get-mark (car cur-entity))) (caaar prev-marks)) ;;(setq mark (cons cur-entity ;;(wl-thread-entity-get-mark cur-entity))) (setq ret-val msg))) (when (and (not ret-val) - (or (setq cur-entity + (or (setq cur-entity (wl-thread-entity-get-prev-marked-entity cur-entity prev-marks)) (and hereto mark))) @@ -465,7 +465,7 @@ ENTITY is returned." ret-val)) (defun wl-thread-jump-to-prev-unread (&optional hereto) - "If prev unread is a children of a closed message, + "If prev unread is a children of a closed message, the closed parent will be opened." (interactive "P") (let ((msg (wl-thread-get-prev-unread @@ -477,8 +477,8 @@ the closed parent will be opened." (defun wl-thread-jump-to-msg (&optional number) (interactive) - (let ((num (or number - (string-to-int + (let ((num (or number + (string-to-int (read-from-minibuffer "Jump to Message(No.): "))))) (wl-thread-entity-force-open (wl-thread-get-entity num)) (wl-summary-jump-to-msg num))) @@ -497,7 +497,7 @@ the closed parent will be opened." (cons (list (cons 'unread nil) (cons 'new nil)) (list (cons 'important nil)))) - (t + (t (cons (list (cons 'unread nil) (cons 'new nil) (cons 'important nil)) @@ -505,13 +505,13 @@ the closed parent will be opened." mark ret-val) (if hereto (when (wl-thread-next-mark-p (setq mark - (wl-thread-entity-get-mark + (wl-thread-entity-get-mark (car cur-entity))) (caaar next-marks)) (setq ret-val msg))) (when (and (not ret-val) - (or (setq cur-entity - (wl-thread-entity-get-next-marked-entity + (or (setq cur-entity + (wl-thread-entity-get-next-marked-entity cur-entity next-marks)) (and hereto mark))) (if (and hereto @@ -530,7 +530,7 @@ the closed parent will be opened." ret-val)) (defun wl-thread-jump-to-next-unread (&optional hereto) - "If next unread is a children of a closed message, + "If next unread is a children of a closed message, the closed parent will be opened." (interactive "P") (let ((msg (wl-thread-get-next-unread @@ -558,7 +558,7 @@ the closed parent will be opened." (setq cur (1+ cur)) (if (or (zerop (% cur 5)) (= cur len)) (elmo-display-progress - 'wl-thread-close-all "Closing all threads..." + 'wl-thread-close-all "Closing all threads..." (/ (* cur 100) len)))) (setq entities (cdr entities)))) (message "Closing all threads...done.") @@ -580,7 +580,7 @@ the closed parent will be opened." (setq cur (1+ cur)) (if (or (zerop (% cur 5)) (= cur len)) (elmo-display-progress - 'wl-thread-open-all "Opening all threads..." + 'wl-thread-open-all "Opening all threads..." (/ (* cur 100) len)))) (setq entities (cdr entities)))) (message "Opening all threads...done.") @@ -601,17 +601,17 @@ the closed parent will be opened." (setq mark-alist (cdr mark-alist))))) ;;; a subroutine for wl-thread-entity-get-next-marked-entity. -(defun wl-thread-entity-check-next-mark-from-younger-brother +(defun wl-thread-entity-check-next-mark-from-younger-brother (entity next-marks) (let* (parent younger-brother) (catch 'done (while entity (setq parent (wl-thread-entity-get-parent-entity entity) - younger-brother + younger-brother (wl-thread-entity-get-younger-brothers entity parent)) ;; check my brother! (while younger-brother - (wl-thread-entity-check-next-mark + (wl-thread-entity-check-next-mark (wl-thread-get-entity (car younger-brother)) next-marks) (if (wl-thread-meaning-alist-get-result @@ -625,18 +625,18 @@ the closed parent will be opened." marked) (or (catch 'done (while children - (wl-thread-entity-check-next-mark + (wl-thread-entity-check-next-mark (wl-thread-get-entity (car children)) next-marks) - (if (setq marked - (wl-thread-meaning-alist-get-result + (if (setq marked + (wl-thread-meaning-alist-get-result (car next-marks))) (throw 'done marked)) (setq children (cdr children)))) ;; check younger brother (wl-thread-entity-check-next-mark-from-younger-brother entity next-marks) - (if (setq marked - (wl-thread-meaning-alist-get-result + (if (setq marked + (wl-thread-meaning-alist-get-result (car next-marks))) marked (if (setq marked @@ -672,7 +672,7 @@ the closed parent will be opened." (when (setq overview-entity (elmo-msgdb-overview-get-entity msg wl-summary-buffer-msgdb)) - (setq summary-line + (setq summary-line (wl-summary-overview-create-summary-line msg overview-entity @@ -809,7 +809,7 @@ the closed parent will be opened." (unless deep (setq children (wl-thread-entity-get-children entity)) (mapcar '(lambda (x) - (wl-thread-entity-set-parent + (wl-thread-entity-set-parent (wl-thread-get-entity x) (wl-thread-entity-get-number parent)) (wl-thread-entity-set-linked @@ -932,7 +932,7 @@ the closed parent will be opened." (defun wl-thread-insert-message (overview-entity overview mark-alist msg parent-msg &optional update linked) "Insert MSG to the entity. -When optional argument UPDATE is non-nil, +When optional argument UPDATE is non-nil, Message is inserted to the summary buffer." (let ((parent (wl-thread-get-entity parent-msg)) child-entity invisible-top) @@ -953,10 +953,10 @@ Message is inserted to the summary buffer." (wl-thread-entity-parent-invisible-p child-entity))) ;; visible. (progn - (wl-summary-update-thread + (wl-summary-update-thread overview-entity - overview - mark-alist + overview + mark-alist child-entity (elmo-msgdb-overview-get-entity parent-msg wl-summary-buffer-msgdb)) @@ -1004,8 +1004,8 @@ Message is inserted to the summary buffer." (beginning-of-line) (let ((text-prop (get-text-property (point) 'face)) from from-end beg str) - (cond - ((looking-at (concat "^" wl-summary-buffer-number-regexp + (cond + ((looking-at (concat "^" wl-summary-buffer-number-regexp "..../..\(.*\)..:.. [" wl-thread-indent-regexp "]*[[<]\\+\\([0-9]+\\):")) @@ -1015,21 +1015,21 @@ Message is inserted to the summary buffer." (if wl-summary-highlight (put-text-property 0 (length str) 'face text-prop str)) (insert str)) - ((looking-at (concat "^" wl-summary-buffer-number-regexp + ((looking-at (concat "^" wl-summary-buffer-number-regexp "..../..\(.*\)..:.. [" wl-thread-indent-regexp "]*[[<]")) (goto-char (match-end 0)) (setq beg (current-column)) - (setq from-end (save-excursion + (setq from-end (save-excursion (move-to-column (+ 1 beg wl-from-width)) (point))) (setq from (buffer-substring (match-end 0) from-end)) (delete-region (match-end 0) from-end) - (setq str (wl-set-string-width + (setq str (wl-set-string-width (1+ wl-from-width) - (format - "+%s:%s" + (format + "+%s:%s" (wl-thread-entity-get-children-num entity) from))) @@ -1098,7 +1098,7 @@ Message is inserted to the summary buffer." (wl-summary-set-mark-modified)) ((null cur-mark) ;; " " -> "!" - (setq mark-alist (elmo-msgdb-mark-set mark-alist msg + (setq mark-alist (elmo-msgdb-mark-set mark-alist msg wl-summary-unread-cached-mark)) (elmo-msgdb-set-mark-alist msgdb mark-alist) (wl-summary-set-mark-modified))))) @@ -1197,7 +1197,7 @@ Message is inserted to the summary buffer." (cur 0)) (wl-delete-all-overlays) (while elist - (wl-thread-insert-entity + (wl-thread-insert-entity 0 (wl-thread-get-entity (car elist)) nil @@ -1228,12 +1228,12 @@ Message is inserted to the summary buffer." (setq temp-mark "O")))) (unless temp-mark (setq temp-mark (wl-summary-get-score-mark msg-num))) - (setq overview-entity + (setq overview-entity (elmo-msgdb-overview-get-entity (nth 0 entity) wl-summary-buffer-msgdb)) ;;(wl-delete-all-overlays) (when overview-entity - (setq summary-line + (setq summary-line (wl-summary-overview-create-summary-line msg-num overview-entity @@ -1291,7 +1291,7 @@ Message is inserted to the summary buffer." ; (let ((depth (wl-thread-get-depth-of-current-line))) ; (forward-line 1) ; (while (and (not (eobp)) -; (> (wl-thread-get-depth-of-current-line) +; (> (wl-thread-get-depth-of-current-line) ; depth)) ; (forward-line 1)) ; (beginning-of-line))) @@ -1393,12 +1393,12 @@ Message is inserted to the summary buffer." (beginning-of-line) (setq beg (point)) (wl-thread-goto-bottom-of-sub-thread) - (wl-thread-remove-destination-region beg + (wl-thread-remove-destination-region beg (point)) (forward-char -1) ;; needed for mouse-face. (delete-region beg (point)) (wl-thread-insert-entity (- depth 1) - entity + entity (wl-thread-get-entity (nth 3 entity)) nil) @@ -1413,8 +1413,8 @@ Message is inserted to the summary buffer." (end-of-line) (delete-region beg (point)) (wl-thread-entity-set-opened entity t) - (wl-thread-insert-entity depth ;(- depth 1) - entity + (wl-thread-insert-entity depth ;(- depth 1) + entity (wl-thread-get-entity (nth 3 entity)) nil) (delete-char 1) ; delete '\n' @@ -1428,8 +1428,8 @@ Message is inserted to the summary buffer." (save-excursion (let ((inhibit-read-only t) (buffer-read-only nil) - (wl-thread-insert-force-opened - (or wl-thread-insert-force-opened + (wl-thread-insert-force-opened + (or wl-thread-insert-force-opened force-open)) msg entity parent) (setq msg (wl-summary-message-number)) @@ -1463,10 +1463,10 @@ Message is inserted to the summary buffer." (save-excursion (beginning-of-line) (let ((depth 0)) - (if (re-search-forward (concat "^" wl-summary-buffer-number-regexp + (if (re-search-forward (concat "^" wl-summary-buffer-number-regexp "..../..\(.*\)..:.. ") nil t) - (while (string-match wl-thread-indent-regexp + (while (string-match wl-thread-indent-regexp (char-to-string (char-after (point)))) (setq depth (1+ depth)) @@ -1487,23 +1487,23 @@ Message is inserted to the summary buffer." (space-str (wl-repeat-string wl-thread-space-str-internal (- wl-thread-indent-level-internal 1))) parent) - (when (wl-thread-entity-get-number + (when (wl-thread-entity-get-number (setq parent (wl-thread-entity-get-parent-entity cur))) (if (wl-thread-entity-get-younger-brothers cur) (setq ret-val wl-thread-have-younger-brother-str-internal) (setq ret-val wl-thread-youngest-child-str-internal)) - (setq ret-val (concat ret-val + (setq ret-val (concat ret-val (wl-repeat-string wl-thread-horizontal-str-internal (- wl-thread-indent-level-internal 1)))) (setq cur parent) - (while (wl-thread-entity-get-number + (while (wl-thread-entity-get-number (wl-thread-entity-get-parent-entity cur)) (if (wl-thread-entity-get-younger-brothers cur) (setq ret-val (concat wl-thread-vertical-str-internal space-str ret-val)) - (setq ret-val (concat wl-thread-space-str-internal + (setq ret-val (concat wl-thread-space-str-internal space-str ret-val))) (setq cur (wl-thread-entity-get-parent-entity cur)))) @@ -1525,13 +1525,13 @@ Message is inserted to the summary buffer." (delete-region (match-beginning 2) (match-end 2)) (setq thr-str - (wl-thread-make-indent-string + (wl-thread-make-indent-string (wl-thread-get-entity (string-to-int (wl-match-buffer 1))))) - (if (and wl-summary-width + (if (and wl-summary-width wl-summary-indent-length-limit (< wl-summary-indent-length-limit (string-width thr-str))) - (setq thr-str (wl-set-string-width + (setq thr-str (wl-set-string-width wl-summary-indent-length-limit thr-str))) (insert thr-str) diff --git a/wl/wl-util.el b/wl/wl-util.el index 3968c6c..a68880f 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -45,8 +45,8 @@ (lambda (symbol) (unless (boundp symbol) (set (make-local-variable symbol) nil)))) - '(mule-version - nemacs-version + '(mule-version + nemacs-version emacs-beta-version xemacs-codename mime-edit-insert-user-agent-field @@ -158,8 +158,8 @@ If HACK-ADDRESSES is t, then the strings are considered to be mail addresses, ))) (defun wl-version (&optional with-codename) - (format "%s %s%s" wl-appname wl-version - (if with-codename + (format "%s %s%s" wl-appname wl-version + (if with-codename (format " - \"%s\"" wl-codename) ""))) (defun wl-version-show () @@ -193,7 +193,7 @@ If HACK-ADDRESSES is t, then the strings are considered to be mail addresses, ((and (boundp 'mule-version) mule-version (string-match "\\([0-9]+\.[0-9]+\\)\\(.*$\\)" mule-version)) - (format "Mule%s%s@%d.%d%s" + (format "Mule%s%s@%d.%d%s" (or delimiter " ") (wl-match-string 1 mule-version) emacs-major-version @@ -203,7 +203,7 @@ If HACK-ADDRESSES is t, then the strings are considered to be mail addresses, ""))) ((string-match "^\\([0-9]+\\.[0-9]+\\)\\.[.0-9]+$" emacs-version) (if (boundp 'nemacs-version) - (concat "Nemacs" (or delimiter " ") + (concat "Nemacs" (or delimiter " ") nemacs-version "@" (substring emacs-version @@ -232,7 +232,7 @@ If HACK-ADDRESSES is t, then the strings are considered to be mail addresses, ((and (boundp 'mule-version) mule-version (string-match "\\([0-9]+\.[0-9]+\\)\\(.*$\\)" mule-version)) - (format "Emacs%s%d.%d Mule%s%s%s" + (format "Emacs%s%d.%d Mule%s%s%s" (or delimiter " ") emacs-major-version emacs-minor-version @@ -247,9 +247,9 @@ If HACK-ADDRESSES is t, then the strings are considered to be mail addresses, ("3.3.1" . " (HINAMATSURI)") ("3.2.3" . " (YUMENO-AWAYUKI)")))) (format "Emacs%s%s Nemacs%s%s%s" - (or delimiter " ") + (or delimiter " ") (wl-match-string 1 emacs-version) - (or delimiter " ") + (or delimiter " ") nemacs-version (or (and with-codename (cdr (assoc nemacs-version @@ -335,7 +335,7 @@ If HACK-ADDRESSES is t, then the strings are considered to be mail addresses, (if (> (current-column) width) (if (> (move-to-column width) width) (progn - (condition-case nil ; ignore error + (condition-case nil ; ignore error (backward-char 1) (error)) (concat (buffer-substring (point-min) (point)) " ")) @@ -343,7 +343,7 @@ If HACK-ADDRESSES is t, then the strings are considered to be mail addresses, (if (= (current-column) width) string (concat string - (format (format "%%%ds" + (format (format "%%%ds" (- width (current-column))) " ")))))) @@ -363,7 +363,7 @@ If HACK-ADDRESSES is t, then the strings are considered to be mail addresses, (t (format "%dB" result))))) (defun wl-generate-user-agent-string () - "A candidate of wl-generate-mailer-string-func. + "A candidate of wl-generate-mailer-string-func. Insert User-Agent field instead of X-Mailer field." (let ((mime-user-agent (and (boundp 'mime-edit-insert-user-agent-field) mime-edit-insert-user-agent-field @@ -563,7 +563,7 @@ The objects mapped (cdrs of elements of the ALIST) are shared." (setq keys (cdr keys))) result)) -(eval-when-compile +(eval-when-compile (require 'static)) (static-unless (fboundp 'pp) (defvar pp-escape-newlines t) @@ -607,7 +607,7 @@ that `read' can handle, whenever this is possible." (if (looking-at "[ \t]*\)") (delete-region (match-beginning 0) (match-end 0)) (error "Malformed quote")) - (backward-sexp 1)) + (backward-sexp 1)) ((condition-case err-var (prog1 t (down-list 1)) (error nil)) @@ -721,7 +721,7 @@ that `read' can handle, whenever this is possible." (let ((date (current-time-string))) (format "%s/%02d/%02d %s" (substring date -4) - (cdr (assoc (upcase (substring date 4 7)) + (cdr (assoc (upcase (substring date 4 7)) timezone-months-assoc)) (string-to-int (substring date 8 10)) (substring date 11 19))))) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index e6ad62b..afccc5b 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -134,7 +134,7 @@ :group 'wl) (defcustom wl-user-mail-address-list nil - "*A list of user's mail addresses. + "*A list of user's mail addresses. This list is used to judge whether an address is user's or not. You should set this variable if you use multiple e-mail addresses. If you don't have multiple e-mail addresses, you don't have to set this." @@ -229,13 +229,13 @@ If you don't have multiple e-mail addresses, you don't have to set this." :group 'wl-draft) (defcustom wl-x-face-file "~/.xface" - "*If file exists and `wl-auto-insert-x-face' is non-nil, + "*If file exists and `wl-auto-insert-x-face' is non-nil, X-Face field is inserted using its contents." :type 'file :group 'wl-draft) (defcustom wl-subscribed-mailing-list nil - "*Subscribed mailing list. You had better set this variable + "*Subscribed mailing list. You had better set this variable if you set wl-insert-mail-followup-to as t." :type '(repeat string) :group 'wl-pref) @@ -286,7 +286,7 @@ If nil, default SMTP port number(25) is used." :group 'wl) (defcustom wl-smtp-authenticate-type nil - "*SMTP Authentication type. + "*SMTP Authentication type. If nil, don't authenticate." :type '(choice (const :tag "none" nil) (const :tag "PLAIN" "plain") @@ -518,7 +518,7 @@ Prepared candidates are 'wl-draft-send-mail-with-smtp, '(("Reply-To" . (("Reply-To") nil nil)) ("Mail-Reply-To" . (("Mail-Reply-To") nil nil)) ("From" . (("From") nil nil))) - "Alist of cons cell of + "Alist of cons cell of ('field-name' . ('fields for To' 'fields for Cc' 'fields for Newsgroups')) If car of each cons cell exists in original message, cdr of each cons cell is used for draft message. @@ -534,7 +534,7 @@ Default is for 'reply-to-author'." '(("Followup-To" . (nil nil ("Followup-To"))) ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups"))) ("From" . (("From") ("To" "Cc") ("Newsgroups")))) - "Alist of cons cell of + "Alist of cons cell of ('field-name' . ('fields for To' 'fields for Cc' 'fields for Newsgroups')) 'field-name' is a string. 'fields for ***' is a list of strings. @@ -700,7 +700,7 @@ This variable is local to the summary buffers." integer) :group 'wl-score) -(defcustom wl-summary-score-marks +(defcustom wl-summary-score-marks (list wl-summary-new-mark) "Persistent marks to scoring." :type '(repeat (string :tag "Mark")) @@ -811,7 +811,7 @@ This can either be a regular expression or list of regular expressions." (defcustom wl-draft-fields '("To:" "Cc:" "Bcc:" "FCC:" "Distribution:" "Organization:" - "Newsgroups:" "Followup-To:" "Mail-Followup-To:" "From:" "Reply-To:") + "Newsgroups:" "Followup-To:" "Mail-Followup-To:" "From:" "Reply-To:") "Fields used in draft mode." :type '(repeat (string :tag "Field")) :group 'wl-draft) @@ -921,7 +921,7 @@ ex. :group 'wl-highlight) (defcustom wl-summary-highlight-partial-threshold 1000 - "Summary is not highlighted entirely + "Summary is not highlighted entirely if there are lines more than this value." :type 'integer :group 'wl-summary @@ -970,7 +970,7 @@ Summary lines are highlighted partialy above current position." :type 'function :group 'wl-pref) -(defcustom wl-ps-print-buffer-func +(defcustom wl-ps-print-buffer-func (if window-system 'ps-print-buffer-with-faces 'ps-print-buffer) "A function to print current buffer with ps-print." :type 'function @@ -1011,7 +1011,7 @@ Summary lines are highlighted partialy above current position." :group 'wl-pref) (defcustom wl-local-domain nil - "*Domain part of this client (without hostname). + "*Domain part of this client (without hostname). Set this if (system-name) does not return FQDN." :type '(choice (const :tag "Use System Name" nil) string) @@ -1038,7 +1038,7 @@ Set this if (system-name) does not return FQDN." :type '(cons integer integer) :group 'wl-pref) -(defcustom wl-message-sort-field-list '("Return-Path" "Received" "^To" "^Cc" +(defcustom wl-message-sort-field-list '("Return-Path" "Received" "^To" "^Cc" "Newsgroups" "Subject" "^From") "*Sort order of header fields. Each elements are regexp of field name. (Not valid on tm.)" @@ -1206,7 +1206,7 @@ might set this variable to '(\"-f\" \"you@some.where\")." :type '(repeat (string :tag "Argument")) :group 'wl-draft) -(defcustom wl-rejected-letter-start +(defcustom wl-rejected-letter-start "^[\t ]*-+[\t ]+\\(original\\|\\(\\(the \\)?unsent\\)\\) message\\( follows\\)?[\t ]+-+[\t ]*$" "Regexp specifying the beginning of the wrapper around a returned letter. This wrapper is generated by the mail system when rejecting a letter." @@ -1228,7 +1228,7 @@ might set this variable to '(\"-f\" \"you@some.where\")." :type '(string :tag "Folder") :group 'wl-pref) -(defcustom wl-summary-auto-refile-skip-marks +(defcustom wl-summary-auto-refile-skip-marks (list wl-summary-new-mark wl-summary-unread-uncached-mark wl-summary-unread-cached-mark) @@ -1238,14 +1238,14 @@ might set this variable to '(\"-f\" \"you@some.where\")." (defcustom wl-summary-reserve-mark-list (list "o" "O" "D") - "If a message is already marked as temporal marks in this list, + "If a message is already marked as temporal marks in this list, the message is not marked by any mark command." :type '(repeat (string :tag "Temp-Mark")) :group 'wl-summary) (defcustom wl-summary-skip-mark-list (list "D") - "If a message is already marked as temporal marks in this list, + "If a message is already marked as temporal marks in this list, the message is skipped at cursor move." :type '(repeat (string :tag "Temp-Mark")) :group 'wl-summary) @@ -1278,7 +1278,7 @@ e.x. :group 'wl-folder) (defcustom wl-folder-use-server-diff t - "Checked unread message number on IMAP4 server. + "Checked unread message number on IMAP4 server. Only IMAP4 folders have an effect." :type 'boolean :group 'wl-folder) @@ -1291,7 +1291,7 @@ Only IMAP4 folders have an effect." :group 'wl-folder) (defcustom wl-auto-check-folder-name nil - "*The folder specified by this variable will be automatically checked + "*The folder specified by this variable will be automatically checked at start time." :type '(choice (string :tag "Folder") (repeat (string :tag "Folder")) @@ -1299,7 +1299,7 @@ at start time." :group 'wl-folder) (defcustom wl-auto-uncheck-folder-list '("\\$.*") - "All folders that match this list won't be checked when group is + "All folders that match this list won't be checked when group is automatically checked (or desktop is checked). This value is preceded by wl-auto-check-folder-list. Each elements are regexp of folder name." @@ -1307,7 +1307,7 @@ Each elements are regexp of folder name." :group 'wl-folder) (defcustom wl-auto-check-folder-list nil - "All folders that match this list are checked when group is + "All folders that match this list are checked when group is automatically checked (or desktop is checked). This value precedes wl-auto-uncheck-folder-list. Each elements are regexp of folder name." @@ -1336,7 +1336,7 @@ If this variable is `new', precede \"N\" mark." (defcustom wl-summary-move-direction-toggle t "*If non-nil, search direction for the next message will be determined -depends on previous search direction. +depends on previous search direction. It uses wl-summary-move-direction-downward as a direction flag." :type 'boolean :group 'wl-summary) @@ -1348,7 +1348,7 @@ It uses wl-summary-move-direction-downward as a direction flag." (defcustom wl-auto-select-next nil "*If non-nil, offer to go to the next folder from the end of the previous. -If the value is the symbol `unread', go to the next folder +If the value is the symbol `unread', go to the next folder that no unread message exists. If the value is the symbol `skip-no-unread', skip the folder that no unread message exists. @@ -1360,7 +1360,7 @@ See also variable `wl-summary-next-no-unread-command'." :group 'wl-pref) (defcustom wl-cache-prefetch-folder-type-list '(imap4 nntp) - "*All folder types that match this list prefetch next message, + "*All folder types that match this list prefetch next message, and reserved buffer cache." :type '(set (const localdir) (const localnews) @@ -1372,7 +1372,7 @@ and reserved buffer cache." :group 'wl-pref) (defcustom wl-cache-prefetch-folder-list nil - "*All folders that match this list prefetch next message, + "*All folders that match this list prefetch next message, and reserved buffer cache. e.x. '(\"^[-%]\")" @@ -1424,7 +1424,7 @@ Each elements are regexp of folder name." ("^-relcom\\." . "en") ("^-tw\\." . "en") ("^-han\\." . "en")) - "Weekday name lang alist. If no match, wl-summary-weekday-name-lang + "Weekday name lang alist. If no match, wl-summary-weekday-name-lang is used. e.x. '((\"xemacs-beta$\" . \"en\") @@ -1442,7 +1442,7 @@ e.x. ("^-relcom\\." . (2 "+" "+" "|" "-" " ")) ("^-tw\\." . (2 "+" "+" "|" "-" " ")) ("^-han\\." . (2 "+" "+" "|" "-" " "))) - "Thread indent set alist. + "Thread indent set alist. If no match, following indent set is used. (wl-thread-indent-level wl-thread-have-younger-brother-str @@ -1461,8 +1461,8 @@ e.x. (string :tag "Space")))) :group 'wl-pref) -(defcustom wl-folder-sync-range-alist - (list (cons (concat "^" (regexp-quote wl-draft-folder) "$\\|^" +(defcustom wl-folder-sync-range-alist + (list (cons (concat "^" (regexp-quote wl-draft-folder) "$\\|^" (regexp-quote wl-queue-folder) "$") "all")) "*Default sync range alist. If no matches, `wl-default-sync-range' is used." @@ -1488,7 +1488,7 @@ e.x. :group 'wl-pref) (defcustom wl-ask-range t - "*If non-nil, ask for a range for summary synchronization. + "*If non-nil, ask for a range for summary synchronization. If nil, always use default." :type 'boolean :group 'wl-pref) @@ -1516,7 +1516,7 @@ in folder. If the value is 'sync, msgdb would be synchronized." :type 'boolean :group 'wl-summary) -(defcustom wl-summary-next-no-unread-command +(defcustom wl-summary-next-no-unread-command '(wl-summary-read wl-summary-down wl-summary-up) "*Command list available when the value of `wl-auto-select-next' is 'unread or 'skip-no-unread." @@ -1528,7 +1528,7 @@ or 'skip-no-unread." :type 'boolean :group 'wl-summary) -(defcustom wl-summary-keep-cursor-command +(defcustom wl-summary-keep-cursor-command '(wl-summary-goto-folder wl-summary-goto-last-visited-folder) "*Command list to keep cursor position when folder is changed to already existing summary." @@ -1553,14 +1553,14 @@ Sender information in summary mode." :group 'wl-folder) (defcustom wl-delete-folder-alist '(("^-" . remove)) - "*Alist of folder and delete policy. + "*Alist of folder and delete policy. Each element is (folder-regexp . policy). The policy is one of the followings: 'remove or 'null : remove message. string : refile to the specified folder. -'trash or +'trash or otherwise : refile to the `wl-trash-folder'. ex. '((\"^%\" . \"%#mh/trash\") @@ -1620,7 +1620,7 @@ ex. (regexp :tag "Folder Regexp"))))) :group 'wl-folder) -;;; For Folder Manager +;;; For Folder Manager (defcustom wl-interactive-save-folders t "*Non-nil require your confirmation when save folders." @@ -1838,7 +1838,7 @@ list : reserved specified permanent marks." (integer :tag "Regexp group")))) :group 'wl-highlight) -(defcustom wl-highlight-citation-prefix-regexp +(defcustom wl-highlight-citation-prefix-regexp "^[>|:} ]*[>|:}]\\([^ \n>]*>\\)?\\|^[^ <\n>]*>" "All lines that match this regexp will be highlighted with `wl-highlight-message-cited-text-*' face." @@ -1846,10 +1846,10 @@ list : reserved specified permanent marks." :group 'wl-highlight) (defcustom wl-highlight-highlight-citation-too nil - "*Whether the whole citation line should go in the + "*Whether the whole citation line should go in the `wl-highlight-citation-face' face. If nil, the text matched by `wl-highlight-citation-prefix-regexp' is in the -default face, and the remainder of the line is in the +default face, and the remainder of the line is in the wl-highlight-message-cited-text face." :type 'boolean :group 'wl-highlight) @@ -1864,7 +1864,7 @@ the `wl-highlight-message-headers' face." (defcustom wl-highlight-citation-header-regexp (concat "In article.*$\\|In message.*$\\|In the message.*$\\|" - "^At[^\n]+\n[^\n]+wrote:\n\\|" + "^At[^\n]+\n[^\n]+wrote:\n\\|" "^.*\\(writes\\|wrote\\|said\\):\n") "*The pattern to match the prolog of a cited block. Text in the body of a message which matches this will be displayed in @@ -1881,12 +1881,12 @@ be highlighted." :group 'wl-highlight) ;; highilght about signature (of draft and message) -(defcustom wl-highlight-signature-separator +(defcustom wl-highlight-signature-separator '("\n--+\n" "\n\n--+.*\n*\\'") "List of regexps matching signature separator. -It will be verified from head to tail looking for a separator. +It will be verified from head to tail looking for a separator. Verification will be done from the end of the buffer. -No need to specify \"^-- $\" in this list, +No need to specify \"^-- $\" in this list, because it is verified by default. This variable can also be a regex. " :type '(repeat regexp) @@ -1904,7 +1904,7 @@ This variable can also be a regex. " :group 'wl-highlight) ;; highilght about folder -(defcustom wl-highlight-folder-with-icon +(defcustom wl-highlight-folder-with-icon (and (featurep 'xemacs) (featurep 'xpm)) "*Highlight folder with icon(XEmacs)." @@ -1960,7 +1960,7 @@ a symbol `xbm' to limit the image format to XBM even if XPM can be shown." (defvar wl-show-plug-status-on-modeline t) -;; Advanced thread view. +;; Advanced thread view. (defvar wl-thread-indent-level 1 "*Indent level for thread.") (defvar wl-thread-have-younger-brother-str "┣" diff --git a/wl/wl-xmas.el b/wl/wl-xmas.el index bc6196e..698f1d4 100644 --- a/wl/wl-xmas.el +++ b/wl/wl-xmas.el @@ -32,7 +32,7 @@ (eval-when-compile (require 'wl-folder) (require 'wl-summary) - (require 'wl-draft) + (require 'wl-draft) (require 'wl-message) (require 'wl-highlight) (defvar-maybe wl-draft-mode-map (make-sparse-keymap))) @@ -107,7 +107,7 @@ [wl-summary-forward wl-summary-forward t "Forward Current Message"] [wl-summary-exit - wl-summary-exit t "Exit Current Summary"] + wl-summary-exit t "Exit Current Summary"] ) "The Summary buffer toolbar.") @@ -185,7 +185,7 @@ ((string= fld-name wl-trash-folder) ;; set trash folder icon (setq num (nth 2 numbers)) ;; number of messages (set-extent-begin-glyph extent - (if (or (null num) + (if (or (null num) (eq num 0)) wl-folder-trash-empty-glyph wl-folder-trash-glyph))) @@ -197,19 +197,19 @@ (or numbers ;; XXX dirty...!! (not (assoc fld-name wl-folder-group-alist)))) ;; not group folder. - (set-extent-begin-glyph extent + (set-extent-begin-glyph extent (symbol-value (intern (format "wl-folder-%s-glyph" type))))))) (when (and numbers (nth 0 numbers) (nth 1 numbers)) - (setq fsymbol + (setq fsymbol (let ((unsync (nth 0 numbers)) (unread (nth 1 numbers))) (cond ((and unsync (eq unsync 0)) (if (and unread (> unread 0)) 'wl-highlight-folder-unread-face 'wl-highlight-folder-zero-face)) - ((and unsync + ((and unsync (>= unsync wl-folder-many-unsync-threshold)) 'wl-highlight-folder-many-face) (t @@ -218,8 +218,8 @@ (put-text-property bol eol 'face fsymbol) (setq matched t)) (while highlights - (setq fregexp (symbol-value - (intern (format "wl-highlight-folder-%s-regexp" + (setq fregexp (symbol-value + (intern (format "wl-highlight-folder-%s-regexp" (car highlights))))) (if (not wl-highlight-group-folder-by-numbers) (setq fsymbol (intern (format "wl-highlight-folder-%s-face" @@ -251,7 +251,7 @@ 'wl-highlight-folder-killed-face) (put-text-property bol eol 'face 'wl-highlight-folder-unknown-face))) - (if wl-use-highlight-mouse-line + (if wl-use-highlight-mouse-line (wl-highlight-folder-mouse-line)) (if (and (featurep 'dragdrop) wl-use-dnd) (wl-dnd-set-drop-target bol eol))))) @@ -320,7 +320,7 @@ locale tag-set 'prepend)) glyph)) -(defun wl-folder-init-icons () +(defun wl-folder-init-icons () (mapcar (lambda (x) (if (null (symbol-value (car x))) @@ -415,9 +415,9 @@ (defun wl-draft-overload-menubar () (when (featurep 'menubar) - (add-menu-item '("Mail") "Send, Keep Editing" + (add-menu-item '("Mail") "Send, Keep Editing" 'wl-draft-send t "Send Mail") - (add-menu-item '("Mail") "Send Message" + (add-menu-item '("Mail") "Send Message" 'wl-draft-send-and-exit t "Send and Exit") (delete-menu-item '("Mail" "Send Mail")) (delete-menu-item '("Mail" "Send and Exit")))) diff --git a/wl/wl.el b/wl/wl.el index 89cd70a..7015841 100644 --- a/wl/wl.el +++ b/wl/wl.el @@ -61,7 +61,7 @@ (require 'wl-demo) (require 'wl-highlight) -(eval-when-compile +(eval-when-compile (require 'smtp) (require 'wl-score) (unless wl-on-nemacs @@ -99,8 +99,8 @@ (elmo-set-plugged wl-plugged)) (setq elmo-plugged wl-plugged) (save-excursion - (mapcar - (function + (mapcar + (function (lambda (x) (set-buffer x) (wl-summary-msgdb-save) @@ -620,7 +620,7 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (let (summary-buf) (save-excursion (let ((summaries (wl-collect-summary))) - (mapcar + (mapcar (function (lambda (x) (set-buffer x) @@ -686,11 +686,11 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (setq elmo-use-semi nil)) ;; defined above. (wl-mime-setup) - (fset 'wl-summary-from-func-internal + (fset 'wl-summary-from-func-internal (symbol-value 'wl-summary-from-func)) - (fset 'wl-summary-subject-func-internal + (fset 'wl-summary-subject-func-internal (symbol-value 'wl-summary-subject-func)) - (fset 'wl-summary-subject-filter-func-internal + (fset 'wl-summary-subject-filter-func-internal (symbol-value 'wl-summary-subject-filter-func)) (setq elmo-no-from wl-summary-no-from-message) (setq elmo-no-subject wl-summary-no-subject-message) @@ -720,29 +720,29 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (if (not (eq (elmo-folder-get-type wl-draft-folder) 'localdir)) (error "%s is not allowed for draft folder" wl-draft-folder)) (unless (elmo-folder-exists-p wl-draft-folder) - (if (y-or-n-p - (format "Draft Folder %s does not exist, create it?" + (if (y-or-n-p + (format "Draft Folder %s does not exist, create it?" wl-draft-folder)) (elmo-create-folder wl-draft-folder) (error "Draft Folder is not created"))) (if (and wl-draft-enable-queuing (not (elmo-folder-exists-p wl-queue-folder))) - (if (y-or-n-p - (format "Queue Folder %s does not exist, create it?" + (if (y-or-n-p + (format "Queue Folder %s does not exist, create it?" wl-queue-folder)) (elmo-create-folder wl-queue-folder) (error "Queue Folder is not created"))) (unless (elmo-folder-exists-p wl-trash-folder) - (if (y-or-n-p - (format "Trash Folder %s does not exist, create it?" + (if (y-or-n-p + (format "Trash Folder %s does not exist, create it?" wl-trash-folder)) (elmo-create-folder wl-trash-folder) (error "Trash Folder is not created"))) (unless (elmo-folder-exists-p elmo-lost+found-folder) (elmo-create-folder elmo-lost+found-folder))) (unless (file-exists-p wl-tmp-dir) - (if (y-or-n-p - (format "Temp directory (to save multipart) %s does not exist, create it now?" + (if (y-or-n-p + (format "Temp directory (to save multipart) %s does not exist, create it now?" wl-tmp-dir)) (make-directory wl-tmp-dir) (error "Temp directory is not created"))))