tm 7.24.
[elisp/tm.git] / tm-edit.el
index 5aee31a..3e18008 100644 (file)
 ;; LCD Archive Entry:
 ;; mime|Masanobu UMEDA|umerin@mse.kyutech.ac.jp|
 ;; Simple MIME Composer|
-;; $Date: 1995/11/11 12:48:30 $|$Revision: 7.23 $|~/misc/mime.el.Z|
+;; $Date: 1995/11/14 05:04:22 $|$Revision: 7.24 $|~/misc/mime.el.Z|
 
 ;;; Code:
 
 ;;;
 
 (defconst mime-editor/RCS-ID
-  "$Id: tm-edit.el,v 7.23 1995/11/11 12:48:30 morioka Exp $")
+  "$Id: tm-edit.el,v 7.24 1995/11/14 05:04:22 morioka Exp $")
 
 (defconst mime-editor/version (get-version-string mime-editor/RCS-ID))
 
@@ -221,8 +221,12 @@ To insert a signature file specified by mime-signature-file
        ("site" "ftp.jaist.ac.jp" "wnoc-fuk.wide.ad.jp" "nic.karrn.ad.jp")
        ("directory" "/pub/GNU/elisp/mime")
        ("name")
-       ("mode" "binary" "ascii"))
-       ("ftp" ("site") ("directory") ("name") ("mode" "binary" "ascii"))
+       ("mode" "image" "ascii" "local8"))
+       ("ftp"
+       ("site")
+       ("directory")
+       ("name")
+       ("mode" "image" "ascii" "local8"))
        ("tftp"        ("site") ("name"))
        ("afs"         ("site") ("name"))
        ("local-file"  ("site") ("name"))
@@ -300,8 +304,14 @@ If encoding is nil, it is determined from its contents.")
 ;;; @@ about message inserting
 ;;;
 
-(defvar mime-editor/yank-ignored-fields-regexp
-  "^\\(Received\\|X-UIDL\\|Sender\\|Approved\\|Path\\):")
+(defvar mime-editor/yank-ignored-field-list
+  '("Received" "Sender" "Approved" "Path" "Status" "X-VM-.*" "X-UIDL")
+  "Delete these fields from original message when it is inserted
+as message/rfc822 part.
+Each elements are regexp of field-name. [tm-edit.el]")
+
+(defvar mime-editor/yank-ignored-field-regexp
+  (apply (function regexp-or) mime-editor/yank-ignored-field-list))
 
 (defvar mime-editor/message-inserter-alist nil)
 (defvar mime-editor/mail-inserter-alist nil)
@@ -316,10 +326,10 @@ If encoding is nil, it is determined from its contents.")
 (defvar mime-editor/message-max-length-alist
   '((news-reply-mode . 500)))
 
-(defconst mime-editor/split-ignored-fields-regexp
+(defconst mime-editor/split-ignored-field-regexp
   "\\(^Content-\\|^Subject:\\|^Mime-Version:\\)")
 
-(defvar mime-editor/split-blind-fields-regexp
+(defvar mime-editor/split-blind-field-regexp
   "\\(^[BDFbdf]cc:\\|^cc:[ \t]*$\\)")
 
 (defvar mime-editor/message-default-sender-alist
@@ -1729,7 +1739,7 @@ a recording host instead of local host."
          )
        (goto-char header-start)
        (while (and (re-search-forward
-                    mime-editor/yank-ignored-fields-regexp nil t)
+                    mime-editor/yank-ignored-field-regexp nil t)
                    (setq beg (match-beginning 0))
                    (setq end (1+ (rfc822/field-end)))
                    )
@@ -1959,7 +1969,7 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n"
                           "@" (system-name) "\"")))
          (run-hooks 'mime-editor/before-split-hook)
          (let* ((header (rfc822/get-header-string-except
-                         mime-editor/split-ignored-fields-regexp separator))
+                         mime-editor/split-ignored-field-regexp separator))
                 (subject (mail-fetch-field "subject"))
                 (total (+ (/ lines mime-editor/message-max-length)
                           (if (> (mod lines mime-editor/message-max-length) 0)
@@ -2019,7 +2029,7 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n"
                     ))
                  (goto-char (point-min))
                  (while (re-search-forward
-                         mime-editor/split-blind-fields-regexp nil t)
+                         mime-editor/split-blind-field-regexp nil t)
                    (delete-region (match-beginning 0)
                                   (let ((e (rfc822/field-end)))
                                     (if (< e (point-max))