From: morioka Date: Fri, 2 Oct 1998 20:25:07 +0000 (+0000) Subject: (std11-unfold-string): New implementation. X-Git-Tag: flim-chao-1_11_1~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=91abc0f20911362e323482e255eb701d339e718a;p=elisp%2Fflim.git (std11-unfold-string): New implementation. --- diff --git a/std11.el b/std11.el index d62b88b..616d3ad 100644 --- a/std11.el +++ b/std11.el @@ -116,16 +116,18 @@ header separator. [std11.el]" ;;; (defun std11-unfold-string (string) - "Unfold STRING as message header field. [std11.el]" - (let ((dest "")) - (while (string-match "\n\\([ \t]\\)" string) + "Unfold STRING as message header field." + (let ((dest "") + (p 0)) + (while (string-match "\n\\([ \t]\\)" string p) (setq dest (concat dest - (substring string 0 (match-beginning 0)) - (match-string 1 string) + (substring string p (match-beginning 0)) + (substring string + (match-beginning 1) + (setq p (match-end 0))) )) - (setq string (substring string (match-end 0))) ) - (concat dest string) + (concat dest (substring string p)) ))