aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2003-10-23 11:42:11 +0000
committerDave Love2003-10-23 11:42:11 +0000
commitff9ed54408c40733f788e89f5c1d48be9dde091d (patch)
tree54190d17c4df0bbcaa7b26b8a5ae1713315828e5
parentc3cda320b5a4e6588391ae6713ac05ac47f7328e (diff)
downloademacs-ff9ed54408c40733f788e89f5c1d48be9dde091d.tar.gz
emacs-ff9ed54408c40733f788e89f5c1d48be9dde091d.zip
(mail-extr-ignore-single-names): Add :version.
(mail-extr-address-syntax-table): Remove non-ASCII unibyte chars. (mail-extr-voodoo): Use char classes in regexps (for non-ASCII).
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/mail/mail-extr.el36
2 files changed, 15 insertions, 27 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 99b3d8e3f5a..2433959d83f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12003-10-23 Dave Love <fx@gnu.org>
2
3 * mail/mail-extr.el (mail-extr-ignore-single-names): Add :version.
4 (mail-extr-address-syntax-table): Remove non-ASCII unibyte chars.
5 (mail-extr-voodoo): Use char classes in regexps (for non-ASCII).
6
12003-10-21 Nick Roberts <nick@nick.uklinux.net> 72003-10-21 Nick Roberts <nick@nick.uklinux.net>
2 8
3 * gdb-ui.el (gdb-current-language): New variable. 9 * gdb-ui.el (gdb-current-language): New variable.
diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el
index 1995933382f..faa7ca1bb74 100644
--- a/lisp/mail/mail-extr.el
+++ b/lisp/mail/mail-extr.el
@@ -231,6 +231,7 @@ we will assume that \"John Q. Smith\" is the fellow's name."
231If true, then when we see an address like \"Idiot <dumb@stupid.com>\" 231If true, then when we see an address like \"Idiot <dumb@stupid.com>\"
232we will act as though we couldn't find a full name in the address." 232we will act as though we couldn't find a full name in the address."
233 :type 'boolean 233 :type 'boolean
234 :version "21.4"
234 :group 'mail-extr) 235 :group 'mail-extr)
235 236
236;; Matches a leading title that is not part of the name (does not 237;; Matches a leading title that is not part of the name (does not
@@ -273,27 +274,6 @@ by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"."
273;; Constant definitions. 274;; Constant definitions.
274;; 275;;
275 276
276;; Codes in
277;; Names in ISO 8859-1 Name
278;; ISO 10XXX ISO 8859-2 in
279;; ISO 6937 ISO 10646 RFC Swedish
280;; etc. Hex Oct 1345 TeX Split ASCII Description
281;; --------- ---------- ---- --- ----- ----- -------------------------------
282;; %a E4 344 a: \"a ae { latin small a + diaeresis d
283;; %o F6 366 o: \"o oe | latin small o + diaeresis v
284;; @a E5 345 aa \oa aa } latin small a + ring above e
285;; %u FC 374 u: \"u ue ~ latin small u + diaeresis |
286;; /e E9 351 e' \'e ` latin small e + acute i
287;; %A C4 304 A: \"A AE [ latin capital a + diaeresis D
288;; %O D6 326 O: \"O OE \ latin capital o + diaeresis V
289;; @A C5 305 AA \oA AA ] latin capital a + ring above E
290;; %U DC 334 U: \"U UE ^ latin capital u + diaeresis \
291;; /E C9 311 E' \'E @ latin capital e + acute I
292
293;; NOTE: @a and @A are not in ISO 8859-2 (the codes mentioned above invoke
294;; /l and /L). Some of this data was retrieved from
295;; listserv@jhuvm.hcf.jhu.edu.
296
297;; Any character that can occur in a name, not counting characters that 277;; Any character that can occur in a name, not counting characters that
298;; separate parts of a multipart name (hyphen and period). 278;; separate parts of a multipart name (hyphen and period).
299;; Yes, there are weird people with digits in their names. 279;; Yes, there are weird people with digits in their names.
@@ -530,8 +510,6 @@ by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"."
530 (?\040 " ") ;SPC 510 (?\040 " ") ;SPC
531 (?! ?~ "w") ;printable characters 511 (?! ?~ "w") ;printable characters
532 (?\177 "w") ;DEL 512 (?\177 "w") ;DEL
533 (?\200 ?\377 "w") ;high-bit-on characters
534 (?\240 " ") ;nobreakspace
535 (?\t " ") 513 (?\t " ")
536 (?\r " ") 514 (?\r " ")
537 (?\n " ") 515 (?\n " ")
@@ -614,6 +592,10 @@ by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"."
614;; Utility functions and macros. 592;; Utility functions and macros.
615;; 593;;
616 594
595;; Fixme: There are Latin-1 nbsp below. If such characters should be
596;; included, this is the wrong thing to do -- it should use syntax (or
597;; regexp char classes).
598
617(defsubst mail-extr-skip-whitespace-forward () 599(defsubst mail-extr-skip-whitespace-forward ()
618 ;; v19 fn skip-syntax-forward is more tasteful, but not byte-coded. 600 ;; v19 fn skip-syntax-forward is more tasteful, but not byte-coded.
619 (skip-chars-forward " \t\n\r ")) 601 (skip-chars-forward " \t\n\r "))
@@ -1727,19 +1709,19 @@ consing a string.)"
1727 (and (>= word-count 2) 1709 (and (>= word-count 2)
1728 (not lower-case-flag) 1710 (not lower-case-flag)
1729 (or 1711 (or
1730 ;; A trailing 4-or-more letter lowercase words preceded by 1712 ;; Trailing 4-or-more letter lowercase words preceded by
1731 ;; mixed case or uppercase words will be dropped. 1713 ;; mixed case or uppercase words will be dropped.
1732 (looking-at "[a-z][a-z][a-z][a-z]+[ \t]*\\'") 1714 (looking-at "[[:lower:]]\\{4,\\}[ \t]*\\'")
1733 ;; Drop a trailing word which is terminated with a period. 1715 ;; Drop a trailing word which is terminated with a period.
1734 (eq ?. (char-after (1- name-end)))) 1716 (eq ?. (char-after (1- name-end))))
1735 (setq drop-this-word-if-trailing-flag t)) 1717 (setq drop-this-word-if-trailing-flag t))
1736 1718
1737 ;; Set the flags that indicate whether we have seen a lowercase 1719 ;; Set the flags that indicate whether we have seen a lowercase
1738 ;; word, a mixed case word, and an uppercase word. 1720 ;; word, a mixed case word, and an uppercase word.
1739 (if (re-search-forward "[a-z]" name-end t) 1721 (if (re-search-forward "[[:lower:]]" name-end t)
1740 (if (progn 1722 (if (progn
1741 (goto-char name-beg) 1723 (goto-char name-beg)
1742 (re-search-forward "[A-Z]" name-end t)) 1724 (re-search-forward "[[:upper:]]" name-end t))
1743 (setq mixed-case-flag t) 1725 (setq mixed-case-flag t)
1744 (setq lower-case-flag t)) 1726 (setq lower-case-flag t))
1745;; (setq upper-case-flag t) 1727;; (setq upper-case-flag t)