[Bug: 21.4.12] mail-extr.el broken for ISO-8859-2

Jan Rychter jan at rychter.com
Sat Feb 28 13:52:38 EST 2004


This discussion took place around Thu, 26 Jun 2003:

>>>>> "Stephen" == Stephen J Turnbull <stephen at xemacs.org> writes:
>>>>> "Jan" == Jan Rychter <jan at rychter.com> writes:
 Jan> The current situation basically means that mail-extr is broken for
 Jan> anyone who doesn't use ASCII + ISO-8859-1. It breaks BBDB and
 Jan> Supercite for me. I'd consider it quite serious breakage.

 Stephen> So?  Fixing XEmacs is hard; I hope to do this for 21.5 but
 Stephen> you'd have to pay me to do it for 21.4 (it would require
 Stephen> extensive testing to make sure it doesn't break other parts of
 Stephen> the regexp engine _before_ committing it to the repository for
 Stephen> the stable branch).

 Stephen> Fixing mail-extr is easy: add the necessary characters to the
 Stephen> character class.  I don't know what they are; you do.  Tell
 Stephen> us!  (Preferably in the form of a patch.)

I've submitted a patch but it fell through the cracks somewhere. I've
recently had to help a bunch of friends fix their mail-extr.el, because
of the broken default behavior (extremely annoying if you use
Gnus+BBDB), so I thought I'd bring the issue to attention again.

Of course everybody knows that this solution isn't correct. It's just a
quick fix that works for people using Polish. But let's not forget that
this problem exists and bites some people (I've seen reports from people
using other languages as well).

--J.

diff -u /local/lib/xemacs/xemacs-packages/lisp/mail-lib/mail-extr.el.original /local/lib/xemacs/xemacs-packages/lisp/mail-lib/mail-extr.el
--- /local/lib/xemacs/xemacs-packages/lisp/mail-lib/mail-extr.el.original	2004-02-28 10:51:07.000000000 -0800
+++ /local/lib/xemacs/xemacs-packages/lisp/mail-lib/mail-extr.el	2004-02-28 10:51:07.000000000 -0800
@@ -302,8 +302,19 @@
 ;; You will also notice the consideration for the
 ;; Swedish/Finnish/Norwegian character set.
 ;; XEmacs: go to \376 instead of \377 to work around bug in search.c...
+
+;; The Polish part of ISO-8859-2 additionally requires:
+;; (161 198 202 163 209 211 166 172 175 177 230 234 179 241 243 182 188 191)
+;;  (?A  ?C  ?E  ?L  ?N  ?O  ?S  ?Z  ?Z ?a  ?c  ?e  ?l  ?n  ?o  ?s  ?z  ?z)
+;;   Aogonek Cacute Eogonek Lslash Nacute Oacute Sacute Zacute Zdotaccent
+;;   aogonek cacute eogonek lslash nacute oacute sacute zacute zdotaccent
+(defconst mail-extr-special-chars (mapcar #'(lambda (a) 
+					      (make-char 'latin-iso8859-2 a))
+					  '(161 198 202 163 209 211 166 172 175 
+					    177 230 234 179 241 243 182 188 191)))
+
 (defconst mail-extr-all-letters-but-separators
-  (purecopy "][A-Za-z{|}'~0-9`\200-\376")) ;; XEmacs
+    (purecopy (concat "][A-Za-z{|}'~0-9`\200-\376" mail-extr-special-chars)))
 
 ;; Any character that can occur in a name in an RFC822 address including
 ;; the separator (hyphen and possibly period) for multipart names.
@@ -313,11 +324,14 @@
 
 ;; Any character that can start a name.
 ;; Keep this set as minimal as possible.
-(defconst mail-extr-first-letters (purecopy "A-Za-z")) ;; XEmacs
+;;(defconst mail-extr-first-letters (purecopy "A-Za-z")) ;; XEmacs
+(defconst mail-extr-first-letters (purecopy (concat "A-Za-z" mail-extr-special-chars)))
+
 
 ;; Any character that can end a name.
 ;; Keep this set as minimal as possible.
-(defconst mail-extr-last-letters (purecopy "[A-Za-z`'.")) ;; XEmacs
+;;(defconst mail-extr-last-letters (purecopy "[A-Za-z`'.")) ;; XEmacs
+(defconst mail-extr-last-letters (purecopy (concat "[A-Za-z`'." mail-extr-special-chars)))
 
 (defconst mail-extr-leading-garbage "\\W+")
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.xemacs.org/pipermail/xemacs-beta/attachments/20040228/4aea835f/attachment.pgp


More information about the XEmacs-Beta mailing list