From: hmurata Date: Mon, 3 Nov 2003 09:43:41 +0000 (+0000) Subject: * elmo.el (elmo-folder-unflag-important): Call X-Git-Tag: wl-2_11_21~32 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=a9b7597ff59976071828097357325b660f9ecf38;p=elisp%2Fwanderlust.git * elmo.el (elmo-folder-unflag-important): Call `elmo-global-flag-detach' with 4th argument delete-if-none that is a symbol `always'. * elmo-flag.el (elmo-flag-folder-delete-message): Clear hash value before unset flag. (elmo-global-flag-detach): Delete the message from flag folder, if `delete-if-none' is a symbol `always'. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 8831571..a51bf5d 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,14 @@ +2003-11-03 Hiroya Murata + + * elmo.el (elmo-folder-unflag-important): Call + `elmo-global-flag-detach' with 4th argument delete-if-none that is + a symbol `always'. + + * elmo-flag.el (elmo-flag-folder-delete-message): Clear hash value + before unset flag. + (elmo-global-flag-detach): Delete the message from flag folder, if + `delete-if-none' is a symbol `always'. + 2003-11-02 Hiroya Murata * elsp-spamfilter.el (elsp-spamfilter-decode-buffer): Renamed from diff --git a/elmo/elmo-flag.el b/elmo/elmo-flag.el index 662ba04..e3c3649 100644 --- a/elmo/elmo-flag.el +++ b/elmo/elmo-flag.el @@ -104,6 +104,10 @@ target-folder key) (dolist (pair (car elem)) (when (and (car pair) (cdr pair)) + (elmo-clear-hash-val (concat (number-to-string (cdr pair)) ":" + (car pair)) + (elmo-flag-folder-minfo-hash-internal + folder)) (unless keep-referrer (setq target-folder (elmo-make-folder (car pair))) (elmo-folder-open target-folder 'load-msgdb) @@ -111,11 +115,7 @@ ;; (XXX Should the message-id checked?) (elmo-message-unset-flag target-folder (cdr pair) (elmo-flag-folder-flag-internal folder)) - (elmo-folder-close target-folder)) - (elmo-clear-hash-val (concat (number-to-string (cdr pair)) ":" - (car pair)) - (elmo-flag-folder-minfo-hash-internal - folder)))) + (elmo-folder-close target-folder)))) (elmo-clear-hash-val (concat "#" (number-to-string number)) (elmo-flag-folder-minfo-hash-internal folder)) @@ -330,7 +330,9 @@ MESSAGE-ID is the message-id of the message." FOLDER is the folder structure. NUMBERS is the message number. If optional DELETE-IF-NONE is non-nil, delete message from flag folder when -the message is not flagged in any folder." +the message is not flagged in any folder. +If DELETE-IF-NONE is a symbol `always', +delete message without flagged in other folder." (unless (eq (elmo-folder-type-internal folder) 'flag) (let ((flag-folder (elmo-flag-get-folder flag)) elem key) @@ -346,8 +348,11 @@ the message is not flagged in any folder." (elmo-clear-hash-val key (elmo-flag-folder-minfo-hash-internal flag-folder)) ;; Does not have any referrer, remove. - (when (and delete-if-none (null (car elem))) - (elmo-flag-folder-delete-message flag-folder (nth 2 elem) 'keep) + (when (and delete-if-none + (or (eq delete-if-none 'always) + (null (car elem)))) + (elmo-flag-folder-delete-message flag-folder (nth 2 elem) + (null (car elem))) (elmo-localdir-delete-message flag-folder (nth 2 elem)) (elmo-folder-commit flag-folder))))))) diff --git a/elmo/elmo.el b/elmo/elmo.el index 5d60256..c76fdd5 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -1217,7 +1217,7 @@ FIELD is a symbol of the field.") (when (elmo-folder-msgdb-internal folder) (dolist (number numbers) (when (elmo-global-flag-p 'important) - (elmo-global-flag-detach 'important folder number 'remove-if-none)) + (elmo-global-flag-detach 'important folder number 'always)) (elmo-msgdb-unset-flag (elmo-folder-msgdb folder) number 'important))))