From: akr Date: Wed, 26 May 1999 19:25:14 +0000 (+0000) Subject: * TESTPAT: Does not treat =?= as encoded-word. X-Git-Tag: doodle-1_12_6~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7cbdb8bc866c199a7e2a2e60334958dd01f9eb3c;p=elisp%2Fflim.git * TESTPAT: Does not treat =?= as encoded-word. * ew-unit.el (ew-eword-p): Use `ew-anchored-encoded-word-regexp' to test. --- diff --git a/ChangeLog b/ChangeLog index a3aa30d..25b8337 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-05-26 Tanaka Akira + + * TESTPAT: Does not treat =?= as encoded-word. + + * ew-unit.el (ew-eword-p): Use `ew-anchored-encoded-word-regexp' to + test. + 1999-05-24 Tanaka Akira * TESTPAT-DOODLE: New file. diff --git a/TESTPAT b/TESTPAT index b6be58d..107ea08 100644 --- a/TESTPAT +++ b/TESTPAT @@ -598,7 +598,7 @@ ignore-76bytes-limit) (decode "Subject: =?ISO-2022-JP?B?GyRCJCIbKEI=?= =?= =?ISO-2022-JP?B?GyRCJCIbKEI=?=" -"Subject: あ=?=あ") +"Subject: あ =?= あ") ;;; Section 5: Encoding proper inputs. diff --git a/ew-unit.el b/ew-unit.el index e780853..44f37c9 100644 --- a/ew-unit.el +++ b/ew-unit.el @@ -9,13 +9,9 @@ (defun ew-q-check (encoding encoded-text) (string-match ew-q-regexp encoded-text)) (defsubst ew-eword-p (str) - (let ((len (length str))) - (and - (<= 3 len) - (eq (aref str 0) ?=) - (eq (aref str 1) ??) - (eq (aref str (- len 2)) ??) - (eq (aref str (1- len)) ?=)))) + (and (string-match ew-anchored-encoded-word-regexp str) + (or ew-permit-null-encoded-text + (< (match-beginning 3) (match-end 3))))) (defun ew-decode-eword (str) (if (string-match ew-anchored-encoded-word-regexp str)