Merge flim-1_12_7.
[elisp/flim.git] / mime-def.el
index e479011..75375f4 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mime-def.el --- definition module about MIME
 
-;; Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc.
+;; Copyright (C) 1995,1996,1997,1998,1999 Free Software Foundation, Inc.
 
 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Keywords: definition, MIME, multimedia, mail, news
 
 ;;; Code:
 
+(require 'poe)
+(require 'poem)
+(require 'pcustom)
 (require 'mcharset)
+(require 'alist)
+
+(eval-when-compile (require 'cl))      ; list*
 
 (eval-and-compile
-  (defconst mime-library-product ["FLIM" (1 11 3) "Saidaiji"]
+  (defconst mime-library-product ["FLIM" (1 12 7) "Y\e.D\8eþzaki"]
     "Product name, version number and code name of MIME-library package.")
   )
 
 ;;; @ variables
 ;;;
 
-(require 'custom)
-
-(eval-when-compile (require 'cl))
-
-(defgroup mime nil
+(defgroup mime '((default-mime-charset custom-variable))
   "Emacs MIME Interfaces"
   :group 'news
   :group 'mail)
 
-(custom-handle-keyword 'default-mime-charset :group 'mime
-                      'custom-variable)
-
 (defcustom mime-uuencode-encoding-name-list '("x-uue" "x-uuencode")
   "*List of encoding names for uuencode format."
   :group 'mime
 ;;; @ required functions
 ;;;
 
-(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))
-
 (defsubst regexp-* (regexp)
   (concat regexp "*"))
 
@@ -93,7 +86,7 @@
   (defconst std11-non-qtext-char-list '(?\" ?\\ ?\r ?\n))
   (defconst std11-qtext-regexp
     (eval-when-compile
-      (concat "[^" (apply #'string std11-non-qtext-char-list) "]"))))
+      (concat "[^" std11-non-qtext-char-list "]"))))
 (defconst std11-quoted-string-regexp
   (eval-when-compile
     (concat "\""
 ;;; @ about MIME
 ;;;
 
-(defconst mime-tspecials "][()<>@,\;:\\\"/?=")
-(defconst mime-token-regexp (concat "[^" mime-tspecials "\000-\040]+"))
+(eval-and-compile
+  (defconst mime-tspecial-char-list
+    '(?\] ?\[ ?\( ?\) ?< ?> ?@ ?, ?\; ?: ?\\ ?\" ?/ ?? ?=)))
+(defconst mime-token-regexp
+  (eval-when-compile
+    (concat "[^" mime-tspecial-char-list "\000-\040]+")))
 (defconst mime-charset-regexp mime-token-regexp)
 
 (defconst mime-media-type/subtype-regexp
@@ -360,8 +357,6 @@ message/rfc822, `mime-entity' structures of them are included in
 ;;; @ for mm-backend
 ;;;
 
-(require 'alist)
-
 (defvar mime-entity-implementation-alist nil)
 
 (defmacro mm-define-backend (type &optional parents)
@@ -446,7 +441,7 @@ If ARGS is specified, NAME is defined as a generic function for the
 service."
   `(progn
      (add-to-list 'mel-service-list ',name)
-     (defvar ,(intern (format "%s-obarray" name)) (make-vector 1 nil))
+     (defvar ,(intern (format "%s-obarray" name)) (make-vector 7 0))
      ,@(if args
           `((defun ,name ,args
               ,@rest