From: morioka Date: Sun, 8 Sep 1996 18:01:01 +0000 (+0000) Subject: (rfc822/non-qtext-char-list): New variable; moved from tl-822.el. X-Git-Tag: XEmacs-20_3-b6~30 X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Fapel.git;a=commitdiff_plain;h=d8966695501cb5eba87aeb26054d2be8e2fa8968 (rfc822/non-qtext-char-list): New variable; moved from tl-822.el. (rfc822/wrap-as-quoted-string): New function; moved from tl-822.el. --- 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 ;;;