+2003-11-03 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * 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 <lapis-lazuli@pop06.odn.ne.jp>
* elsp-spamfilter.el (elsp-spamfilter-decode-buffer): Renamed from
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)
;; (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))
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)
(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)))))))