(mime-store-message/partial-piece): Don't move to point-min.
[elisp/semi.git] / mime-edit.el
index 873c5bf..57c1de9 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mime-edit.el --- Simple MIME Composer for GNU Emacs
 
-;; Copyright (C) 1993,1994,1995,1996,1997,1998 Free Software Foundation, Inc.
+;; Copyright (C) 1993,94,95,96,97,98,99 Free Software Foundation, Inc.
 
 ;; Author: UMEDA Masanobu <umerin@mse.kyutech.ac.jp>
 ;;         MORIOKA Tomohiko <morioka@jaist.ac.jp>
 
 (eval-and-compile
   (defconst mime-edit-version
-    (eval-when-compile
-      (concat
-       (mime-product-name mime-user-interface-product) " "
-       (mapconcat #'number-to-string
-                 (mime-product-version mime-user-interface-product) ".")
-       " - \"" (mime-product-code-name mime-user-interface-product) "\"")))
-  )
+    (concat
+     (mime-product-name mime-user-interface-product) " "
+     (mapconcat #'number-to-string
+               (mime-product-version mime-user-interface-product) ".")
+     " - \"" (mime-product-code-name mime-user-interface-product) "\"")))
 
 
 ;;; @ variables
@@ -633,6 +631,12 @@ If it is not specified for a major-mode,
                          (concat "/"
                                  (substring emacs-version 0
                                             (match-beginning 0))
+                                 (if (and (boundp 'xemacs-betaname)
+                                          ;; It does not exist in XEmacs
+                                          ;; versions prior to 20.3.
+                                          xemacs-betaname)
+                                     (concat " " xemacs-betaname)
+                                   "")
                                  " (" xemacs-codename ") ("
                                  system-configuration ")")
                        " (" emacs-version ")"))
@@ -2589,6 +2593,12 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n"
          "\\):")
   "Regexp for deleted header fields when `mime-edit-again' is called.")
 
+(defsubst eliminate-top-spaces (string)
+  "Eliminate top sequence of space or tab in STRING."
+  (if (string-match "^[ \t]+" string)
+      (substring string (match-end 0))
+    string))
+
 (defun mime-edit-decode-multipart-in-buffer (content-type not-decode-text)
   (let* ((subtype (mime-content-type-subtype content-type))
         (boundary (mime-content-type-parameter content-type "boundary"))
@@ -2669,7 +2679,7 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n"
           "^Content-Transfer-Encoding:" limit t)
          (let ((beg (match-beginning 0))
                (hbeg (match-end 0))
-               (end (std11-field-end)))
+               (end (std11-field-end limit)))
            (setq encoding
                  (downcase
                   (eliminate-top-spaces