(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
(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)))))
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)
(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)
(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)
(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)
'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)
(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))
(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)
(indent-for-tab-command)))))
(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)
(let* ((end (point))
(start (save-excursion
; (skip-chars-backward "_a-zA-Z0-9+@%.!\\-")
- (skip-chars-backward (or skip-chars
+ (skip-chars-backward (or skip-chars
"_a-zA-Z0-9+@%.!\\-/"))
(point)))
(completion)
(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))
(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)
"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))))))
(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...")
(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."
;;
;;; Commentary:
-;;
+;;
;;; Code:
-;;
+;;
(require 'wl-vars)
(provide 'wl-demo)
(setq pixel-width (string-to-int (match-string 1))
pixel-height (string-to-int (match-string 2)))))
(insert-char ?\n (max 1 (/ (- (window-height) 6
- (/ pixel-height
+ (/ pixel-height
(frame-char-height))) 2)))
(insert-char ?\ (max 0 (/ (- (window-width)
- (/ pixel-width
+ (/ pixel-width
(frame-char-width))) 2)))
(wl-insert-image wl-logo)
(insert "\n")))
((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))))
(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)))))
(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
(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))))))
(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
((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))
(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)))
;; ... 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)
(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))
(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)
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 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))
to mail-followup-to cc subject in-reply-to references newsgroups
from)
(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") ",")
(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))
(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))
(and to (setq to (mapconcat 'identity to ",\n\t")))
(and cc (setq cc (mapconcat 'identity cc ",\n\t")))
- (and mail-followup-to (setq mail-followup-to
- (mapconcat 'identity
+ (and mail-followup-to (setq mail-followup-to
+ (mapconcat 'identity
mail-followup-to ",\n\t")))
(and (null to) (setq to cc cc nil))
(setq references (delq nil references)
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
(save-restriction
(current-buffer)
(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))
(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)
(let ((cur-buf (current-buffer))
(tmp-buf (get-buffer-create " *wl-draft-edit-string*"))
to subject in-reply-to cc references newsgroups mail-followup-to
- content-type
+ content-type
body-beg buffer-read-only
)
(set-buffer tmp-buf)
(setq references (std11-field-body "References"))
(setq newsgroups (std11-field-body "Newsgroups"))
(setq mail-followup-to (std11-field-body "Mail-Followup-To"))
- (setq content-type (std11-field-body "Content-Type"))
+ (setq content-type (std11-field-body "Content-Type"))
(goto-char (point-min))
(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
+ (wl-draft to subject in-reply-to cc references newsgroups
mail-followup-to
content-type
(buffer-substring (point) (point-max))
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))))
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)))
;; 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)))))))
(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
(> 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)))))
(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))))))
"Send the prepared message buffer with POP-before-SMTP."
(require 'elmo-pop3)
(condition-case ()
- (elmo-pop3-get-connection
+ (elmo-pop3-get-connection
(list 'pop3
(or wl-pop-before-smtp-user
elmo-default-pop3-user)
(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")))
(lambda (local)
(when (and (consp local)
(car local)
- (string-match
+ (string-match
wl-draft-clone-local-variable-regexp
(symbol-name (car local))))
(setq result (wl-append result (list (car local)))))))
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)
(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))))
(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)
(search-forward (concat "\n" mail-header-separator "\n") nil 0)
(point)))
(if (bolp)
- (if (bobp)
+ (if (bobp)
t
(save-excursion
(forward-line -1)
;; 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))))
(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
(if edit-again
(let (start)
(setq start (point))
- (when content-type
+ (when content-type
(insert "Content-type: " content-type "\n\n"))
(and body (insert body))
(save-restriction
((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 ()
(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)
(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)))
"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.
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
(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))
(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)
(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
(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
(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
(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
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))
(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)))
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)))))
(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)))))
;; 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)
((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)
(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
(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))
(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)
(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 ())
(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)
(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)))
(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
(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))
(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 ()
(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)))
(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)))
(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))
(quit
(setq err t)
(setcdr (assoc fname wl-folder-group-alist) nil))
- (error
+ (error
(elmo-display-error errobj t)
(ding)
(setq err t)
(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))
((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)))
(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))
(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)
(quit
(setq err t)
(setcdr (assoc (car entity) wl-folder-group-alist) nil))
- (error
+ (error
(elmo-display-error errobj t)
(ding)
(setq err t)
(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))
(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)))
(if (not (elmo-folder-exists-p 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
(unless (elmo-create-folder entity)
(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)
(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
(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))
(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
(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)
(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
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))
(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)
(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)
(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)
;; (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))
(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))
'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
(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
(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)
(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)
(setq buffer-read-only t)
(setq inhibit-read-only nil)
(setq truncate-lines t)
- (when wl-show-plug-status-on-modeline
+ (when wl-show-plug-status-on-modeline
(setq mode-line-format (wl-make-modeline)))
(easy-menu-add wl-folder-mode-menu)
(wl-xmas-setup-folder)
(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
(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)
(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)))
(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)
; (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)))
; 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))
(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)))
'wl-folder-insert-entity "Inserting group %s..."
(/ (* i 100) len) (car entity)))
(setq flist (cdr flist)))
- (when mes
+ (when mes
(elmo-display-progress
'wl-folder-insert-entity "Inserting group %s..."
100 (car entity))))
(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)))))
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))))
(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)
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)))
((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
(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))
(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))
(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)))
(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)))
(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))
((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)
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)))
(if (< 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))
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
(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")
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
(if (elmo-folder-exists-p fld)
()
(if (elmo-folder-creatable-p fld)
- (if (y-or-n-p
+ (if (y-or-n-p
(format "Folder %s does not exist, create it?" fld))
(progn
(setq wl-folder-entity-hashtb
()
(if (not (elmo-folder-creatable-p fld))
(error "Folder %s is not found" fld)
- (if (y-or-n-p
+ (if (y-or-n-p
(format "Folder %s does not exist, create it?" fld))
(progn
(setq wl-folder-entity-hashtb
(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
(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))))
((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
(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)
(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
"\\)\\["))
(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)
((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
;;
(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)
(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)))))
(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))
(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))
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
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
(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
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
(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)
(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)
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)))
(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))
(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))
(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))
(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)
(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))
(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)
(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
(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))
(let (ret-val)
(if (setq ret-val (get-buffer wl-original-buf-name))
ret-val
- (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)
;; 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
&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
- (assoc message-id
+ (assoc message-id
(elmo-msgdb-get-overview msgdb))))
(backend (wl-message-decide-backend folder number message-id size))
cur-entity ret-val header-end real-fld-num summary-win)
(erase-buffer)
(if backend
(let (mime-display-header-hook ;; bind to nil...
- (mime-view-ignored-field-list
+ (mime-view-ignored-field-list
(if (eq flag 'all-header)
nil
mime-view-ignored-field-list))
folder number))
(setq cur-entity
(wl-message-make-mime-entity
- backend
+ backend
(if (eq backend 'elmo-imap4)
(cdr real-fld-num)
number)
(if mmelmo-imap4-skipped-parts
(progn
(message "Skipped fetching of %s."
- (mapconcat
+ (mapconcat
(lambda (x)
(format "[%s]" x))
mmelmo-imap4-skipped-parts ","))))
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
- (assoc message-id
+ (assoc message-id
(elmo-msgdb-get-overview msgdb))))
header-end ret-val summary-win
)
(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
(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
(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)
(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))
(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)))
(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))
(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)
(, 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)
(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)
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))))
(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))
(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
;;; 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
"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)
(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)
(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))
'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)
'((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
(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)
(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
(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"
'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 ())
;; 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)
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))))
(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))))
(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().
(prin1 alist tmp-buffer)
(princ "\n" tmp-buffer)
(if (file-writable-p filename)
- (write-region (point-min) (point-max)
+ (write-region (point-min) (point-max)
filename nil 'no-msg)
(message (format "%s is not writable." filename)))
(kill-buffer tmp-buffer))))
(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)
(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 (not ml)
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))
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)))))
(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)
(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.
(defun wl-summary-rescore-msgs (number-alist)
(mapcar
'car
- (nthcdr
+ (nthcdr
(max (- (length number-alist)
wl-summary-rescore-partial-threshold)
0)
(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)))
;; 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
;; 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)))
(defvar wl-summary-buffer-folder-name 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)")
(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-thread-indent-level-internal nil)
(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
;; 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)))
(unless (fboundp 'wl-summary-from-func-internal)
(defun wl-summary-from-func-internal (from)
["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]
(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
(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)
(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)
(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)))
(catch 'done
(while cur-entry
(if (or (and (symbolp (car cur-entry))
- (eq 'mode-line-buffer-identification
+ (eq 'mode-line-buffer-identification
(car cur-entry)))
(and (consp (car cur-entry))
- (or
- (eq 'modeline-buffer-identification
+ (or
+ (eq 'modeline-buffer-identification
(car (car cur-entry)))
- (eq 'modeline-buffer-identification
+ (eq 'modeline-buffer-identification
(cdr (car cur-entry))))))
(progn
(setq return-modeline (append return-modeline
- (list
+ (list
'wl-plug-state-indicator
(car cur-entry)
'wl-summary-buffer-unread-status)
(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)
(progn
(elmo-imap4-send-command (process-buffer process)
process
- (format "select \"%s\""
+ (format "select \"%s\""
(elmo-imap4-spec-folder
spec)))
(setq msgdb (elmo-msgdb-load (elmo-string folder)))
- (setq response (elmo-imap4-read-response
+ (setq response (elmo-imap4-read-response
(process-buffer process)
process)))
(if (null response)
(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)
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) "\\|"
"Major mode for reading threaded messages.
The keys that are defined for this mode are:\\<wl-summary-mode-map>
-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 '?'.
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.
"
(setq wl-summary-buffer-target-mark-list nil)
(setq wl-summary-buffer-delete-list nil)
(setq wl-summary-scored nil)
- (setq wl-summary-buffer-disp-msg nil)
-;; (setq default-directory (or wl-tmp-dir (expand-file-name "~/")))
+ (setq wl-summary-buffer-disp-msg nil)
+;; (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))
(wl-xmas-setup-summary) ; setup toolbar, dnd, etc.
- (when wl-show-plug-status-on-modeline
+ (when wl-show-plug-status-on-modeline
(setq mode-line-format (wl-summary-make-modeline)))
(easy-menu-add wl-summary-mode-menu)
(run-hooks 'wl-summary-mode-hook))
"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.
"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))
(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...")
(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)))
(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
"%" "%%")
(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))))))
(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)
wl-summary-buffer-msgdb))
(setq wl-summary-buffer-message-modified nil))
(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
;; 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-save-view-cache sticky))
- ;; save msgdb ...
+ ;; save msgdb ...
(wl-summary-msgdb-save)))
(defun wl-summary-force-exit ()
(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)
(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))
((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.
(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))
(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
(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"))
(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))))
;; 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))))
(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))))
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))
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))
(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 " ")))))
;; 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))))
(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))))
(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))))
(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)))))
(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))))
(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))
)
((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)))
(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))))
(setq update-list (and update-list
(delete (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))
(if (eq wl-summary-buffer-view 'thread)
(wl-thread-update-line-msgs (elmo-uniq-list update-list)))
(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-summary-update-modeline)
(wl-folder-update-unread
wl-summary-buffer-folder-name
(+ 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)))
(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)
(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)))
(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 "")
(interactive)
(let ((plugged (elmo-folder-plugged-p wl-summary-buffer-folder-name))
(last-progress 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 ma-length 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...")
mark-alist (elmo-msgdb-get-mark-alist wl-summary-buffer-msgdb)
num-ma (length mark-alist)
ma-length num-ma
- 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
(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 (y-or-n-p (format "%d messages are disappeared. OK?"
+ (if (y-or-n-p (format "%d messages are disappeared. OK?"
(- len in)))
(throw 'end in))))
(nthcdr (max (- len in) 0) appends))
top-num 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
;; 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 (elmo-folder-contains-type folder 'nntp)
(elmo-nntp-max-number-precedes-list-active-p))
;; XXX this does not work correctly in rare case.
(setq delete-list
(wl-summary-delete-canceled-msgs-from-list delete-list
- msgdb)))
+ msgdb)))
(if (or (equal diff '(nil nil))
(equal diff '(nil))
(and (eq (length delete-list) 0)
(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 append-list))
(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 ; !
(while curp
(setq entity (car curp))
(setq top-num
- (wl-summary-append-message-func-internal
- entity overview mark-alist
+ (wl-summary-append-message-func-internal
+ entity overview mark-alist
(not sync-all)))
(when top-num
(wl-append update-top-list (list top-num)))
(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))
(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
;; 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)
(setq expunged (wl-summary-score-update-all-lines))
(if expunged
- (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))
(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)))
(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)))
"+")))))
(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")
(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)
"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))
;; 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)
(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))))
"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)
(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))
()
(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)))
(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))))
(switch-to-buffer buf)
(kill-buffer cur-buf)
(setq mode-line-buffer-identification
- (format "Wanderlust: %s"
+ (format "Wanderlust: %s"
(if (memq 'modeline wl-use-folder-petname)
(wl-folder-get-petname folder)
folder)))
- (wl-summary-count-unread
+ (wl-summary-count-unread
(elmo-msgdb-get-mark-alist wl-summary-buffer-msgdb))
(wl-summary-update-modeline)
(if msg
(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))))
(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)
(buffer-read-only nil))
(erase-buffer)
(setq mode-line-buffer-identification
- (format "Wanderlust: %s"
+ (format "Wanderlust: %s"
(if (memq 'modeline wl-use-folder-petname)
(wl-folder-get-petname fld)
fld)))
(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)
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)
(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)
((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))
(> (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))
(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))))
(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))
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)
(defun wl-summary-insert-thread-entity (entity overview mark-alist update)
(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))
;;(case-fold-search t)
;;overview2 cur-entity
- msg)
+ msg)
;; Search parent by subject.
; (when (and (null parent-number)
; (string-match wl-summary-search-parent-by-subject-regexp
; (setq overview2 (cdr overview2))))
(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))
(setq msg (elmo-msgdb-overview-entity-get-number entity))
(wl-thread-insert-message entity overview mark-alist
msg parent-number update)))
-(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)
(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)))
(if (and (elmo-msgdb-overview-entity-get-number entity))
(if (setq summary-line
- (wl-summary-overview-create-summary-line
+ (wl-summary-overview-create-summary-line
(elmo-msgdb-overview-entity-get-number entity)
entity parent-entity depth mark-alist nil nil
thr-entity))
(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)
(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)))
(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\\)")
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)
;; 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
(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)))
(defun wl-summary-exec-subr (msgs dels cpys)
(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))
dst tmp msg msgs2 cpys2
- msg-dst dst-msgs len
- refile-failures
+ msg-dst dst-msgs len
+ refile-failures
copy-failures
succeeds result executed)
(if (not (or msgs dels cpys))
(goto-char start) ; avoid moving cursor to the bottom line.
(setq executed 0)
(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
len executed (cdr dst-msgs)
nil ; no-delete
nil ; same-number
(if result ; succeeded.
(progn
;; update buffer.
- (wl-summary-delete-messages-on-buffer
+ (wl-summary-delete-messages-on-buffer
(cdr (car dst-msgs)))
;; update refile-alist.
- (mapcar
- (function
+ (mapcar
+ (function
(lambda (x)
(setq wl-summary-buffer-refile-list
(delq (assq x wl-summary-buffer-refile-list)
wl-summary-buffer-refile-list))))
(cdr (car dst-msgs))))
- (setq refile-failures
+ (setq refile-failures
(+ refile-failures (length (cdr (car dst-msgs))))))
(setq executed (+ executed (length (cdr (car dst-msgs)))))
(setq dst-msgs (cdr dst-msgs)))
(setq copy-failures 0)
(setq executed 0)
(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
- len executed
- (cdr dst-msgs)
+ wl-summary-buffer-msgdb
+ len executed
+ (cdr dst-msgs)
t ; t is no-delete (copy)
nil ; same number
- (list
+ (list
wl-summary-unread-cached-mark
wl-summary-unread-uncached-mark
wl-summary-new-mark)))
(+ copy-failures (length (cdr (car dst-msgs))))))
(setq executed (+ 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)
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)))
(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)))))
(elmo-msgdb-overview-get-entity-by-number
(elmo-msgdb-get-overview wl-summary-buffer-msgdb)
msg-num)))
- (variable
+ (variable
(intern (format "wl-summary-buffer-%s-list" copy-or-refile)))
folder mark already tmp-folder)
(catch 'done
(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)
(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
(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)
(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
(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
;; 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-by-number
+ (elmo-msgdb-overview-get-entity-by-number
overview x)))
(not (equal dst spec)))
(if (wl-summary-refile dst x)
(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)))))
(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
(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
(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.
(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 "*")
(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")
(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)))
(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
(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")
(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))))
(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)))
(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)
;; 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
(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
(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))))
(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
(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))))
(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
(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))))
(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)
;;(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))))
(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)
(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)
(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)))))
(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)))
(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)
(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)
(setq thr-str (wl-thread-make-indent-string 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)
(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
(concat " " from))
(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 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))
(save-excursion
(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))
(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)
(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)))
(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
(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
(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)
(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
;; 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
(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
;; 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
(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)
(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)))
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.")
(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
(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."
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))
(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."
(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."
(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."
(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
(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
(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
(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
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"))
(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"))
"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? ")
(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))
(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?"))
(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
(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))
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)))))
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
(set-buffer (setq orig-buf (wl-message-get-original-buffer)))
(goto-char (point-min))
(cond ((= i 1) ; first
- (setq filename (wl-message-uu-substring
- orig-buf tmp-buf t
+ (setq filename (wl-message-uu-substring
+ orig-buf tmp-buf t
(= i k))))
((< i k)
(wl-message-uu-substring orig-buf tmp-buf))
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
(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)))
(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."))))
(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)
(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)
buffer-read-only)
(when number
(wl-thread-delete-message number t)
- (wl-thread-insert-message
+ (wl-thread-insert-message
(elmo-msgdb-overview-get-entity-by-number
(elmo-msgdb-get-overview wl-summary-buffer-msgdb)
number)
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))))
(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"
(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)
(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)
(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
(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
(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
(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)))
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!!
(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
(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))
(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!!
(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
(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
(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))
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)))
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
(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)))
(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))
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
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
(wl-thread-open-close)
(setq cur (1+ cur))
(elmo-display-progress
- 'wl-thread-close-all "Closing all threads..."
+ 'wl-thread-close-all "Closing all threads..."
(/ (* cur 100) len)))
(setq entities (cdr entities))))
(elmo-display-progress 'wl-thread-close-all
"Closing all threads..."
- 100)
+ 100)
(message "Closing all threads...done.")
(goto-char (point-max)))
(car entities))))
(setq cur (1+ cur))
(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.")
(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
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
;;(setq children (wl-thread-entity-get-children entity))
(setq children-num (wl-thread-entity-get-children-num entity))
(setq overview-entity
- (elmo-msgdb-search-overview-entity msg
+ (elmo-msgdb-search-overview-entity msg
number-alist overview))
;;(wl-delete-all-overlays)
(when overview-entity
- (setq summary-line
+ (setq summary-line
(wl-summary-overview-create-summary-line
msg
overview-entity
(when (boundp (setq sym (intern (format "#%d" (car msgs))
wl-thread-entity-hashtb)))
;; delete entity.
- (setq wl-thread-entities
+ (setq wl-thread-entities
(delq (wl-thread-get-entity (car msgs))
wl-thread-entities))
(makunbound sym))
parent num)
(when entity
(setq parent (wl-thread-entity-get-parent-entity entity))
- (if parent
+ (if parent
(progn
;; has parent.
;;(setq brothers (wl-thread-entity-get-children parent))
;;
(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)))
children)
(setq younger-brothers (wl-thread-entity-get-younger-brothers
entity nil))
(setq wl-thread-entity-list
- (append (append older-brothers children)
+ (append (append older-brothers children)
younger-brothers))))
;; delete myself from buffer.
(setq children2 children)
(while children2
(wl-thread-insert-entity 0 ; no mean now...
- (wl-thread-get-entity
+ (wl-thread-get-entity
(car children2))
entity nil)
(setq children2 (cdr children2))))
(wl-thread-update-line-on-buffer num)))
;; update children lines on buffer.
(mapcar '(lambda (x)
- (wl-thread-update-line-on-buffer
+ (wl-thread-update-line-on-buffer
x
(wl-thread-entity-get-number parent)))
children)))
;; return parent number
(list (wl-thread-entity-get-number parent))
children))
- ;; update the indent string
+ ;; update the indent string
; (wl-summary-goto-top-of-current-thread)
; (setq beg (point))
; (wl-thread-goto-bottom-of-sub-thread)
(defun wl-thread-insert-message (overview-entity overview mark-alist
msg parent-msg &optional update)
"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)
(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-by-number overview parent-msg))
(when parent
(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]+\\):"))
(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)))
(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)))))
(cur 0))
(wl-delete-all-overlays)
(while elist
- (wl-thread-insert-entity
+ (wl-thread-insert-entity
0
(wl-thread-get-entity (car elist))
nil
(unless temp-mark
(setq temp-mark (wl-summary-get-score-mark msg-num)))
(setq children-num (wl-thread-entity-get-children-num entity))
- (setq overview-entity
+ (setq overview-entity
(elmo-msgdb-search-overview-entity
(nth 0 entity) number-alist overview))
;;(wl-delete-all-overlays)
(when overview-entity
- (setq summary-line
+ (setq summary-line
(wl-summary-overview-create-summary-line
msg-num
overview-entity
; (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)))
(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)
(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'
(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 beg depth parent)
(setq msg (wl-summary-message-number))
(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))
(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))))
(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)
(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
)))
(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 ()
((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
"")))
((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
((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
("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
(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)) " "))
(if (= (current-column) width)
string
(concat string
- (format (format "%%%ds"
+ (format (format "%%%ds"
(- width (current-column)))
" "))))))
(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
(catch 'done
(while cur-entry
(if (or (and (symbolp (car cur-entry))
- (eq 'mode-line-buffer-identification
+ (eq 'mode-line-buffer-identification
(car cur-entry)))
(and (consp (car cur-entry))
- (or
- (eq 'modeline-buffer-identification
+ (or
+ (eq 'modeline-buffer-identification
(car (car cur-entry)))
- (eq 'modeline-buffer-identification
+ (eq 'modeline-buffer-identification
(cdr (car cur-entry))))))
(progn
(setq return-modeline (append return-modeline
(setq alist (delq entry alist)))
alist))
-(eval-when-compile
+(eval-when-compile
(require 'static))
(static-unless (fboundp 'pp)
(defvar pp-escape-newlines t)
(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))
(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)))))
: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."
: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)
: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")
'(("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.
'(("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.
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"))
(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)
: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
: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
: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)
: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.)"
: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."
: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)
(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)
: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)
: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"))
: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."
: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."
(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)
(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.
: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)
: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.
'(\"^[-%]\")"
("^-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\")
("^-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
(string :tag "Space"))))
:group 'wl-pref)
-(defcustom wl-folder-sync-range-alist
+(defcustom wl-folder-sync-range-alist
(list (cons "^&.*$" "all")
- (cons (concat "^" (regexp-quote wl-draft-folder) "$\\|^"
+ (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."
: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)
: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."
: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."
: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\")
(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."
:type '(repeat (cons regexp face))
: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."
: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)
(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
: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)
: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)."
(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 "\e$B(2\e(B"
(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)))
[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.")
((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)))
(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
(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"
'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)))))
locale tag-set 'prepend))
glyph))
-(defun wl-folder-init-icons ()
+(defun wl-folder-init-icons ()
(mapcar
(lambda (x)
(if (null (symbol-value (car x)))
(set-extent-property extent 'help-echo "button2 toggles plugged status")
(setq wl-plug-state-indicator-on (cons extent wl-plugged-glyph))
(setq wl-plug-state-indicator-off (cons extent wl-unplugged-glyph))
- (setq wl-plug-state-indicator (if wl-plugged
+ (setq wl-plug-state-indicator (if wl-plugged
wl-plug-state-indicator-on
wl-plug-state-indicator-off)))
(wl-make-modeline-subr))
(wl-summary-prev t)))))
(defun wl-draft-overload-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"))
(require 'wl-demo)
(require 'wl-highlight)
-(eval-when-compile
+(eval-when-compile
(require 'smtp)
(require 'wl-score)
(unless wl-on-nemacs
(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)
(setq major-mode 'wl-plugged-mode)
(setq mode-name "Plugged")
(easy-menu-add wl-plugged-mode-menu)
- (when wl-show-plug-status-on-modeline
+ (when wl-show-plug-status-on-modeline
(setq mode-line-format (wl-make-modeline)))
(setq wl-plugged-switch wl-plugged)
(setq wl-plugged-alist-modified nil)
(let (summary-buf)
(save-excursion
(let ((summaries (wl-collect-summary)))
- (mapcar
+ (mapcar
(function
(lambda (x)
(set-buffer x)
(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)
(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"))))