X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=elmo%2Fmodb-standard.el;h=46e4b6179157d155be6439e192e1277df84f985d;hb=6444631eeac4bef1933e27202080f62ac536aada;hp=7e15c40d9f8c4a8a46022d2d7ea545ffdc88b463;hpb=eb1bd98710dbe66327aa60465f64e85cadd30c9b;p=elisp%2Fwanderlust.git diff --git a/elmo/modb-standard.el b/elmo/modb-standard.el index 7e15c40..46e4b61 100644 --- a/elmo/modb-standard.el +++ b/elmo/modb-standard.el @@ -40,7 +40,7 @@ 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 @@ -196,7 +196,6 @@ When non-nil, redundunt message-id string are not saved." (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 @@ -222,7 +221,8 @@ When non-nil, redundunt message-id string are not saved." (= 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) @@ -249,7 +249,8 @@ When non-nil, redundunt message-id string are not saved." 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) @@ -326,7 +327,7 @@ When non-nil, redundunt message-id string are not saved." 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) @@ -349,10 +350,11 @@ When non-nil, redundunt message-id string are not saved." (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) @@ -474,6 +476,15 @@ When non-nil, redundunt message-id string are not saved." (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)) @@ -520,7 +531,8 @@ When non-nil, redundunt message-id string are not saved." (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