From: morioka Date: Thu, 26 Feb 1998 16:26:47 +0000 (+0000) Subject: (eword-decode-and-fold-structured-field): Fixed. X-Git-Tag: semi-1_0_1~8 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d7c5dfe3a6906490ed97fb35a5e7141835337095;p=elisp%2Fsemi.git (eword-decode-and-fold-structured-field): Fixed. --- diff --git a/eword-decode.el b/eword-decode.el index f7a0450..aa638db 100644 --- a/eword-decode.el +++ b/eword-decode.el @@ -508,11 +508,11 @@ such as a version of Net$cape)." (setq max-column fill-column)) (let ((c start-column) (tokens (eword-lexical-analyze string must-unfold)) - (result "")) - (while tokens - (let* ((token (car tokens)) - (type (car token))) - (setq tokens (cdr tokens)) + (result "") + token) + (while (and (setq token (car tokens)) + (setq tokens (cdr tokens))) + (let* ((type (car token))) (if (eq type 'spaces) (let* ((next-token (car tokens)) (next-str (eword-decode-token next-token)) @@ -529,7 +529,9 @@ such as a version of Net$cape)." (setq result (concat result str) c (+ c (string-width str))) )))) - result)) + (if token + (concat result (eword-decode-token token)) + result))) (defun eword-decode-and-unfold-structured-field (string) "Decode and unfold STRING as structured field body.