From 2297be5e17f5b0949d5332e5df74f24f5d65e681 Mon Sep 17 00:00:00 2001 From: hmurata Date: Sat, 5 Apr 2003 04:45:27 +0000 Subject: [PATCH] * elmo-msgdb.el (elmo-msgdb-message-entity-field): Don't use self recursive call (can't byte compile on emacs 20.7). --- elmo/ChangeLog | 5 +++++ elmo/elmo-msgdb.el | 27 ++++++++++++++------------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 300b089..0919f2c 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2003-04-05 Hiroya Murata + + * elmo-msgdb.el (elmo-msgdb-message-entity-field): Don't use self + recursive call (can't byte compile on emacs 20.7). + 2003-04-02 Yuuichi Teranishi * elmo.el (elmo-folder-list-messages): Redefine as a luna method. diff --git a/elmo/elmo-msgdb.el b/elmo/elmo-msgdb.el index 0a7e183..0e000d9 100644 --- a/elmo/elmo-msgdb.el +++ b/elmo/elmo-msgdb.el @@ -978,19 +978,20 @@ Return CONDITION itself if no entity exists in msgdb." (defsubst elmo-msgdb-message-entity-field (entity field &optional decode) (and entity - (if (not decode) - (case field - (to (aref (cdr entity) 5)) - (cc (aref (cdr entity) 6)) - (date (aref (cdr entity) 4)) - (subject (aref (cdr entity) 3)) - (from (aref (cdr entity) 2)) - (message-id (car entity)) - (references (aref (cdr entity) 1)) - (size (aref (cdr entity) 7)) - (t (cdr (assoc (symbol-name field) (aref (cdr entity) 8))))) - (elmo-msgdb-get-decoded-cache - (elmo-msgdb-message-entity-field entity field))))) + (let ((field-value + (case field + (to (aref (cdr entity) 5)) + (cc (aref (cdr entity) 6)) + (date (aref (cdr entity) 4)) + (subject (aref (cdr entity) 3)) + (from (aref (cdr entity) 2)) + (message-id (car entity)) + (references (aref (cdr entity) 1)) + (size (aref (cdr entity) 7)) + (t (cdr (assoc (symbol-name field) (aref (cdr entity) 8))))))) + (if decode + (elmo-msgdb-get-decoded-cache field-value) + field-value)))) (defsubst elmo-msgdb-message-entity-set-field (entity field value) (and entity -- 1.7.10.4