-;;;
;;; tm-edit.el --- Simple MIME Composer for GNU Emacs
-;;;
-;;; Copyright (C) 1993 UMEDA Masanobu
-;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko
-;;;
-;;; Author: UMEDA Masanobu <umerin@mse.kyutech.ac.jp>
-;;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; Created: 1994/08/21 renamed from mime.el
-;;; Version: $Revision: 7.77 $
-;;; Keywords: mail, news, MIME, multimedia, multilingual
-;;;
-;;; This file is part of tm (Tools for MIME).
-;;;
-;;; This program is free software; you can redistribute it and/or
-;;; modify it under the terms of the GNU General Public License as
-;;; published by the Free Software Foundation; either version 2, or
-;;; (at your option) any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;;; General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with This program. If not, write to the Free Software
-;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+;; Copyright (C) 1993 .. 1996 Free Software Foundation, Inc.
+
+;; Author: UMEDA Masanobu <umerin@mse.kyutech.ac.jp>
+;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Created: 1994/08/21 renamed from mime.el
+;; Version: $Revision: 7.80 $
+;; Keywords: mail, news, MIME, multimedia, multilingual
+
+;; This file is part of tm (Tools for MIME).
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
;;; Commentary:
;;;
(defconst mime-editor/RCS-ID
- "$Id: tm-edit.el,v 7.77 1996/08/09 12:16:23 morioka Exp $")
+ "$Id: tm-edit.el,v 7.80 1996/08/30 15:16:52 morioka Exp $")
(defconst mime-editor/version (get-version-string mime-editor/RCS-ID))
(define-key keymap "s" 'mime-editor/enclose-signed-region)
(define-key keymap "e" 'mime-editor/enclose-encrypted-region)
(define-key keymap "q" 'mime-editor/enclose-quote-region)
+ (define-key keymap "7" 'mime-editor/set-transfer-level-7bit)
+ (define-key keymap "8" 'mime-editor/set-transfer-level-8bit)
+ (define-key keymap "/" 'mime-editor/set-split)
+ (define-key keymap "v" 'mime-editor/set-sign)
+ (define-key keymap "h" 'mime-editor/set-encrypt)
(define-key keymap "\C-p" 'mime-editor/preview-message)
(define-key keymap "\C-z" 'mime-editor/exit)
(define-key keymap "?" 'mime-editor/help)
(defun mime-editor/encrypt-pgp-kazu (beg end boundary)
(save-excursion
- (let ((from (rfc822/get-field-body "From"))
- (to (rfc822/get-field-body "To"))
- (cc (rfc822/get-field-body "cc"))
- recipients)
+ (let (from recipients header)
+ (let ((ret (mime-editor/make-encrypt-recipient-header)))
+ (setq from (aref ret 0)
+ recipients (aref ret 1)
+ header (aref ret 2))
+ )
(save-restriction
(narrow-to-region beg end)
(let* ((ret
(parts (nth 3 ret))
)
(goto-char beg)
- (if (and (stringp from)
- (not (string-equal from "")))
- (insert (format "From: %s\n" from))
- )
- (if (and (stringp to)
- (not (string-equal to "")))
- (progn
- (insert (format "To: %s\n" to))
- (setq recipients to)
- ))
- (if (and (stringp cc)
- (not (string-equal cc "")))
- (progn
- (insert (format "cc: %s\n" cc))
- (if recipients
- (setq recipients (concat recipients "," cc))
- (setq recipients cc)
- )))
+ (insert header)
(insert (format "Content-Type: %s\n" ctype))
(if encoding
(insert (format "Content-Transfer-Encoding: %s\n" encoding))
(let ((beg (point))
(end (mime-editor/content-end))
)
- (goto-char end)
- (or (looking-at mime-editor/beginning-tag-regexp)
- (eobp)
- (insert (mime-make-text-tag) "\n")
- )
+ (if (= end (point-max))
+ nil
+ (goto-char end)
+ (or (looking-at mime-editor/beginning-tag-regexp)
+ (eobp)
+ (insert (mime-make-text-tag) "\n")
+ ))
(visible-region beg end)
(goto-char beg)
)
(force-mode-line-update)
)
+(defun mime-editor/set-transfer-level-7bit ()
+ (interactive)
+ (mime-editor/toggle-transfer-level 7)
+ )
+
+(defun mime-editor/set-transfer-level-8bit ()
+ (interactive)
+ (mime-editor/toggle-transfer-level 8)
+ )
+
;;; @ pgp
;;;