(mime-decode-text-body): Change interface; call
[elisp/semi.git] / mailcap.el
index 3bc3207..32aa278 100644 (file)
 
 (defsubst mailcap-look-at-type-field ()
   (let ((type (mailcap-look-at-token)))
-    (if (and type 
-            (eq (char-after (point)) ?/)
-            )
-       (progn
-         (forward-char)
-         (let ((subtype (mailcap-look-at-token)))
-           (if subtype
-               (cons (cons 'type type)
-                     (unless (string= subtype "*")
-                       (list (cons 'subtype subtype))
-                       ))))))))
+    (if type
+       (if (eq (char-after (point)) ?/)
+           (progn
+             (forward-char)
+             (let ((subtype (mailcap-look-at-token)))
+               (if subtype
+                   (cons (cons 'type (intern type))
+                         (unless (string= subtype "*")
+                           (list (cons 'subtype (intern subtype)))
+                           )))))
+         (list (cons 'type (intern type)))
+         ))))
 
 
 ;;; @ field separator
 (defsubst mailcap-look-at-field ()
   (let ((token (mailcap-look-at-token)))
     (if token
-       (if (eq (char-after (point)) ?=)
+       (if (looking-at "[ \t]*=[ \t]*")
            (let ((value (progn
-                          (forward-char)
+                          (goto-char (match-end 0))
                           (mailcap-look-at-mtext))))
              (if value
-                 (cons token value)
+                 (cons (intern token) value)
                ))
-         (list token)
+         (list (intern token))
          ))))