(rfc822/non-qtext-char-list): New variable; moved from tl-822.el.
authormorioka <morioka>
Sun, 8 Sep 1996 18:01:01 +0000 (18:01 +0000)
committermorioka <morioka>
Sun, 8 Sep 1996 18:01:01 +0000 (18:01 +0000)
(rfc822/wrap-as-quoted-string): New function; moved from tl-822.el.

std11.el

index c13f545..713fe13 100644 (file)
--- a/std11.el
+++ b/std11.el
@@ -4,7 +4,7 @@
 
 ;; Author:   MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Keywords: mail, news, RFC 822, STD 11
-;; Version: $Id: std11.el,v 0.27 1996-09-03 09:22:23 morioka Exp $
+;; Version: $Id: std11.el,v 0.28 1996-09-08 18:01:01 morioka Exp $
 
 ;; This file is part of MU (Message Utilities).
 
@@ -194,6 +194,24 @@ If BOUNDARY is not nil, it is used as message header separator.
        dest))))
 
 
+;;; @ quoted-string
+;;;
+
+(defconst rfc822/non-qtext-char-list '(?\" ?\\ ?\r ?\n))
+
+(defun rfc822/wrap-as-quoted-string (str)
+  "Wrap string STR as RFC 822 quoted-string. [tl-822.el]"
+  (concat "\""
+         (mapconcat (function
+                     (lambda (chr)
+                       (if (memq chr rfc822/non-qtext-char-list)
+                           (concat "\\" (char-to-string chr))
+                         (char-to-string chr)
+                         )
+                       )) str "")
+         "\""))
+
+
 ;;; @ composer
 ;;;