* ew-data.el (ew-separate-eword): Remove
authorakr <akr>
Wed, 2 Sep 1998 14:02:26 +0000 (14:02 +0000)
committerakr <akr>
Wed, 2 Sep 1998 14:02:26 +0000 (14:02 +0000)
`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'.

ChangeLog
ew-data.el
ew-quote.el
ew-var.el

index 497fb2b..8bc893e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+1998-09-02  Tanaka Akira      <akr@jaist.ac.jp>
+
+       * 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      <akr@jaist.ac.jp>
 
        * TESTPAT: Add a notice about null encoded-text.
index 3a2a1f7..436b014 100644 (file)
@@ -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)))))
          (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))
index fd66130..e95bfb0 100644 (file)
@@ -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)
index 4d9a0bf..2463626 100644 (file)
--- a/ew-var.el
+++ b/ew-var.el
 ;;; 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
           (regexp-quote "?")
           "\\(" ew-token-regexp "\\)"
           (regexp-quote "?")
-          "\\(" ew-encoded-text-regexp0 "\\)"
+          "\\(" ew-encoded-text-regexp "\\)"
           (regexp-quote "?")
           "\\'"))