From d7c5dfe3a6906490ed97fb35a5e7141835337095 Mon Sep 17 00:00:00 2001 From: morioka Date: Thu, 26 Feb 1998 16:26:47 +0000 Subject: [PATCH] (eword-decode-and-fold-structured-field): Fixed. --- eword-decode.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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. -- 1.7.10.4