* wl-mime.el (wl-message-delete-current-part): Check the class of mime-entity.
authorteranisi <teranisi>
Fri, 18 Oct 2002 01:09:40 +0000 (01:09 +0000)
committerteranisi <teranisi>
Fri, 18 Oct 2002 01:09:40 +0000 (01:09 +0000)
* 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.

elmo/ChangeLog
elmo/elmo-msgdb.el
elmo/elmo.el
wl/ChangeLog
wl/wl-draft.el
wl/wl-mime.el

index 9142f45..262835e 100644 (file)
@@ -1,5 +1,18 @@
 2002-10-18  Yuuichi Teranishi  <teranisi@gohome.org>
 
+       * 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  <lapis-lazuli@pop06.odn.ne.jp>
index ab844ab..44fab6b 100644 (file)
@@ -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
index f729de6..42f5448 100644 (file)
@@ -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.
index b23b5c6..ecc1774 100644 (file)
@@ -1,5 +1,10 @@
 2002-10-18  Yuuichi Teranishi  <teranisi@gohome.org>
 
+       * 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.
index 904a411..8621bbe 100644 (file)
@@ -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\\):"))
index 0b2a59d..9df89f8 100644 (file)
@@ -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)