From: morioka Date: Thu, 25 Sep 1997 15:01:24 +0000 (+0000) Subject: (std11-special-char-list): New constant; abolish X-Git-Tag: XEmacs-20_3-b27-viet~2 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b95fcc949d6bc2d8c865cdccbf6974a4001654ab;p=elisp%2Fapel.git (std11-special-char-list): New constant; abolish `std11-special-chars'. (std11-atom-regexp): Use it. (std11-analyze-special): Use it; Don't use `find'. --- diff --git a/std11-parse.el b/std11-parse.el index 608b600..0c6ae32 100644 --- a/std11-parse.el +++ b/std11-parse.el @@ -1,11 +1,10 @@ ;;; std11-parse.el --- STD 11 parser for GNU Emacs -;; Copyright (C) 1995,1996 Free Software Foundation, Inc. +;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko ;; Keywords: mail, news, RFC 822, STD 11 -;; Version: -;; $Id: std11-parse.el,v 0.16 1997-07-13 17:58:15 morioka Exp $ +;; Version: $Id: std11-parse.el,v 0.17 1997-09-25 15:01:24 morioka Exp $ ;; This file is part of MU (Message Utilities). @@ -34,10 +33,12 @@ ;;; (defconst std11-space-chars " \t\n") -(defconst std11-spaces-regexp (concat "[" std11-space-chars "]+")) -(defconst std11-special-chars "][()<>@,;:\\<>.\"") +(defconst std11-spaces-regexp (` (, (concat "[" std11-space-chars "]+")))) +(defconst std11-special-char-list '(?\( ?\) ?< ?> ?@ + ?, ?\; ?: ?\\ ?\" + ?. ?\[ ?\])) (defconst std11-atom-regexp - (concat "^[^" std11-special-chars std11-space-chars "]+")) + (` (, (concat "^[^" std11-special-char-list std11-space-chars "]+")))) (defun std11-analyze-spaces (string) (if (and (string-match std11-spaces-regexp string) @@ -49,8 +50,7 @@ (defun std11-analyze-special (str) (if (and (> (length str) 0) - (find (aref str 0) std11-special-chars) - ) + (memq (aref str 0) std11-special-char-list)) (cons (cons 'specials (substring str 0 1)) (substring str 1) )))