number)
:group 'elmo)
-(defcustom modb-standard-economize-entity-size nil
+(defcustom modb-standard-economize-entity-size t
"*Economize message entity size.
When non-nil, redundunt message-id string are not saved."
:type 'boolean
(defun modb-standard-load-entity (modb path &optional section)
(let ((table (or (modb-standard-entity-map-internal modb)
(elmo-make-hash (elmo-msgdb-length modb))))
- (inhibit-quit t)
number msgid)
(dolist (entity (elmo-object-load
(expand-file-name
(= section (/ number modb-standard-divide-number)))
(setq entity (elmo-msgdb-message-entity modb number)))
(when modb-standard-economize-entity-size
- (when (stringp (car entity)) (setcar entity t)))
+ (when (stringp (car entity))
+ (setq entity (cons t (cdr entity)))))
(setq entities (cons entity entities))))
(if entities
(elmo-object-save filename entities)
t)))
(luna-define-method elmo-msgdb-save ((msgdb modb-standard))
- (let ((path (elmo-msgdb-location msgdb)))
+ (let ((path (elmo-msgdb-location msgdb))
+ (inhibit-quit t))
(when (elmo-msgdb-message-modified-p msgdb)
(modb-standard-save-msgid msgdb path)
(modb-standard-save-entity msgdb path)
new-flags diff)
(unless (memq flag cur-flags)
(setq new-flags (cons flag cur-flags))
- (setq diff (elmo-list-diff new-flags cur-flags))
+ (setq diff (elmo-list-diff-nonsortable new-flags cur-flags))
(modb-standard-countup-flags msgdb (car diff))
(modb-standard-countup-flags msgdb (cadr diff) -1)
(elmo-set-hash-val (modb-standard-key number)
(modb-standard-flag-map msgdb)))
(t
(let ((cur-flags (modb-standard-message-flags msgdb number))
+ (inhibit-quit t)
new-flags diff)
(when (memq flag cur-flags)
(setq new-flags (delq flag (copy-sequence cur-flags)))
- (setq diff (elmo-list-diff new-flags cur-flags))
+ (setq diff (elmo-list-diff-nonsortable new-flags cur-flags))
(modb-standard-countup-flags msgdb (car diff))
(modb-standard-countup-flags msgdb (cadr diff) -1)
(elmo-set-hash-val (modb-standard-key number)
(modb-standard-set-flag-modified msgdb number))
duplicate))))
+(luna-define-method elmo-msgdb-update-entity ((msgdb modb-standard)
+ entity values)
+ (let ((handler (elmo-message-entity-handler entity)))
+ (when (elmo-msgdb-message-entity-update-fields handler entity values)
+ (modb-standard-set-message-modified
+ msgdb
+ (elmo-msgdb-message-entity-number handler entity))
+ t)))
+
(luna-define-method elmo-msgdb-delete-messages ((msgdb modb-standard)
numbers)
(let ((number-list (modb-standard-number-list-internal msgdb))
(defun modb-standard-message-entity (msgdb key load)
(let ((ret (elmo-get-hash-val
key
- (modb-standard-entity-map-internal msgdb))))
+ (modb-standard-entity-map-internal msgdb)))
+ (inhibit-quit t))
(if (eq 'autoload (car-safe ret))
(when (and load modb-standard-divide-number)
(modb-standard-load-entity