From d7dabe3231e4c71cba239f14e1d0b1e2807a1e23 Mon Sep 17 00:00:00 2001 From: morioka Date: Tue, 3 Sep 1996 09:49:49 +0000 Subject: [PATCH] (std11-spaces-regexp): don't require top of line. (std11-analyze-spaces): check match-beginning is 0 or not. --- std11-parse.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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) -- 1.7.10.4