# HG changeset patch # User Richard M. Stallman # Date 1005940497 0 # Node ID 5f754d04a4d03c7987ca7308e036e5759843109a # Parent 9a106cdd6700963970db04f4f1fc4d5906bf5835 (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. diff -r 9a106cdd6700 -r 5f754d04a4d0 lisp/mail/mail-extr.el --- a/lisp/mail/mail-extr.el Fri Nov 16 18:40:10 2001 +0000 +++ b/lisp/mail/mail-extr.el Fri Nov 16 19:54:57 2001 +0000 @@ -316,8 +316,7 @@ ;; 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 @@ (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 @@ (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) ))