"njsf" == Nelson Ferreira <nelson.ferreira(a)ieee.org> writes:
njsf> ================================================================
njsf> Dear Bug Team!
njsf> I had a quick look at mail-extr where
njsf> mail-extract-address-components is defined and it seems to
njsf> have the intent of supporting \200-\376
njsf> (defconst mail-extr-all-letters-but-separators
njsf> (purecopy "][A-Za-z{|}'~0-9`\200-\376")) ;; XEmacs
njsf> However:
njsf> (mail-extract-address-components "José dos Santos
njsf> <js(a)aaa.com>") ("Jos" "js(a)aaa.com")
njsf> If I use the gnus alternative function (much simpler) it
njsf> does ok:
njsf> (gnus-extract-address-components "José dos Santos
njsf> <js(a)aaa.com>") ("José dos Santos"
"js(a)aaa.com")
njsf> This of course breaks supercite.
Since supercite was the package that was causing me the most grief I
made this small change to allow supercite to call
gnus-extract-address-components instead of
mail-extract-address-components with a simple
(setq sc-extract-address-components gnus-extract-address-components)
PS: I already have file the paperwork with the FSF if you want to
include this in the distribution.
Index: supercite.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/supercite/supercite.el,v
retrieving revision 1.12
diff -u -r1.12 supercite.el
--- supercite.el 2001/08/14 07:26:20 1.12
+++ supercite.el 2005/10/29 05:53:04
@@ -35,6 +35,7 @@
;; |Mail and news reply citation package
;; |1993/09/22 18:58:46|3.1|
+;; njsf 2005/10/28: Added customize for extract address components
;; sb 1997/May/07: Add autoloads
;; sb 1997/Apr/02: Added attribution function sc-header-author-email-writes
;; which gives attribution in the form -
@@ -96,6 +97,13 @@
:type 'function
:group 'supercite)
+(defcustom sc-extract-address-components 'mail-extract-address-components
+ "*Function for extracting address components from a From header.
+One pre-defined function exist: `mail-extract-address-components'."
+:group 'supercite
+:type '(radio (function-item mail-extract-address-components)
+ (function :tag "Other")))
+
(defcustom sc-auto-fill-region-p t
"*If non-nil, automatically fill each paragraph after it has been cited."
:type 'boolean
@@ -1079,7 +1087,7 @@
(defun sc-attribs-extract-namestring (from)
"Extract the name string from FROM.
This should be the author's full name minus an optional title."
- (let ((from-parts (mail-extract-address-components from)))
+ (let ((from-parts (funcall sc-extract-address-components from)))
(or (car from-parts)
(and (cadr from-parts)
(sc-attribs-emailname (cadr from-parts)))
--
Nelson Ferreira