changeset 81020:6e1a357362af

(mail-extract-address-components): Recognize non-ASCII characters except for NBSP as words.
author Kenichi Handa <handa@m17n.org>
date Tue, 22 May 2007 02:13:27 +0000
parents a1b4792efa5e
children 7195439b60ed
files lisp/mail/mail-extr.el
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/mail-extr.el	Mon May 21 23:05:20 2007 +0000
+++ b/lisp/mail/mail-extr.el	Tue May 22 02:13:27 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 ?,)