From: tomo Date: Tue, 19 Dec 2000 05:37:23 +0000 (+0000) Subject: Sync with semi21-1_14_0-pre4-1. X-Git-Tag: emh-1_14_0~6 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=54b8848da5c50d192e1e3b3d439f5a22a3722e6c;p=elisp%2Femh.git Sync with semi21-1_14_0-pre4-1. --- diff --git a/ChangeLog b/ChangeLog index 5b90ede..b325080 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2000-12-17 MORIOKA Tomohiko + + * emh-def.el: New file. + + * emh.el (mh-display-msg): Use `raw-text-insert-file-contents' + instead of `insert-file-contents-as-raw-text'; use + `mime-decode-header-in-buffer' instead of `eword-decode-header'. + (emh-request-partial-message): Use `raw-text-insert-file-contents' + instead of `insert-file-contents-as-raw-text'. + + * emh-face.el: Require `emh-def' and `std11'. + + * emh-comp.el: Require `emh-def'. + (emh-edit-again): Use `binary-insert-file-contents'; don't use + `as-binary-input-file'. + +2000-12-16 MORIOKA Tomohiko + + * emh-setup.el (emh-setup-mh-draft-setting): Use + `mime-decode-header-in-buffer' instead of `eword-decode-header'. + 2000-05-25 Tanaka Akira * README.en: Update for CVS via SSH. diff --git a/emh-comp.el b/emh-comp.el index 1fa22f5..c50233c 100644 --- a/emh-comp.el +++ b/emh-comp.el @@ -29,6 +29,7 @@ (require 'mh-comp) (require 'mime-edit) +(require 'emh-def) ;; Avoid byte compile warnings. ;; (defvar gnus-article-buffer) @@ -234,7 +235,7 @@ See also documentation for `\\[mh-send]' function." (mh-msg-filename msg mh-draft-folder) )) (set-buffer (get-buffer-create name)) - (as-binary-input-file (insert-file-contents filename)) + (binary-insert-file-contents filename) (setq buffer-file-name filename) ) (pop-to-buffer name) @@ -243,11 +244,11 @@ See also documentation for `\\[mh-send]' function." ) name)) (t - (let ((flag enable-multibyte-characters)) + (let ((flag enable-multibyte-characters) + (coding-system-for-read 'binary)) (prog1 - (as-binary-input-file - (mh-read-draft "clean-up" - (mh-msg-filename msg) nil)) + (mh-read-draft "clean-up" + (mh-msg-filename msg) nil) (set-buffer-multibyte flag) )) )))) diff --git a/emh-def.el b/emh-def.el new file mode 100644 index 0000000..cf80a48 --- /dev/null +++ b/emh-def.el @@ -0,0 +1,41 @@ +;;; emh-def.el --- definition for emh + +;; Copyright (C) 2000 Free Software Foundation, Inc. + +;; Author: MORIOKA Tomohiko +;; Keywords: mail composing, MH, MIME, mail + +;; This file is part of emh. + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Code: + +(or (fboundp 'find-face) + (defun find-face (face-or-name) + "Retrieve the face of the given name. +If FACE-OR-NAME is a face object, it is simply returned. +Otherwise, FACE-OR-NAME should be a symbol. If there is no such face, +nil is returned. Otherwise the associated face object is returned." + (car (memq face-or-name (face-list))))) + + +;;; @ end +;;; + +(provide 'emh-def) + +;;; emh-def.el ends here diff --git a/emh-face.el b/emh-face.el index 2014d23..17fc9a6 100644 --- a/emh-face.el +++ b/emh-face.el @@ -1,10 +1,9 @@ ;;; emh-face.el --- header highlighting in emh. -;; Copyright (C) 1997 MORIOKA Tomohiko +;; Copyright (C) 1997,2000 MORIOKA Tomohiko -;; Author: MORIOKA Tomohiko +;; Author: MORIOKA Tomohiko ;; Created: 1997/3/4 -;; Version: $Id: emh-face.el,v 0.5 1997-09-25 15:11:34 morioka Exp $ ;; Keywords: header, highlighting ;; This file is part of emh. @@ -26,21 +25,19 @@ ;;; Code: -(require 'emu) +(require 'emh-def) +(require 'std11) (defsubst emh-set-face-foreground (face color) (condition-case err (set-face-foreground face color) - (error (message "Color `%s' is not found." color)) - )) + (error (message "Color `%s' is not found." color)))) (defsubst emh-make-face-bold (face) - (set-face-font face (face-font 'bold)) - ) + (set-face-font face (face-font 'bold))) (defsubst emh-make-face-italic (face) - (set-face-font face (face-font 'italic)) - ) + (set-face-font face (face-font 'italic))) (or (find-face 'from-field-body) (progn diff --git a/emh-setup.el b/emh-setup.el index 2d8af82..5e64f05 100644 --- a/emh-setup.el +++ b/emh-setup.el @@ -42,7 +42,7 @@ (defun emh-setup-mh-draft-setting () (make-local-variable 'mail-header-separator) (setq mail-header-separator "--------") - (eword-decode-header nil mail-header-separator) + (mime-decode-header-in-buffer nil mail-header-separator) (let ((ua mime-edit-user-agent-value)) (make-local-variable 'mime-edit-user-agent-value) (setq mime-edit-user-agent-value (concat "EMH/" emh-version " " ua)) diff --git a/emh.el b/emh.el index 22a2d7e..084ffa2 100644 --- a/emh.el +++ b/emh.el @@ -104,7 +104,7 @@ nil, `emh-automatic-mime-preview' is used as default value." (set-buffer abuf) (set-buffer-multibyte nil) ) - (insert-file-contents-as-raw-text msg-filename) + (raw-text-insert-file-contents msg-filename) (set-buffer-modified-p nil) (setq buffer-read-only t) (setq buffer-file-name msg-filename) @@ -135,8 +135,7 @@ nil, `emh-automatic-mime-preview' is used as default value." (t (mh-start-of-uncleaned-message))) (if emh-decode-encoded-word - (eword-decode-header) - ) + (mime-decode-header-in-buffer)) (set-buffer-modified-p nil) (setq buffer-read-only t) (setq buffer-file-name msg-filename) @@ -287,7 +286,7 @@ digest are inserted into the folder after that message." (set-buffer (get-buffer-create " *Partial Article*")) (erase-buffer) (setq mime-preview-buffer show-buffer) - (insert-file-contents-as-raw-text msg-filename) + (raw-text-insert-file-contents msg-filename) (mime-parse-buffer) ))