From 530d4b3344fefa2ca7c441234eb52a1864f25c66 Mon Sep 17 00:00:00 2001 From: morioka Date: Sun, 8 Sep 1996 18:01:01 +0000 Subject: [PATCH] (rfc822/non-qtext-char-list): New variable; moved from tl-822.el. (rfc822/wrap-as-quoted-string): New function; moved from tl-822.el. --- std11.el | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/std11.el b/std11.el index c13f545..713fe13 100644 --- a/std11.el +++ b/std11.el @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko ;; 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 ;;; -- 1.7.10.4