From: hmurata Date: Wed, 24 Sep 2003 05:02:56 +0000 (+0000) Subject: * elmo.el (elmo-message-entity-number, X-Git-Tag: wl-2_11_18~9 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=15584a2bfa1f523df1d8f689642ab36e8873a7ca;p=elisp%2Fwanderlust.git * elmo.el (elmo-message-entity-number, elmo-message-entity-set-number, elmo-message-entity-field, elmo-message-entity-set-field): Moved to elmo-msgdb.el. * elmo-msgdb.el (elmo-message-entity-number, elmo-message-entity-set-number, elmo-message-entity-field, elmo-message-entity-set-field): Moved from elmo.el. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 7565358..bd7dfcb 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,15 @@ +2003-09-24 Hiroya Murata + + * elmo.el (elmo-message-entity-number, + elmo-message-entity-set-number, + elmo-message-entity-field, + elmo-message-entity-set-field): Moved to elmo-msgdb.el. + + * elmo-msgdb.el (elmo-message-entity-number, + elmo-message-entity-set-number, + elmo-message-entity-field, + elmo-message-entity-set-field): Moved from elmo.el. + 2003-09-24 Yuuichi Teranishi * elmo.el (toplevel): Changed definition orders. diff --git a/elmo/elmo-msgdb.el b/elmo/elmo-msgdb.el index d044099..5738329 100644 --- a/elmo/elmo-msgdb.el +++ b/elmo/elmo-msgdb.el @@ -42,7 +42,7 @@ ;;; MSGDB interface. ;; ;; MSGDB elmo-load-msgdb PATH - +;; MSGDB elmo-make-msgdb LOCATION TYPE ;; elmo-msgdb-sort-by-date MSGDB ;; elmo-flag-table-load @@ -71,14 +71,38 @@ ;; elmo-crosspost-alist-load ;; elmo-crosspost-alist-save -;; elmo-msgdb-create-overview-from-buffer NUMBER SIZE TIME -;; elmo-msgdb-create-overview-entity-from-file NUMBER FILE - ;; elmo-folder-get-info ;; elmo-folder-get-info-max ;; elmo-folder-get-info-length ;; elmo-folder-get-info-unread +;;; message entity wrappers +;; +(defsubst elmo-message-entity-number (entity) + (elmo-msgdb-message-entity-number (elmo-message-entity-handler entity) + entity)) + +(defsubst elmo-message-entity-set-number (entity number) + (elmo-msgdb-message-entity-set-number (elmo-message-entity-handler entity) + entity + number)) + +(defsubst elmo-message-entity-field (entity field &optional decode) + "Get message entity field value. +ENTITY is the message entity structure obtained by `elmo-message-entity'. +FIELD is the symbol of the field name. +if optional DECODE is non-nil, returned value is decoded." + (elmo-msgdb-message-entity-field (elmo-message-entity-handler entity) + entity field decode)) + +(defsubst elmo-message-entity-set-field (entity field value) + "Set message entity field value. +ENTITY is the message entity structure. +FIELD is the symbol of the field name. +VALUE is the field value (raw)." + (elmo-msgdb-message-entity-set-field (elmo-message-entity-handler entity) + entity field value)) + (defconst elmo-msgdb-load-priorities '(legacy standard) "Priority list of modb type for load.") @@ -123,7 +147,6 @@ (elmo-message-entity-field y 'date))) (error))))) - (defsubst elmo-msgdb-get-parent-entity (entity msgdb) (setq entity (elmo-message-entity-field entity 'references)) ;; entity is parent-id. diff --git a/elmo/elmo.el b/elmo/elmo.el index 5b38ed1..17ee59c 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -455,15 +455,6 @@ Return newly created temporary directory name which contains temporary files.") (luna-define-generic elmo-message-file-p (folder number) "Return t if message in the FOLDER with NUMBER is a file.") -(defmacro elmo-message-entity-number (entity) - `(elmo-msgdb-message-entity-number (elmo-message-entity-handler ,entity) - ,entity)) - -(defmacro elmo-message-entity-set-number (entity number) - `(elmo-msgdb-message-entity-set-number (elmo-message-entity-handler ,entity) - ,entity - ,number)) - (luna-define-generic elmo-message-flags (folder number) "Return a list of flags. FOLDER is a ELMO folder structure. @@ -1137,24 +1128,6 @@ ENTITY is the message-entity to get the parent.") `(dolist (,(car spec) (elmo-folder-list-message-entities ,(car (cdr spec)))) ,@form)) -(defun elmo-message-entity-field (entity field &optional decode) - "Get message entity field value. -ENTITY is the message entity structure obtained by `elmo-message-entity'. -FIELD is the symbol of the field name. -if optional DECODE is non-nil, returned value is decoded." - (elmo-msgdb-message-entity-field - (elmo-message-entity-handler entity) - entity field decode)) - -(defun elmo-message-entity-set-field (entity field value) - "Set message entity field value. -ENTITY is the message entity structure. -FIELD is the symbol of the field name. -VALUE is the field value (raw)." - (elmo-msgdb-message-entity-set-field - (elmo-message-entity-handler entity) - entity field value)) - (luna-define-generic elmo-folder-count-flags (folder) "Count flagged message number in the msgdb of the FOLDER. Return a list of numbers (`new' `unread' `answered')")