(eword-decode-header): New implementation; add new argument
[elisp/semi.git] / mime-edit.el
index e23f1a6..439707a 100644 (file)
@@ -7,7 +7,7 @@
 ;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Created: 1994/08/21 renamed from mime.el
 ;;     Renamed: 1997/2/21 from tm-edit.el
-;; Version: $Revision: 0.98 $
+;; Version: $Revision: 0.100 $
 ;; Keywords: MIME, multimedia, multilingual, mail, news
 
 ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
 ;;;
 
 (defconst mime-edit-RCS-ID
-  "$Id: mime-edit.el,v 0.98 1997-11-15 14:38:09 morioka Exp $")
+  "$Id: mime-edit.el,v 0.100 1998-02-06 00:39:23 morioka Exp $")
 
 (defconst mime-edit-version `,(get-version-string mime-edit-RCS-ID))
 
@@ -983,7 +983,7 @@ Charset is automatically obtained from the `charsets-mime-charset-alist'."
                 )
            (enriched-mode t)
          (if (boundp 'enriched-mode)
-             (enriched-mode nil)
+             (enriched-mode -1)
            ))))))
 
 (defun mime-edit-insert-file (file &optional verbose)
@@ -2021,18 +2021,19 @@ Content-Transfer-Encoding: 7bit
              (save-restriction
                (narrow-to-region beg (mime-edit-content-end))
                (goto-char beg)
-               (if (re-search-forward "^From " nil t)
-                   (unless encoding
-                     (if (memq charset '(iso-2022-jp
-                                         iso-2022-jp-2
-                                         iso-2022-int-1
-                                         x-ctext))
-                         (while (progn
-                                  (replace-match "\e(BFrom ")
-                                  (re-search-forward "^From " nil t)
-                                  ))
-                       (setq encoding "quoted-printable")
-                       ))))
+               (let (case-fold-search)
+                 (if (re-search-forward "^From " nil t)
+                     (unless encoding
+                       (if (memq charset '(iso-2022-jp
+                                           iso-2022-jp-2
+                                           iso-2022-int-1
+                                           x-ctext))
+                           (while (progn
+                                    (replace-match "\e(BFrom ")
+                                    (re-search-forward "^From " nil t)
+                                    ))
+                         (setq encoding "quoted-printable")
+                         )))))
              ;; canonicalize line break code
              (or (member encoding '(nil "7bit" "8bit" "quoted-printable"))
                  (save-restriction