# HG changeset patch # User Chong Yidong # Date 1180999267 0 # Node ID d3e947ea638fddcf7f9b6455716f33e6fa5a6184 # Parent 6ac79e15e2cf1b7608198b5f112881122a1fdbdd (mail-extract-address-components): Recognize non-ASCII characters except for NBSP as words. diff -r 6ac79e15e2cf -r d3e947ea638f lisp/mail/mail-extr.el --- a/lisp/mail/mail-extr.el Mon Jun 04 23:20:54 2007 +0000 +++ b/lisp/mail/mail-extr.el Mon Jun 04 23:21:07 2007 +0000 @@ -873,7 +873,17 @@ (mail-extr-nuke-char-at (point)) (forward-char 1)) (t - (forward-word 1))) + ;; Do `(forward-word 1)', recognizing non-ASCII characters + ;; except Latin-1 nbsp as words. + (while (progn + (skip-chars-forward "^\000-\177 ") + (and (not (eobp)) + (eq ?w (char-syntax (char-after))) + (progn + (forward-word 1) + (and (not (eobp)) + (> (char-after) ?\177) + (not (eq (char-after) ? ))))))))) (or (eq char ?\() ;; At the end of first address of a multiple address header. (and (eq char ?,)