From: akr Date: Wed, 2 Sep 1998 14:02:26 +0000 (+0000) Subject: * ew-data.el (ew-separate-eword): Remove X-Git-Tag: doodle-1_9_3~6 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=78d112053d1500b2fe8a166dec28a300f69ef18f;p=elisp%2Fflim.git * ew-data.el (ew-separate-eword): Remove `ew-permit-null-encoded-text' checking. * ew-quote.el (ew-quote-concat): Use `ew-encoded-word-regexp' instead of `ew-encoded-word-regexp0'. (ew-quote-sole): Ditto. * ew-var.el (ew-encoded-text-regexp): Reverted. (ew-encoded-text-regexp0): Abolished (ew-encoded-text-regexp1): Abolished (ew-encoded-word-regexp): Reverted. (ew-encoded-word-regexp0): Abolished (ew-encoded-word-regexp1): Abolished (ew-anchored-encoded-word-regexp): Use `ew-encoded-word-regexp'. (ew-type2-regexp): Use `ew-encoded-word-regexp'. --- diff --git a/ChangeLog b/ChangeLog index 497fb2b..8bc893e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +1998-09-02 Tanaka Akira + + * ew-data.el (ew-separate-eword): Remove + `ew-permit-null-encoded-text' checking. + + * ew-quote.el (ew-quote-concat): Use `ew-encoded-word-regexp' + instead of `ew-encoded-word-regexp0'. + (ew-quote-sole): Ditto. + + * ew-var.el (ew-encoded-text-regexp): Reverted. + (ew-encoded-text-regexp0): Abolished + (ew-encoded-text-regexp1): Abolished + (ew-encoded-word-regexp): Reverted. + (ew-encoded-word-regexp0): Abolished + (ew-encoded-word-regexp1): Abolished + (ew-anchored-encoded-word-regexp): Use `ew-encoded-word-regexp'. + (ew-type2-regexp): Use `ew-encoded-word-regexp'. + 1998-09-01 Tanaka Akira * TESTPAT: Add a notice about null encoded-text. diff --git a/ew-data.el b/ew-data.el index 3a2a1f7..436b014 100644 --- a/ew-data.el +++ b/ew-data.el @@ -59,9 +59,7 @@ (defun ew-separate-eword (frag1 frag2 targets) (while (not (eq frag1 frag2)) (when (and (memq (get frag1 'type) targets) - (string-match (if ew-permit-null-encoded-text - ew-encoded-word-regexp0 - ew-encoded-word-regexp1) + (string-match ew-encoded-word-regexp (symbol-name frag1)) (or (< 0 (match-beginning 0)) (< (match-end 0) (length (symbol-name frag1))))) @@ -80,10 +78,7 @@ (setq frag (cadr result))) (put frag 'prev-frag (get frag1 'prev-frag)) (put (get frag1 'prev-frag) 'next-frag frag) - (while (string-match (if ew-permit-null-encoded-text - ew-encoded-word-regexp0 - ew-encoded-word-regexp1) - atom start) + (while (string-match ew-encoded-word-regexp atom start) (when (< start (match-beginning 0)) (setq frag (make-symbol (substring atom start (match-beginning 0))) result (ew-rcons* result frag)) diff --git a/ew-quote.el b/ew-quote.el index fd66130..e95bfb0 100644 --- a/ew-quote.el +++ b/ew-quote.el @@ -43,7 +43,7 @@ (while tmp (setq str (car tmp) start 0) - (while (string-match ew-encoded-word-regexp0 str start) + (while (string-match ew-encoded-word-regexp str start) (setq eword-start (match-beginning 0) charset-start (match-beginning 1) eword-end (match-end 0)) @@ -92,7 +92,7 @@ (defun ew-quote-sole (str gen-type2) (let (result (start 0) charset-start quoting-end eword-end l) - (while (string-match ew-encoded-word-regexp0 str start) + (while (string-match ew-encoded-word-regexp str start) (setq charset-start (match-beginning 1) eword-end (match-end 0)) (string-match ew-quoting-chars-regexp str charset-start) diff --git a/ew-var.el b/ew-var.el index 4d9a0bf..2463626 100644 --- a/ew-var.el +++ b/ew-var.el @@ -123,29 +123,19 @@ ;;; constants. (defconst ew-token-regexp "[-!#-'*+0-9A-Z^-~]+") -(defconst ew-encoded-text-regexp0 "[!->@-~]*") -(defconst ew-encoded-text-regexp1 "[!->@-~]+") +(defconst ew-encoded-text-regexp "[!->@-~]*") -(defconst ew-encoded-word-regexp0 +(defconst ew-encoded-word-regexp (concat (regexp-quote "=?") "\\(" ew-token-regexp "\\)" (regexp-quote "?") "\\(" ew-token-regexp "\\)" (regexp-quote "?") - "\\(" ew-encoded-text-regexp0 "\\)" - (regexp-quote "?="))) - -(defconst ew-encoded-word-regexp1 - (concat (regexp-quote "=?") - "\\(" ew-token-regexp "\\)" - (regexp-quote "?") - "\\(" ew-token-regexp "\\)" - (regexp-quote "?") - "\\(" ew-encoded-text-regexp1 "\\)" + "\\(" ew-encoded-text-regexp "\\)" (regexp-quote "?="))) (defconst ew-anchored-encoded-word-regexp - (concat "\\`" ew-encoded-word-regexp0 "\\'")) + (concat "\\`" ew-encoded-word-regexp "\\'")) (defconst ew-b-regexp (eval-when-compile @@ -175,7 +165,7 @@ (regexp-quote "?") "\\(" ew-token-regexp "\\)" (regexp-quote "?") - "\\(" ew-encoded-text-regexp0 "\\)" + "\\(" ew-encoded-text-regexp "\\)" (regexp-quote "?") "\\'"))