From: morioka Date: Tue, 3 Sep 1996 09:49:49 +0000 (+0000) Subject: (std11-spaces-regexp): don't require top of line. X-Git-Tag: XEmacs-20_3-b27-viet~23 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=2219b3c2316cfd7ac0be9021c7c0d9bad8e5957c;p=elisp%2Fmu-cite.git (std11-spaces-regexp): don't require top of line. (std11-analyze-spaces): check match-beginning is 0 or not. --- diff --git a/std11-parse.el b/std11-parse.el index 443373a..7ac5387 100644 --- a/std11-parse.el +++ b/std11-parse.el @@ -4,7 +4,8 @@ ;; Author: MORIOKA Tomohiko ;; Keywords: mail, news, RFC 822, STD 11 -;; Version: $Id: std11-parse.el,v 0.11 1996-08-28 20:54:03 morioka Exp $ +;; Version: +;; $Id: std11-parse.el,v 0.12 1996-09-03 09:49:49 morioka Exp $ ;; This file is part of tl (Tiny Library). @@ -34,16 +35,17 @@ ;;; (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)