From b907b62954849c764d1f304518f80191e09982fd Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 22 May 2007 02:13:27 +0000 Subject: [PATCH] (mail-extract-address-components): Recognize non-ASCII characters except for NBSP as words. --- lisp/mail/mail-extr.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el index 9e1b94d8b7a..bfa8d290763 100644 --- a/lisp/mail/mail-extr.el +++ b/lisp/mail/mail-extr.el @@ -873,7 +873,17 @@ consing a string.)" (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 ?,) -- 2.39.2