aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-11-16 19:57:07 +0000
committerRichard M. Stallman2001-11-16 19:57:07 +0000
commitaf6046560c78797a018cd8d132f38e9f18371936 (patch)
tree7bfe16d59e8d71a29c6e71c35ca47a37e77c9341
parent792e5cbdd181e326a5834314a27e0fcda55b566d (diff)
downloademacs-af6046560c78797a018cd8d132f38e9f18371936.tar.gz
emacs-af6046560c78797a018cd8d132f38e9f18371936.zip
(mail-extr-voodoo): Treat a number as a word
if it doesn't make sense as anything else. (mail-extr-leading-garbage): Match non-word characters only.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/mail/mail-extr.el13
2 files changed, 17 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bb93cffb3fc..64b6da0ba24 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12001-11-16 Richard M. Stallman <rms@gnu.org>
2
3 * mail/mail-extr.el (mail-extr-voodoo): Treat a number as a word
4 if it doesn't make sense as anything else.
5 Don't recognize a "telephone number" at the beginning of the name.
6 (mail-extr-leading-garbage): Match non-word characters only.
7
12001-11-16 Pavel Jan,Bm(Bk <Pavel@Janik.cz> 82001-11-16 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
2 9
3 * emulation/viper.el: Fix typo. 10 * emulation/viper.el: Fix typo.
diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el
index 0fd3414df04..d6a1f9ffe1c 100644
--- a/lisp/mail/mail-extr.el
+++ b/lisp/mail/mail-extr.el
@@ -316,8 +316,7 @@ by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"."
316;; Keep this set as minimal as possible. 316;; Keep this set as minimal as possible.
317(defconst mail-extr-last-letters (purecopy "[:alpha:]`'.")) 317(defconst mail-extr-last-letters (purecopy "[:alpha:]`'."))
318 318
319(defconst mail-extr-leading-garbage 319(defconst mail-extr-leading-garbage "\\W+")
320 (purecopy (format "[^%s]+" mail-extr-first-letters)))
321 320
322;; (defconst mail-extr-non-name-chars 321;; (defconst mail-extr-non-name-chars
323;; (purecopy (concat "^" mail-extr-all-letters "."))) 322;; (purecopy (concat "^" mail-extr-all-letters ".")))
@@ -1687,7 +1686,8 @@ ADDRESS may be a string or a buffer. If it is a buffer, the visible
1687 (looking-at mail-extr-trailing-comment-start-pattern) 1686 (looking-at mail-extr-trailing-comment-start-pattern)
1688 1687
1689 ;; Stop before telephone numbers 1688 ;; Stop before telephone numbers
1690 (looking-at mail-extr-telephone-extension-pattern)) 1689 (and (>= word-count 1)
1690 (looking-at mail-extr-telephone-extension-pattern)))
1691 (setq name-done-flag t)) 1691 (setq name-done-flag t))
1692 1692
1693 ;; Delete ham radio call signs 1693 ;; Delete ham radio call signs
@@ -1765,6 +1765,13 @@ ADDRESS may be a string or a buffer. If it is a buffer, the visible
1765 (goto-char name-end) 1765 (goto-char name-end)
1766 (setq word-found-flag t)) 1766 (setq word-found-flag t))
1767 1767
1768 ;; Allow a number as a word, if it doesn't mean anything else.
1769 ((looking-at "[0-9]+\\>")
1770 (setq name-beg (point))
1771 (setq name-end (match-end 0))
1772 (goto-char name-end)
1773 (setq word-found-flag t))
1774
1768 (t 1775 (t
1769 (setq name-done-flag t) 1776 (setq name-done-flag t)
1770 )) 1777 ))