summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/mail-extr.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el
index 9e1b94d8b7a..5029ca23343 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 ?,)