(wl-summary-persistent-mark-priority-list): Add `forwarded'.
(wl-summary-uncached-mark): Renamed from wl-summary-read-uncached-mark.
(wl-summary-new-cached-mark): Changed default value to 'n'.
(wl-summary-unread-cached-mark): Changed default value to 'u'.
(wl-summary-answered-cached-mark): Changed default value to 'a'.
(wl-folder-sync-range-alist): Remove spec for 'flag.
(wl-summary-force-prefetch-folder-list): New user option.
* wl-summary.el (wl-summary-mode-map): Bind 'M-k' to
`wl-summary-toggle-persistent-mark'.
(wl-summary-update-mark-and-highlight-window): Don't highlight when
number is nil.
(wl-summary-mark-as-answered-region): Set interactive argument of
`wl-summary-set-persistent-mark-internal'.
(wl-summary-mark-as-important-region): Ditto.
(wl-summary-unset-persistent-mark): Ditto.
(wl-summary-set-persistent-mark): Ditto.
(wl-summary-mark-as-answered): Ditto.
(wl-summary-mark-as-important): Ditto.
(wl-summary-set-persistent-mark-internal): Do nothing
when `elmo-message-flag-available-p' is nil.
(wl-summary-toggle-persistent-mark): New function.
(wl-summary-goto-folder-subr): Call `wl-summary-force-prefetch'
when the folder matches `wl-summary-force-prefetch-folder-list'.
* wl-highlight.el (wl-highlight-summary-current-line): Do nothing
when number is nil.
(wl-highlight-summary-forwarded-face): New face.
2004-09-12 Yuuichi Teranishi <teranisi@gohome.org>
+ * wl-vars.el (wl-draft-forward-hook): Setup to put forwarded flag.
+ (wl-summary-persistent-mark-priority-list): Add `forwarded'.
+ (wl-summary-uncached-mark): Renamed from wl-summary-read-uncached-mark.
+ (wl-summary-new-cached-mark): Changed default value to 'n'.
+ (wl-summary-unread-cached-mark): Changed default value to 'u'.
+ (wl-summary-answered-cached-mark): Changed default value to 'a'.
+ (wl-folder-sync-range-alist): Remove spec for 'flag.
+ (wl-summary-force-prefetch-folder-list): New user option.
+
+ * wl-summary.el (wl-summary-mode-map): Bind 'M-k' to
+ `wl-summary-toggle-persistent-mark'.
+ (wl-summary-update-mark-and-highlight-window): Don't highlight when
+ number is nil.
+ (wl-summary-mark-as-answered-region): Set interactive argument of
+ `wl-summary-set-persistent-mark-internal'.
+ (wl-summary-mark-as-important-region): Ditto.
+ (wl-summary-unset-persistent-mark): Ditto.
+ (wl-summary-set-persistent-mark): Ditto.
+ (wl-summary-mark-as-answered): Ditto.
+ (wl-summary-mark-as-important): Ditto.
+ (wl-summary-set-persistent-mark-internal): Do nothing
+ when `elmo-message-flag-available-p' is nil.
+ (wl-summary-toggle-persistent-mark): New function.
+ (wl-summary-goto-folder-subr): Call `wl-summary-force-prefetch'
+ when the folder matches `wl-summary-force-prefetch-folder-list'.
+
+
+ * wl-highlight.el (wl-highlight-summary-current-line): Do nothing
+ when number is nil.
+ (wl-highlight-summary-forwarded-face): New face.
+
+2004-09-12 Yuuichi Teranishi <teranisi@gohome.org>
+
* Version number is increased to 2.11.31.
2004-09-11 Yoichi NAKAYAMA <yoichi@geiin.org>
:group 'wl-summary-faces
:group 'wl-faces)
+;; forwarded
+(wl-defface wl-highlight-summary-forwarded-face
+ '((((type tty)
+ (background dark))
+ (:foreground "yellow"))
+ (((class color)
+ (background dark))
+ (:foreground "DarkOliveGreen2"))
+ (((class color)
+ (background light))
+ (:foreground "DarkOliveGreen4")))
+ "Face used for displaying forwarded messages."
+ :group 'wl-summary-faces
+ :group 'wl-faces)
+
(wl-defface wl-summary-persistent-mark-face
'((((type tty))
(:foreground "blue"))
(deactivate-mark nil)
(number (or number (wl-summary-message-number)))
bol eol spec)
- (end-of-line)
- (setq eol (point))
- (beginning-of-line)
- (setq bol (point))
- (setq spec (wl-highlight-summary-line-face-spec
- (or flags
- (elmo-message-flags wl-summary-buffer-elmo-folder
- number))
- (wl-summary-temp-mark number)
- (wl-thread-entity-get-parent-entity
- (wl-thread-get-entity number))))
- (when (car spec)
- (put-text-property bol eol 'face (car spec)))
- (when (cdr spec)
- (put-text-property (next-single-property-change
- (next-single-property-change
- bol 'wl-summary-action-argument
- nil eol)
- 'wl-summary-action-argument nil eol)
- eol
- 'face
- 'wl-highlight-action-argument-face))
- (when wl-use-highlight-mouse-line
- (put-text-property bol eol 'mouse-face 'highlight))
- (when wl-highlight-summary-line-help-echo-alist
- (wl-highlight-summary-line-help-echo number bol eol))
- (when wl-use-dnd
- (wl-dnd-set-drag-starter bol eol)))))
+ (when number
+ (end-of-line)
+ (setq eol (point))
+ (beginning-of-line)
+ (setq bol (point))
+ (setq spec (wl-highlight-summary-line-face-spec
+ (or flags
+ (elmo-message-flags wl-summary-buffer-elmo-folder
+ number))
+ (wl-summary-temp-mark number)
+ (wl-thread-entity-get-parent-entity
+ (wl-thread-get-entity number))))
+ (when (car spec)
+ (put-text-property bol eol 'face (car spec)))
+ (when (cdr spec)
+ (put-text-property (next-single-property-change
+ (next-single-property-change
+ bol 'wl-summary-action-argument
+ nil eol)
+ 'wl-summary-action-argument nil eol)
+ eol
+ 'face
+ 'wl-highlight-action-argument-face))
+ (when wl-use-highlight-mouse-line
+ (put-text-property bol eol 'mouse-face 'highlight))
+ (when wl-highlight-summary-line-help-echo-alist
+ (wl-highlight-summary-line-help-echo number bol eol))
+ (when wl-use-dnd
+ (wl-dnd-set-drag-starter bol eol))))))
(defun wl-highlight-folder (start end)
"Highlight folder between start and end.
(define-key wl-summary-mode-map "f" 'wl-summary-forward)
(define-key wl-summary-mode-map "$" 'wl-summary-mark-as-important)
(define-key wl-summary-mode-map "F" 'wl-summary-set-flags)
+ (define-key wl-summary-mode-map "\M-k" 'wl-summary-toggle-persistent-mark)
(define-key wl-summary-mode-map "&" 'wl-summary-mark-as-answered)
(define-key wl-summary-mode-map "@" 'wl-summary-edit-addresses)
(goto-char beg)
(while (and (< (point) end) (not (eobp)))
(when (null (get-text-property (point) 'face))
- (setq number (wl-summary-message-number)
- flags (elmo-message-flags wl-summary-buffer-elmo-folder
- number))
+ (setq number (wl-summary-message-number))
+ (when number
+ (setq flags (elmo-message-flags wl-summary-buffer-elmo-folder
+ number)))
(let (wl-summary-highlight)
(wl-summary-update-persistent-mark number flags))
(wl-highlight-summary-current-line number flags))
(if (null number-list)
(message "No message.")
(wl-summary-set-persistent-mark-internal remove 'answered
- number-list)
+ number-list
+ nil nil (interactive-p))
(wl-summary-count-unread)
(wl-summary-update-modeline))))
'important))))
(if (null number-list)
(message "No message.")
- (wl-summary-set-persistent-mark-internal remove 'important number-list)
+ (wl-summary-set-persistent-mark-internal remove 'important number-list
+ nil nil (interactive-p))
(wl-summary-count-unread)
(wl-summary-update-modeline))))
(when (and wl-summary-buffer-window-scroll-functions
wl-on-xemacs)
(sit-for 0))
+ (when (or (eq t wl-summary-force-prefetch-folder-list)
+ (wl-string-match-member
+ (elmo-folder-name-internal wl-summary-buffer-elmo-folder)
+ wl-summary-force-prefetch-folder-list))
+ (wl-summary-force-prefetch))
(unwind-protect
(run-hooks 'wl-summary-prepared-hook)
(set-buffer-modified-p nil))
"wl-summary-%s-cached-mark" (car priorities))
(format
"wl-summary-%s-uncached-mark" (car priorities))))))
- (if (boundp var)
+ (if (and (boundp var)
+ (symbol-value var))
(symbol-value var)
(if cached
(downcase (substring (symbol-name (car priorities))
(or mark
(if (or cached (elmo-folder-local-p folder))
nil
- wl-summary-read-uncached-mark))))
+ wl-summary-uncached-mark))))
(defsubst wl-summary-message-mark (folder number &optional flags)
"Return mark of the message."
no-modeline-update))
(defsubst wl-summary-set-persistent-mark-internal (inverse
- &optional flag
- number-or-numbers
+ flag
+ &optional number-or-numbers
no-modeline-update
- no-server)
+ no-server
+ interactive)
"Set persistent mark."
(save-excursion
(let ((folder wl-summary-buffer-elmo-folder)
(list number))))
(if (null number-list)
(message "No message.")
- (if inverse
- (elmo-folder-unset-flag folder number-list flag no-server)
- (elmo-folder-set-flag folder number-list flag no-server))
- (dolist (number number-list)
- (setq visible (wl-summary-jump-to-msg number))
- ;; set mark on buffer
- (when visible
- (wl-summary-update-persistent-mark)))
- (unless no-modeline-update
- ;; Update unread numbers.
- ;; should elmo-flag-mark-as-read return unread numbers?
- (wl-summary-count-unread)
- (wl-summary-update-modeline)
- (wl-folder-update-unread
- (wl-summary-buffer-folder-name)
- wl-summary-buffer-unread-count))))))
+ ;; XXX Only the first element of the list is checked.
+ (if (elmo-message-flag-available-p folder (car number-list) flag)
+ (progn
+ (if inverse
+ (elmo-folder-unset-flag folder number-list flag no-server)
+ (elmo-folder-set-flag folder number-list flag no-server))
+ (dolist (number number-list)
+ ;; set mark on buffer
+ (when (wl-summary-jump-to-msg number)
+ (wl-summary-update-persistent-mark)))
+ (unless no-modeline-update
+ ;; Update unread numbers.
+ ;; should elmo-flag-mark-as-read return unread numbers?
+ (wl-summary-count-unread)
+ (wl-summary-update-modeline)
+ (wl-folder-update-unread
+ (wl-summary-buffer-folder-name)
+ wl-summary-buffer-unread-count)))
+ (if interactive
+ (error "Flag `%s' is not available in this folder" flag)))))))
(defun wl-summary-unset-persistent-mark (&optional flag
number-or-numbers
flag
number-or-numbers
no-modeline-update
- no-server))
+ no-server
+ (interactive-p)))
(defun wl-summary-set-persistent-mark (&optional flag
number-or-numbers
flag
number-or-numbers
no-modeline-update
- no-server))
+ no-server
+ (interactive-p)))
+
+(defun wl-summary-toggle-persistent-mark (&optional force)
+ "Toggle persistent mark."
+ (interactive "P")
+ (let ((completion-ignore-case t)
+ flag)
+ (setq flag (intern (downcase
+ (completing-read
+ "Flag: "
+ (mapcar (lambda (flag)
+ (list (capitalize (symbol-name flag))))
+ (wl-summary-get-available-flags))
+ nil
+ 'require-match))))
+ (if (and (elmo-message-flagged-p wl-summary-buffer-elmo-folder
+ (wl-summary-message-number)
+ flag)
+ (not force))
+ (wl-summary-unset-persistent-mark flag)
+ (wl-summary-set-persistent-mark flag))))
(defun wl-summary-mark-as-answered (&optional number-or-numbers
no-modeline-update)
'answered))
'answered
number-or-numbers
- no-modeline-update))
+ no-modeline-update
+ nil
+ (interactive-p)))
(defun wl-summary-mark-as-unanswered (&optional number-or-numbers
no-modeline-update)
(elmo-message-flagged-p wl-summary-buffer-elmo-folder
(wl-summary-message-number)
'important))
- 'important)))
+ 'important
+ nil nil nil (interactive-p))))
;;; Summary line.
(defvar wl-summary-line-formatter nil)
"A hook called when replied.
This hook runs on the draft buffer.")
-(defvar wl-draft-forward-hook nil
+(defvar wl-draft-forward-hook
+ '((lambda () (wl-draft-setup-parent-flag 'forwarded)))
"A hook called when forwarded.
This hook runs on the draft buffer.")
(defcustom wl-summary-persistent-mark-priority-list '(flag
new
answered
+ forwarded
unread)
"List of preserved flag symbols to define the priority to map\
to the persistent mark.
(const :tag "Default mark" nil))))
:group 'wl-summary)
+(defcustom wl-summary-uncached-mark "!"
+ "Mark for uncached message with no flag."
+ :type '(string :tag "Mark")
+ :group 'wl-summary-marks)
+
(defcustom wl-summary-new-uncached-mark "N"
"Mark for new and uncached message."
:type '(string :tag "Mark")
:group 'wl-summary-marks)
-(defcustom wl-summary-new-cached-mark "?"
+(defcustom wl-summary-new-cached-mark "n"
"Mark for new but already cached message."
:type '(string :tag "Mark")
:group 'wl-summary-marks)
:type '(string :tag "Mark")
:group 'wl-summary-marks)
-(defcustom wl-summary-unread-cached-mark "!"
+(defcustom wl-summary-unread-cached-mark "u"
"Mark for unread but already cached message."
:type '(string :tag "Mark")
:group 'wl-summary-marks)
-(defcustom wl-summary-read-uncached-mark "u"
- "Mark for read but uncached message."
- :type '(string :tag "Mark")
- :group 'wl-summary-marks)
-
-(defcustom wl-summary-answered-cached-mark "&"
+(defcustom wl-summary-answered-cached-mark "a"
"Mark for answered and cached message."
:type '(string :tag "Mark")
:group 'wl-summary-marks)
(repeat (regexp :tag "Folder Regexp")))
:group 'wl-pref)
+(defcustom wl-summary-force-prefetch-folder-list nil
+ "All folders that match this list are prefetched.
+Each elements are regexp of folder name."
+ :type '(radio (const :tag "none" nil)
+ (const :tag "all" t)
+ (repeat (regexp :tag "Folder Regexp")))
+ :group 'wl-pref)
+
(defcustom wl-no-save-folder-list '("^/.*$" "^\\[.*$")
"All folders that match this list won't save its msgdb.
Each elements are regexp of folder name."
:group 'wl-pref)
(defcustom wl-folder-sync-range-alist
- (list (cons 'wl-require-update-all-folder-p "all")
- (cons "^'flag" "all"))
+ (list (cons 'wl-require-update-all-folder-p "all"))
"*Default sync range alist. If no matches, `wl-default-sync-range' is used."
:type '(repeat (cons (choice (regexp :tag "Folder Regexp")
(symbol :tag "A function"))