]> git.eshelyaron.com Git - emacs.git/commitdiff
(mail-extract-address-components): Recognize non-ASCII characters
authorChong Yidong <cyd@stupidchicken.com>
Mon, 4 Jun 2007 23:21:07 +0000 (23:21 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 4 Jun 2007 23:21:07 +0000 (23:21 +0000)
except for NBSP as words.

lisp/mail/mail-extr.el

index 9e1b94d8b7ad930ad24a981a5fcc3157a00bb632..5029ca2334339fd771adbff039b04c4e7ca7e313 100644 (file)
@@ -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 ?,)