(install-apel): Use `compile-apel'.
[elisp/apel.git] / std11-parse.el
index 597e444..10912b0 100644 (file)
@@ -2,11 +2,12 @@
 
 ;; Copyright (C) 1995,1996 Free Software Foundation, Inc.
 
-;; Author:   MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Keywords: mail, news, RFC 822, STD 11
-;; Version: $Id: std11-parse.el,v 0.10 1996-08-28 20:40:29 morioka Exp $
+;; Version:
+;;     $Id: std11-parse.el,v 0.15 1996-11-28 19:38:27 morioka Exp $
 
-;; This file is part of tl (Tiny Library).
+;; This file is part of MU (Message Utilities).
 
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
 ;; General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with This program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
 ;;; Code:
 
 (require 'std11)
-
-(autoload 'find-charset-string "emu")
+(require 'emu)
 
 
 ;;; @ lexical analyze
 ;;;
 
 (defconst std11-space-chars " \t\n")
-(defconst std11-spaces-regexp (concat "^[" std11-space-chars "]+"))
+(defconst std11-spaces-regexp (concat "[" std11-space-chars "]+"))
 (defconst std11-special-chars "][()<>@,;:\\<>.\"")
 (defconst std11-atom-regexp
   (concat "^[^" std11-special-chars std11-space-chars "]+"))
 
-(defun std11-analyze-spaces (str)
-  (if (string-match std11-spaces-regexp str)
+(defun std11-analyze-spaces (string)
+  (if (and (string-match std11-spaces-regexp string)
+          (= (match-beginning 0) 0))
       (let ((end (match-end 0)))
-       (cons (cons 'spaces (substring str 0 end))
-             (substring str end)
+       (cons (cons 'spaces (substring string 0 end))
+             (substring string end)
              ))))
 
 (defun std11-analyze-special (str)
@@ -67,7 +68,7 @@
        )
     (if (and (> len i)
             (eq (aref str i) open))
-       (let (p chr dest)
+       (let (p chr)
          (setq i (1+ i))
          (catch 'tag
            (while (< i len)
     (while (and lal
                (setq token (car lal))
                (if (and (setq token-value (cdr token))
-                        (find-charset-string token-value)
+                        (find-non-ascii-charset-string token-value)
                         )
                    (setq token nil)
                  (std11-ignored-token-p token)
          ))))
 
 
-;;; @ utilities
-;;;
-
-(defun std11-parse-address-string (string)
-  "Parse STRING as mail address. [std11-parse.el]"
-  (std11-parse-address (std11-lexical-analyze string))
-  )
-
-
 ;;; @ end
 ;;;