1998-09-01 Tanaka Akira <akr@jaist.ac.jp>
+ * TESTPAT: Add 16 tests.
+
+ * ew-data.el (ew-separate-eword): Check
+ `ew-permit-null-encoded-text'.
+
+ * ew-quote.el (ew-quote-concat): Use `ew-encoded-word-regexp0'
+ instead of `ew-encoded-word-regexp'.
+ (ew-quote-sole): Ditto.
+
+ * ew-var.el (ew-encoded-text-regexp): Abolished.
+ (ew-encoded-text-regexp0): Renamed from `ew-encoded-text-regexp'.
+ (ew-encoded-text-regexp1): New constant.
+ (ew-encoded-word-regexp): Abolished.
+ (ew-encoded-word-regexp0): Renamed from `ew-encoded-word-regexp'.
+ (ew-encoded-word-regexp1): New constant.
+ (ew-anchored-encoded-word-regexp): Use `ew-encoded-word-regexp0'.
+ (ew-type2-regexp): Use `ew-encoded-word-regexp0'.
+
+1998-09-01 Tanaka Akira <akr@jaist.ac.jp>
+
* Sync up with flim-1_9_1.
* mime-def.el (mime-library-version-string): bump up to
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r
=?ISO-2022-JP?B?GyRCJCIbKEI=?=)(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)")
+(encode
+"Subject: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?\e$(C$!\e(B?"
+"Subject: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =?EUC-KR?B?P6ShPw==?=")
+
+(encode
+"Subject: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?\e$(C$!\e(B?"
+"Subject: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =?EUC-KR?B?P6Sh?=\r
+ =?US-ASCII?Q?=3F?=")
+
+(encode
+"Subject: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?\e$(C$!\e(B?"
+"Subject: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =?EUC-KR?B?P6Sh?=\r
+ =?US-ASCII?Q?=3F?=")
+
+(encode
+"Subject: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?\e$(C$!\e(B?"
+"Subject: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r
+ =?EUC-KR?B?P6ShPw==?=")
+
;----------------------------------------------------------------------------
;;; Section 6: Encoding melancholic inputs.
=?ISO-2022-JP?B?GyRCJCgbKEI=?= <foo@bar>"
'separate-sticked-special)
+(encode
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?\e$(C$!\e(B?()aaaaa <akr@jaist.ac.jp>"
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6ShPw==?=()aaaaa\r
+ <akr@jaist.ac.jp>"
+'permit-sticked-comment)
+
+(encode
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?\e$(C$!\e(B?()aaaaa <akr@jaist.ac.jp>"
+'("From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?=\r
+ =?US-ASCII?Q?=3F?=()aaaaa <akr@jaist.ac.jp>"
+ "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?US-ASCII?Q?=3F?=\r
+ =?EUC-KR?B?pKE/?=()aaaaa <akr@jaist.ac.jp>")
+'permit-sticked-comment)
+
+(encode
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?\e$(C$!\e(B?()aaaaa <akr@jaist.ac.jp>"
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?=
+ =?US-ASCII?Q?=3F?=()aaaaa <akr@jaist.ac.jp>"
+'permit-sticked-comment)
+
+(encode
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?\e$(C$!\e(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
+'("From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?=\r
+ =?US-ASCII?Q?=3F?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
+ "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?US-ASCII?Q?=3F?=\r
+ =?EUC-KR?B?pKE/?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>")
+'permit-sticked-comment)
+
+(encode
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?\e$(C$!\e(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?US-ASCII?Q?=3F?=\r
+ =?EUC-KR?B?pKE/?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
+'permit-sticked-comment)
+
+(encode
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?\e$(C$!\e(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?US-ASCII?Q?=3F?=\r
+ =?EUC-KR?B?pKE/?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
+'permit-sticked-comment)
+
+(encode
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?\e$(C$!\e(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?=\r
+ =?US-ASCII?Q?=3F?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
+'permit-sticked-comment)
+
+(encode
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?\e$(C$!\e(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?=\r
+ =?US-ASCII?Q?=3F?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r
+ <akr@jaist.ac.jp>"
+'permit-sticked-comment)
+
+(encode
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?\e$(C$!\e(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <akr@jaist.ac.jp>"
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?=\r
+ =?US-ASCII?Q?=3F?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r
+ <akr@jaist.ac.jp>"
+'permit-sticked-comment)
+
+(encode
+"From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?\e$(C$!\e(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaa?=
+ =?US-ASCII?Q?aa?=()=?US-ASCII?Q?=3F?=\r
+ =?EUC-KR?B?pKE/?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r
+ <akr@jaist.ac.jp>")
+'permit-sticked-comment)
+
+;----------------------------------------------------------------------------
+
;;; Section 7: Using embedded-encoded-words.
;;
;; embedded-encoded-word \e$BI=8=\e(B
;; 1/3 (\e$B>.?tE@0J2<@Z<N$F\e(B)\e$B$K$7$F!":G8e$N\e(B = \e$B$r<h$j=|$$$?J8;zNs\e(B
;;
;; =?c?e?t?=?c?e?t?=... \e$B$H$$$&$h$&$K!"%Q%?!<%s$N@hF,$N\e(B = \e$B$H\e(B \e$BKvHx$N\e(B =
-;; \e$B=E$J$k>l9g!"4q?tHVL\$N$b$N$KBP$7$F>e5-$N%k!<%k$rE,MQ$9$k!#\e(B
+;; \e$B$,=E$J$k>l9g!"4q?tHVL\$N$b$N$KBP$7$F>e5-$N%k!<%k$rE,MQ$9$k!#\e(B
;;
;; NOTE: + \e$B$r\e(B embedded-encoded-word \e$BI=8=$N\e(B quote \e$BJ8;z$H8F$V!#\e(B
;;
(defun ew-separate-eword (frag1 frag2 targets)
(while (not (eq frag1 frag2))
(when (and (memq (get frag1 'type) targets)
- (string-match ew-encoded-word-regexp
+ (string-match (if ew-permit-null-encoded-text
+ ew-encoded-word-regexp0
+ ew-encoded-word-regexp1)
(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 ew-encoded-word-regexp atom start)
+ (while (string-match (if ew-permit-null-encoded-text
+ ew-encoded-word-regexp0
+ ew-encoded-word-regexp1)
+ atom start)
(when (< start (match-beginning 0))
(setq frag (make-symbol (substring atom start (match-beginning 0)))
result (ew-rcons* result frag))
;;; constants.
(defconst ew-token-regexp "[-!#-'*+0-9A-Z^-~]+")
-(defconst ew-encoded-text-regexp "[!->@-~]*")
+(defconst ew-encoded-text-regexp0 "[!->@-~]*")
+(defconst ew-encoded-text-regexp1 "[!->@-~]+")
-(defconst ew-encoded-word-regexp
+(defconst ew-encoded-word-regexp0
(concat (regexp-quote "=?")
"\\(" ew-token-regexp "\\)"
(regexp-quote "?")
"\\(" ew-token-regexp "\\)"
(regexp-quote "?")
- "\\(" ew-encoded-text-regexp "\\)"
+ "\\(" 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 "\\)"
(regexp-quote "?=")))
(defconst ew-anchored-encoded-word-regexp
- (concat "\\`" ew-encoded-word-regexp "\\'"))
+ (concat "\\`" ew-encoded-word-regexp0 "\\'"))
(defconst ew-b-regexp
(eval-when-compile
(regexp-quote "?")
"\\(" ew-token-regexp "\\)"
(regexp-quote "?")
- "\\(" ew-encoded-text-regexp "\\)"
+ "\\(" ew-encoded-text-regexp0 "\\)"
(regexp-quote "?")
"\\'"))