Require 'wid-edit when compile.
[elisp/apel.git] / std11-parse.el
index 0c6ae32..9139530 100644 (file)
@@ -4,7 +4,7 @@
 
 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Keywords: mail, news, RFC 822, STD 11
-;; Version: $Id: std11-parse.el,v 0.17 1997-09-25 15:01:24 morioka Exp $
+;; Version: $Id: std11-parse.el,v 1.1 1998-02-04 07:21:11 morioka Exp $
 
 ;; This file is part of MU (Message Utilities).
 
 
 (defconst std11-space-chars " \t\n")
 (defconst std11-spaces-regexp (` (, (concat "[" std11-space-chars "]+"))))
-(defconst std11-special-char-list '(?\( ?\) ?< ?> ?@
+(defconst std11-special-char-list '(?\] ?\[
+                                       ?\( ?\) ?< ?> ?@
                                        ?, ?\; ?: ?\\ ?\"
-                                       ?. ?\[ ?\]))
+                                       ?.))
 (defconst std11-atom-regexp
   (` (, (concat "^[^" std11-special-char-list std11-space-chars "]+"))))
 
          (nreverse dest)
          ))))
 
+(defun std11-parse-msg-id (lal)
+  (let ((ret (std11-parse-ascii-token lal))
+       < addr-spec >)
+    (if (and ret
+            (setq < (car ret))
+            (string-equal (cdr (assq 'specials <)) "<")
+            (setq lal (cdr ret))
+            (setq ret (std11-parse-addr-spec lal))
+            (setq addr-spec (car ret))
+            (setq lal (cdr ret))
+            (setq ret (std11-parse-ascii-token lal))
+            (setq > (car ret))
+            (string-equal (cdr (assq 'specials >)) ">")
+            )
+       (cons (cons 'msg-id (cdr addr-spec))
+             (cdr ret))
+      )))
+
 
 ;;; @ end
 ;;;