From: teranisi Date: Fri, 18 Oct 2002 01:09:40 +0000 (+0000) Subject: * wl-mime.el (wl-message-delete-current-part): Check the class of mime-entity. X-Git-Tag: elmo-mark-restart~107 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=62627c732adeb3ebd72997cdbb0f00f01c962fb9;p=elisp%2Fwanderlust.git * wl-mime.el (wl-message-delete-current-part): Check the class of mime-entity. * wl-draft.el (wl-draft-reedit): Set wl-draft-parent-folder. * wl-draft.el (wl-draft-parent-number): New buffer local variable. (wl-draft-reply): Added optional argument `number'; Set wl-draft-parent-number. (wl-draft-kill): Delete answered mark if it is a reply. * elmo.el (elmo-folder-unmark-important): Follow the changes above. (elmo-folder-mark-as-important): Ditto. (elmo-folder-unmark-read): Ditto. (elmo-folder-mark-as-read): Ditto. (elmo-folder-unmark-answered): Ditto. (elmo-folder-mark-as-answered): Ditto. * elmo-msgdb.el (elmo-msgdb-set-cached): Use the term 'flag' for message status. (elmo-msgdb-mark): Likewise. (elmo-msgdb-set-flag): Renamed from elmo-msgdb-set-status. (elmo-msgdb-unset-flag): Likewise. * elmo.el (elmo-generic-folder-diff): Avoid byte-compile warning. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 9142f45..262835e 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,18 @@ 2002-10-18 Yuuichi Teranishi + * elmo.el (elmo-folder-unmark-important): Follow the changes above. + (elmo-folder-mark-as-important): Ditto. + (elmo-folder-unmark-read): Ditto. + (elmo-folder-mark-as-read): Ditto. + (elmo-folder-unmark-answered): Ditto. + (elmo-folder-mark-as-answered): Ditto. + + * elmo-msgdb.el (elmo-msgdb-set-cached): Use the term 'flag' for + message status. + (elmo-msgdb-mark): Likewise. + (elmo-msgdb-set-flag): Renamed from elmo-msgdb-set-status. + (elmo-msgdb-unset-flag): Likewise. + * elmo.el (elmo-generic-folder-diff): Avoid byte-compile warning. 2002-10-15 Hiroya Murata diff --git a/elmo/elmo-msgdb.el b/elmo/elmo-msgdb.el index ab844ab..44fab6b 100644 --- a/elmo/elmo-msgdb.el +++ b/elmo/elmo-msgdb.el @@ -124,7 +124,7 @@ if MARK is nil, mark is removed." "Set message cache status. If mark is changed, return non-nil." (let* ((cur-mark (elmo-msgdb-get-mark msgdb number)) - (cur-status (cond + (cur-flag (cond ((string= cur-mark elmo-msgdb-important-mark) 'important) ((member cur-mark (elmo-msgdb-answered-marks)) @@ -133,7 +133,7 @@ If mark is changed, return non-nil." 'read))) (cur-cached (not (member cur-mark (elmo-msgdb-uncached-marks))))) (unless (eq cached cur-cached) - (case cur-status + (case cur-flag (read (elmo-msgdb-set-mark msgdb number (unless cached @@ -150,40 +150,40 @@ If mark is changed, return non-nil." elmo-msgdb-unread-cached-mark elmo-msgdb-unread-uncached-mark))))))) -(defun elmo-msgdb-set-status (msgdb folder number status) - "Set message status. +(defun elmo-msgdb-set-flag (msgdb folder number flag) + "Set message flag. MSGDB is the ELMO msgdb. FOLDER is a ELMO folder structure. -NUMBER is a message number to be set status. -STATUS is a symbol which is one of the following: +NUMBER is a message number to set flag. +FLAG is a symbol which is one of the following: `read' ... Messages which are already read. `important' ... Messages which are marked as important. `answered' ... Messages which are marked as answered." (let* ((cur-mark (elmo-msgdb-get-mark msgdb number)) (use-cache (elmo-message-use-cache-p folder number)) - (cur-status (cond - ((string= cur-mark elmo-msgdb-important-mark) - 'important) - ((member cur-mark (elmo-msgdb-answered-marks)) - 'answered) - ((not (member cur-mark (elmo-msgdb-unread-marks))) - 'read))) + (cur-flag (cond + ((string= cur-mark elmo-msgdb-important-mark) + 'important) + ((member cur-mark (elmo-msgdb-answered-marks)) + 'answered) + ((not (member cur-mark (elmo-msgdb-unread-marks))) + 'read))) (cur-cached (not (member cur-mark (elmo-msgdb-uncached-marks)))) mark-modified) - (case status + (case flag (read - (case cur-status + (case cur-flag ((read important answered)) (t (elmo-msgdb-set-mark msgdb number (if (and use-cache (not cur-cached)) elmo-msgdb-read-uncached-mark)) (setq mark-modified t)))) (important - (unless (eq cur-status 'important) + (unless (eq cur-flag 'important) (elmo-msgdb-set-mark msgdb number elmo-msgdb-important-mark) (setq mark-modified t))) (answered - (unless (or (eq cur-status 'answered) (eq cur-status 'important)) + (unless (or (eq cur-flag 'answered) (eq cur-flag 'important)) (elmo-msgdb-set-mark msgdb number (if cur-cached (if use-cache @@ -193,40 +193,40 @@ STATUS is a symbol which is one of the following: (setq mark-modified t))) (if mark-modified (elmo-folder-set-mark-modified-internal folder t)))) -(defun elmo-msgdb-unset-status (msgdb folder number status) - "Unset message status. +(defun elmo-msgdb-unset-flag (msgdb folder number flag) + "Unset message flag. MSGDB is the ELMO msgdb. FOLDER is a ELMO folder structure. -NUMBER is a message number to be set status. -STATUS is a symbol which is one of the following: +NUMBER is a message number to be set flag. +FLAG is a symbol which is one of the following: `read' ... Messages which are already read. `important' ... Messages which are marked as important. `answered' ... Messages which are marked as answered." (let* ((cur-mark (elmo-msgdb-get-mark msgdb number)) (use-cache (elmo-message-use-cache-p folder number)) - (cur-status (cond - ((string= cur-mark elmo-msgdb-important-mark) - 'important) - ((member cur-mark (elmo-msgdb-answered-marks)) - 'answered) - ((not (member cur-mark (elmo-msgdb-unread-marks))) - 'read))) + (cur-flag (cond + ((string= cur-mark elmo-msgdb-important-mark) + 'important) + ((member cur-mark (elmo-msgdb-answered-marks)) + 'answered) + ((not (member cur-mark (elmo-msgdb-unread-marks))) + 'read))) (cur-cached (not (member cur-mark (elmo-msgdb-uncached-marks)))) mark-modified) - (case status + (case flag (read - (when (eq cur-status 'read) + (when (eq cur-flag 'read) (elmo-msgdb-set-mark msgdb number (if (and cur-cached use-cache) elmo-msgdb-unread-cached-mark elmo-msgdb-unread-uncached-mark)) (setq mark-modified t))) (important - (when (eq cur-status 'important) + (when (eq cur-flag 'important) (elmo-msgdb-set-mark msgdb number nil) (setq mark-modified t))) (answered - (when (eq cur-status 'answered) + (when (eq cur-flag 'answered) (elmo-msgdb-set-mark msgdb number (if (and cur-cached (not use-cache)) elmo-msgdb-read-uncached-mark)) @@ -593,8 +593,8 @@ header separator." (setcar (cdr entity) after)) (setq mark-alist (cdr mark-alist))))) -(defsubst elmo-msgdb-mark (status cached) - (case status +(defsubst elmo-msgdb-mark (flag cached) + (case flag (unread (if cached elmo-msgdb-unread-cached-mark diff --git a/elmo/elmo.el b/elmo/elmo.el index f729de6..42f5448 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -1158,55 +1158,55 @@ FIELD is a symbol of the field." numbers) (when (elmo-folder-msgdb-internal folder) (dolist (number numbers) - (elmo-msgdb-unset-status (elmo-folder-msgdb folder) - folder - number - 'important)))) + (elmo-msgdb-unset-flag (elmo-folder-msgdb folder) + folder + number + 'important)))) (luna-define-method elmo-folder-mark-as-important ((folder elmo-folder) numbers) (when (elmo-folder-msgdb-internal folder) (dolist (number numbers) - (elmo-msgdb-set-status (elmo-folder-msgdb folder) - folder - number - 'important)))) + (elmo-msgdb-set-flag (elmo-folder-msgdb folder) + folder + number + 'important)))) (luna-define-method elmo-folder-unmark-read ((folder elmo-folder) numbers &optional ignore-flags) (when (elmo-folder-msgdb-internal folder) (dolist (number numbers) - (elmo-msgdb-unset-status (elmo-folder-msgdb folder) - folder - number - 'read)))) + (elmo-msgdb-unset-flag (elmo-folder-msgdb folder) + folder + number + 'read)))) (luna-define-method elmo-folder-mark-as-read ((folder elmo-folder) numbers &optional ignore-flag) (when (elmo-folder-msgdb-internal folder) (dolist (number numbers) - (elmo-msgdb-set-status (elmo-folder-msgdb folder) - folder - number - 'read)))) + (elmo-msgdb-set-flag (elmo-folder-msgdb folder) + folder + number + 'read)))) (luna-define-method elmo-folder-unmark-answered ((folder elmo-folder) numbers) (when (elmo-folder-msgdb-internal folder) (dolist (number numbers) - (elmo-msgdb-unset-status (elmo-folder-msgdb folder) - folder - number - 'answered)))) + (elmo-msgdb-unset-flag (elmo-folder-msgdb folder) + folder + number + 'answered)))) (luna-define-method elmo-folder-mark-as-answered ((folder elmo-folder) numbers) (when (elmo-folder-msgdb-internal folder) (dolist (number numbers) - (elmo-msgdb-set-status (elmo-folder-msgdb folder) - folder - number - 'answered)))) + (elmo-msgdb-set-flag (elmo-folder-msgdb folder) + folder + number + 'answered)))) (luna-define-method elmo-folder-process-crosspost ((folder elmo-folder) &optional @@ -1351,7 +1351,7 @@ FIELD is a symbol of the field." "Synchronize the folder data to the newest status. FOLDER is the ELMO folder structure. If optional IGNORE-MSGDB is non-nil, current msgdb is thrown away except -read mark status. If IGNORE-MSGDB is 'visible-only, only visible messages +flag status. If IGNORE-MSGDB is 'visible-only, only visible messages \(the messages which are not in the killed-list\) are thrown away and synchronized. If NO-CHECK is non-nil, rechecking folder is skipped. diff --git a/wl/ChangeLog b/wl/ChangeLog index b23b5c6..ecc1774 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,10 @@ 2002-10-18 Yuuichi Teranishi + * wl-mime.el (wl-message-delete-current-part): Check the class of + mime-entity. + + * wl-draft.el (wl-draft-reedit): Set wl-draft-parent-folder. + * wl-summary.el (wl-summary-make-number-list): Initialize. (wl-summary-update-mark): New function. (wl-summary-reply): Put `answered' mark on the message. diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 904a411..8621bbe 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -1874,6 +1874,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (switch-to-buffer-other-frame buffer) (switch-to-buffer buffer)) (set-buffer buffer) + (setq wl-draft-parent-folder "") (insert-file-contents-as-binary file-name) (let((mime-edit-again-ignored-field-regexp "^\\(Content-.*\\|Mime-Version\\):")) diff --git a/wl/wl-mime.el b/wl/wl-mime.el index 0b2a59d..9df89f8 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -184,6 +184,8 @@ By setting following-method as yank-content." (number wl-message-buffer-cur-number) (msgid (elmo-message-field folder number 'message-id)) (orig-buf wl-message-buffer-original-buffer)) + (if (eq (luna-class-name entity) 'mime-elmo-imap-entity) + (error "Please fetch the entire message (by typing 'C-u .') and try again")) (with-current-buffer orig-buf (unless (string-equal (buffer-string)