From 7cbdb8bc866c199a7e2a2e60334958dd01f9eb3c Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 26 May 1999 19:25:14 +0000 Subject: [PATCH] =?utf8?q?*=20TESTPAT:=20Does=20not=20treat=20=3D=3F=3D=20as?= =?utf8?q?=20encoded-word.?= * ew-unit.el (ew-eword-p): Use `ew-anchored-encoded-word-regexp' to test. --- ChangeLog | 7 +++++++ TESTPAT | 2 +- ew-unit.el | 10 +++------- 3 files changed, 11 insertions(+), 8 deletions(-) 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) -- 1.7.10.4