summaryrefslogtreecommitdiff
path: root/lisp/mail/mail-extr.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2001-11-16 19:57:07 +0000
committerRichard M. Stallman <rms@gnu.org>2001-11-16 19:57:07 +0000
commitaf6046560c78797a018cd8d132f38e9f18371936 (patch)
tree7bfe16d59e8d71a29c6e71c35ca47a37e77c9341 /lisp/mail/mail-extr.el
parent792e5cbdd181e326a5834314a27e0fcda55b566d (diff)
downloademacs-af6046560c78797a018cd8d132f38e9f18371936.tar.gz
(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.
Diffstat (limited to 'lisp/mail/mail-extr.el')
-rw-r--r--lisp/mail/mail-extr.el13
1 files changed, 10 insertions, 3 deletions
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\"."
;; Keep this set as minimal as possible.
(defconst mail-extr-last-letters (purecopy "[:alpha:]`'."))
-(defconst mail-extr-leading-garbage
- (purecopy (format "[^%s]+" mail-extr-first-letters)))
+(defconst mail-extr-leading-garbage "\\W+")
;; (defconst mail-extr-non-name-chars
;; (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
(looking-at mail-extr-trailing-comment-start-pattern)
;; Stop before telephone numbers
- (looking-at mail-extr-telephone-extension-pattern))
+ (and (>= word-count 1)
+ (looking-at mail-extr-telephone-extension-pattern)))
(setq name-done-flag t))
;; Delete ham radio call signs
@@ -1765,6 +1765,13 @@ ADDRESS may be a string or a buffer. If it is a buffer, the visible
(goto-char name-end)
(setq word-found-flag t))
+ ;; Allow a number as a word, if it doesn't mean anything else.
+ ((looking-at "[0-9]+\\>")
+ (setq name-beg (point))
+ (setq name-end (match-end 0))
+ (goto-char name-end)
+ (setq word-found-flag t))
+
(t
(setq name-done-flag t)
))