;;; emh-comp.el --- emh functions for composing messages
-;; Copyright (C) 1993,1994,1995,1996,1997 Free Software Foundation, Inc.
+;; Copyright (C) 1993,1994,1995,1996,1997,1998 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
-;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; Created: 1996/2/29 (separated from tm-mh-e.el)
;; Renamed: 1997/2/21 from tmh-comp.el
-;; Version: $Id: emh-comp.el,v 0.0 1997-03-01 01:55:48 tmorioka Exp $
-;; Keywords: MH, MIME, multimedia, encoded-word, multilingual, mail
+;; Keywords: mail composing, MH, MIME, mail
;; This file is part of emh.
(save-excursion
(set-buffer gnus-article-buffer)
(if (eq major-mode 'mime-view-mode)
- mime::preview/article-buffer
+ mime-raw-buffer
(current-buffer)
)))
))))
(catch 'tag
(let* ((from-folder mh-current-folder)
(config (current-window-configuration))
- code-conversion
(draft
(cond ((and mh-draft-folder (equal from-folder mh-draft-folder))
(let ((name (format "draft-%d" msg)))
(if (get-buffer name)
(throw 'tag (pop-to-buffer name))
)
- (let ((file-coding-system-for-read *noconv*)
- (filename
+ (let ((filename
(mh-msg-filename msg mh-draft-folder)
))
(set-buffer (get-buffer-create name))
- (insert-file-contents filename)
+ (as-binary-input-file (insert-file-contents filename))
(setq buffer-file-name filename)
- (setq code-conversion t)
)
(pop-to-buffer name)
(if (re-search-forward "^-+$" nil t)
)
name))
(t
- (prog1
- (let ((file-coding-system-for-read *noconv*))
- (mh-read-draft "clean-up" (mh-msg-filename msg) nil)
- )
- (setq code-conversion t)
- ))))
- )
+ (let ((flag enable-multibyte-characters))
+ (prog1
+ (as-binary-input-file
+ (mh-read-draft "clean-up"
+ (mh-msg-filename msg) nil))
+ (setq enable-multibyte-characters flag)
+ ))
+ ))))
(goto-char (point-min))
(mh-clean-msg-header (point-min) mh-new-draft-cleaned-headers nil)
- (if code-conversion
- (let ((cs (detect-coding-region (point-min)(point-max))))
- (set-buffer-file-coding-system
- (if (listp cs)
- (car cs)
- cs))
- ))
+ (let ((cs (detect-coding-region (point-min)(point-max))))
+ (set-buffer-file-coding-system
+ (if (listp cs)
+ (car cs)
+ cs)))
(save-buffer)
- (mime/edit-again code-conversion t t)
+ (mime-edit-again nil 'no-separator 'not-turn-on)
(goto-char (point-min))
(mh-compose-and-send-mail draft "" from-folder nil nil nil nil nil nil
config)
(if (re-search-forward "^-+$" nil t)
(replace-match "")
)
- (mime/edit-again nil t t)
+ (mime-edit-again nil t t)
(goto-char (point-min))
(set-buffer-modified-p nil)
(mh-compose-and-send-mail draft "" from-folder msg
)))
(delete-region (point) (point-max))
(if multipart-flag
- (mime-edit-enclose-region "digest" beg (point))
+ (mime-edit-enclose-digest-region beg (point))
))))
(re-search-forward tag-regexp)
(forward-line 1)
(defun emh-yank-cur-msg-with-no-filter ()
"Insert the current message into the draft buffer.
This function makes new show-buffer from article-buffer to disable
-variable `mime-view-plain-text-preview-hook'. If you don't want to
-use text filters for replying message, please set it to
+variable `mime-preview-text/plain-hook'. If you don't want to use text
+filters for replying message, please set it to
`emh-message-yank-function'.
Prefix each non-blank line in the message with the string in
`mh-ins-buf-prefix'. The entire message will be inserted if
(delete-windows-on mh-show-buffer))
(set-buffer mh-show-buffer) ; Find displayed message
(let ((mh-ins-str
- (if mime::preview/article-buffer
- (let (mime-view-plain-text-preview-hook buf)
+ (if mime-raw-buffer
+ (let (mime-preview-text/plain-hook buf)
(prog1
(save-window-excursion
- (set-buffer mime::preview/article-buffer)
+ (set-buffer mime-raw-buffer)
(setq buf (mime-view-mode))
(buffer-string)
)