Mercurial > emacs
changeset 41159:5f754d04a4d0
(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.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 16 Nov 2001 19:54:57 +0000 |
parents | 9a106cdd6700 |
children | e71e4b8caeea |
files | lisp/mail/mail-extr.el |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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) ))