summaryrefslogtreecommitdiff
path: root/lisp/gnus/rfc2231.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/rfc2231.el')
-rw-r--r--lisp/gnus/rfc2231.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/gnus/rfc2231.el b/lisp/gnus/rfc2231.el
index a5827ecb70c..284c95fc151 100644
--- a/lisp/gnus/rfc2231.el
+++ b/lisp/gnus/rfc2231.el
@@ -176,14 +176,14 @@ must never cause a Lisp error."
(buffer-substring
(point)
(progn
- (forward-sexp)
- ;; We might not have reached at the end of
- ;; the value because of non-ascii chars,
- ;; so we should jump over them if any.
- (while (and (not (eobp))
- (> (char-after) ?\177))
+ ;; Jump over asterisk, non-ASCII
+ ;; and non-boundary characters.
+ (while (and c
+ (or (eq c ?*)
+ (> c ?\177)
+ (not (eq (char-syntax c) ? ))))
(forward-char 1)
- (forward-sexp))
+ (setq c (char-after)))
(point)))))
(t
(error "Invalid header: %s" string)))