From 91abc0f20911362e323482e255eb701d339e718a Mon Sep 17 00:00:00 2001 From: morioka Date: Fri, 2 Oct 1998 20:25:07 +0000 Subject: [PATCH] (std11-unfold-string): New implementation. --- std11.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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)) )) -- 1.7.10.4