(std11-parse-ascii-token): Use function
[elisp/mu-cite.git] / std11-parse.el
index 35d5e7f..681b8a0 100644 (file)
@@ -4,7 +4,8 @@
 
 ;; Author:   MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Keywords: mail, news, RFC 822, STD 11
-;; Version: $Id: std11-parse.el,v 0.9 1996-08-28 20:34:53 morioka Exp $
+;; Version:
+;;     $Id: std11-parse.el,v 0.13 1996-10-01 13:29:39 morioka Exp $
 
 ;; This file is part of tl (Tiny Library).
 
 ;;; 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)
     (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)