From: hmurata Date: Sun, 5 Sep 2004 14:15:24 +0000 (+0000) Subject: * wl-summary.el (wl-summary-sync-marks): Call X-Git-Tag: wl-2_11_31~8 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17a151211a61afe71df41a25b01a1c8382018c3f;p=elisp%2Fwanderlust.git * wl-summary.el (wl-summary-sync-marks): Call `wl-summary-set-persistent-mark' and `wl-summary-unset-persistent-mark' with 4th argument `no-server'. (wl-summary-set-persistent-mark-internal): Add 4th argument `no-server'. (wl-summary-unset-persistent-mark): Ditto. (wl-summary-set-persistent-mark): Ditto. (wl-summary-add-flags-internal): Abolish. (wl-summary-remove-flags-internal): Ditto. (wl-summary-mark-as-important-internal): Ditto. (wl-summary-mark-as-important): Use `wl-summary-set-persistent-mark' instead of `wl-summary-add-flags-internal'. (wl-summary-mark-as-important-region): Ditto. * wl-score.el (wl-summary-score-update-all-lines): Ditto. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 29fea45..1f17e41 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,22 @@ 2004-09-05 Hiroya Murata + * wl-summary.el (wl-summary-sync-marks): Call + `wl-summary-set-persistent-mark' and + `wl-summary-unset-persistent-mark' with 4th argument `no-server'. + (wl-summary-set-persistent-mark-internal): Add 4th argument + `no-server'. + (wl-summary-unset-persistent-mark): Ditto. + (wl-summary-set-persistent-mark): Ditto. + (wl-summary-add-flags-internal): Abolish. + (wl-summary-remove-flags-internal): Ditto. + (wl-summary-mark-as-important-internal): Ditto. + (wl-summary-mark-as-important): Use + `wl-summary-set-persistent-mark' instead of + `wl-summary-add-flags-internal'. + (wl-summary-mark-as-important-region): Ditto. + + * wl-score.el (wl-summary-score-update-all-lines): Ditto. + * wl-summary.el (wl-summary-get-available-flags): New function. (wl-summary-sync-marks): Use it and simplified. (wl-summary-unset-persistent-mark): Use diff --git a/wl/wl-score.el b/wl/wl-score.el index 68fcc56..aed453f 100644 --- a/wl/wl-score.el +++ b/wl/wl-score.el @@ -1195,7 +1195,7 @@ Set `wl-score-cache' nil." ((and wl-summary-important-above (> score wl-summary-important-above)) (if (wl-thread-jump-to-msg num);; force open - (wl-summary-add-flags-internal num '(important)))) + (wl-summary-set-persistent-mark 'important num))) ((and wl-summary-target-above (> score wl-summary-target-above)) (if visible diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 38945fc..5487266 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -1632,7 +1632,7 @@ If ARG is non-nil, checking is omitted." 'important)))) (if (null number-list) (message "No message.") - (wl-summary-mark-as-important-internal remove number-list) + (wl-summary-set-persistent-mark-internal remove 'important number-list) (wl-summary-count-unread) (wl-summary-update-modeline)))) @@ -1805,11 +1805,11 @@ This function is defined for `window-scroll-functions'" (setq diffs (cadr diff)) (setq mes (concat mes (format "-%d" (length diffs)))) (when diffs - (wl-summary-unset-persistent-mark flag diffs 'no-modeline)) + (wl-summary-unset-persistent-mark flag diffs 'no-modeline 'no-server)) (setq diffs (car diff) mes (concat mes (format "/+%d %s " (length diffs) flag))) (when diffs - (wl-summary-set-persistent-mark flag diffs 'no-modeline))) + (wl-summary-set-persistent-mark flag diffs 'no-modeline 'no-server))) (if (interactive-p) (message "%s" mes))))) (defun wl-summary-sync-update (&optional unset-cursor @@ -3035,7 +3035,8 @@ Return non-nil if the mark is updated" (defsubst wl-summary-set-persistent-mark-internal (inverse &optional flag number-or-numbers - no-modeline-update) + no-modeline-update + no-server) "Set persistent mark." (save-excursion (let ((folder wl-summary-buffer-elmo-folder) @@ -3051,8 +3052,8 @@ Return non-nil if the mark is updated" (if (null number-list) (message "No message.") (if inverse - (elmo-folder-unset-flag folder number-list flag) - (elmo-folder-set-flag folder number-list flag)) + (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 @@ -3069,7 +3070,8 @@ Return non-nil if the mark is updated" (defun wl-summary-unset-persistent-mark (&optional flag number-or-numbers - no-modeline-update) + no-modeline-update + no-server) "Unset persistent mark." (interactive) (when (interactive-p) @@ -3085,11 +3087,13 @@ Return non-nil if the mark is updated" (wl-summary-set-persistent-mark-internal 'inverse flag number-or-numbers - no-modeline-update)) + no-modeline-update + no-server)) (defun wl-summary-set-persistent-mark (&optional flag number-or-numbers - no-modeline-update) + no-modeline-update + no-server) "Set persistent mark." (interactive) (when (interactive-p) @@ -3102,11 +3106,11 @@ Return non-nil if the mark is updated" (wl-summary-get-available-flags)) nil 'require-match)))))) - (wl-summary-set-persistent-mark-internal - nil - flag - number-or-numbers - no-modeline-update)) + (wl-summary-set-persistent-mark-internal nil + flag + number-or-numbers + no-modeline-update + no-server)) (defun wl-summary-mark-as-answered (&optional number-or-numbers no-modeline-update) @@ -3188,85 +3192,24 @@ Return non-nil if the mark is updated" (wl-summary-update-persistent-mark)))) flags))) -(defsubst wl-summary-add-flags-internal (&optional - number-or-numbers - flags - local) - (save-excursion - (let ((folder wl-summary-buffer-elmo-folder) - set-flags msg number-list visible) - (setq number-list (cond ((numberp number-or-numbers) - (list number-or-numbers)) - ((and (not (null number-or-numbers)) - (listp number-or-numbers)) - number-or-numbers) - ((setq msg (wl-summary-message-number)) - ;; interactive - (list msg)))) - (if (null number-list) - (message "No message.") - (dolist (number number-list) - (setq set-flags - (elmo-get-global-flags - (elmo-message-flags folder number))) - (setq set-flags (nconc flags set-flags)) - (elmo-message-set-global-flags folder number set-flags local) - (setq visible (wl-summary-jump-to-msg number)) - ;; set mark on buffer - (when visible - (wl-summary-update-persistent-mark))))))) - -(defsubst wl-summary-remove-flags-internal (&optional - number-or-numbers - flags - local) - (save-excursion - (let ((folder wl-summary-buffer-elmo-folder) - set-flags msg number-list visible) - (setq number-list (cond ((numberp number-or-numbers) - (list number-or-numbers)) - ((and (not (null number-or-numbers)) - (listp number-or-numbers)) - number-or-numbers) - ((setq msg (wl-summary-message-number)) - ;; interactive - (list msg)))) - (if (null number-list) - (message "No message.") - (dolist (number number-list) - (setq set-flags (elmo-get-global-flags - (elmo-message-flags folder number))) - (dolist (flag flags) - (setq set-flags (delq flag set-flags))) - (elmo-message-set-global-flags folder number set-flags local) - (setq visible (wl-summary-jump-to-msg number)) - ;; set mark on buffer - (when visible - (wl-summary-update-persistent-mark))))))) - (defun wl-summary-set-flags (&optional remove) (interactive "P") (if (eq 'flag (elmo-folder-type-internal wl-summary-buffer-elmo-folder)) (error "Cannot process flags in this folder")) (wl-summary-set-flags-internal nil nil nil remove)) -(defun wl-summary-mark-as-important-internal (inverse - &optional number-or-numbers) - (if inverse - (wl-summary-remove-flags-internal number-or-numbers '(important)) - (wl-summary-add-flags-internal number-or-numbers '(important)))) - (defun wl-summary-mark-as-important (&optional prompt) (interactive "P") (if (eq 'flag (elmo-folder-type-internal wl-summary-buffer-elmo-folder)) (error "Cannot process flags in this folder")) (if prompt (wl-summary-set-flags-internal) - (wl-summary-mark-as-important-internal + (wl-summary-set-persistent-mark-internal (and (interactive-p) (elmo-message-flagged-p wl-summary-buffer-elmo-folder (wl-summary-message-number) - 'important))))) + 'important)) + 'important))) ;;; Summary line. (defvar wl-summary-line-formatter nil)