From: morioka Date: Wed, 21 Oct 1998 05:30:15 +0000 (+0000) Subject: Move function `mime-display-text/plain', `mime-display-text/enriched' X-Git-Tag: semi-1_10_0~7 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b1147cdb470f22f683ec2016c388aed94a3a328;p=elisp%2Fsemi.git Move function `mime-display-text/plain', `mime-display-text/enriched' and `mime-display-text/richtext' from mime-text to mime-view.el; abolish mime-text.el. --- diff --git a/SEMI-ELS b/SEMI-ELS index ff195ea..6ffa7fc 100644 --- a/SEMI-ELS +++ b/SEMI-ELS @@ -6,7 +6,7 @@ (setq semi-modules-to-compile '(signature - semi-def mime-view mime-text mime-play mime-partial mime-edit + semi-def mime-view mime-play mime-partial mime-edit semi-setup mail-mime-setup)) (setq semi-modules-not-to-compile nil) diff --git a/mime-text.el b/mime-text.el deleted file mode 100644 index 0bda122..0000000 --- a/mime-text.el +++ /dev/null @@ -1,72 +0,0 @@ -;;; mime-text.el --- mime-view content filter for text - -;; Copyright (C) 1994,1995,1996,1997,1998 Free Software Foundation, Inc. - -;; Author: MORIOKA Tomohiko -;; Keywords: text, MIME, multimedia, mail, news - -;; This file is part of SEMI (Suite of Emacs MIME Interfaces). - -;; 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: - -(require 'mime-view) - - -;;; @ content filters for mime-text -;;; - -(defun mime-display-text/plain (entity situation) - (save-restriction - (narrow-to-region (point-max)(point-max)) - (mime-insert-text-content entity) - (run-hooks 'mime-text-decode-hook) - (goto-char (point-max)) - (if (not (eq (char-after (1- (point))) ?\n)) - (insert "\n") - ) - (mime-add-url-buttons) - (run-hooks 'mime-display-text/plain-hook) - )) - -(defun mime-display-text/richtext (entity situation) - (save-restriction - (narrow-to-region (point-max)(point-max)) - (mime-insert-text-content entity) - (run-hooks 'mime-text-decode-hook) - (let ((beg (point-min))) - (remove-text-properties beg (point-max) '(face nil)) - (richtext-decode beg (point-max)) - ))) - -(defun mime-display-text/enriched (entity situation) - (save-restriction - (narrow-to-region (point-max)(point-max)) - (mime-insert-text-content entity) - (run-hooks 'mime-text-decode-hook) - (let ((beg (point-min))) - (remove-text-properties beg (point-max) '(face nil)) - (enriched-decode beg (point-max)) - ))) - - -;;; @ end -;;; - -(provide 'mime-text) - -;;; mime-text.el ends here diff --git a/mime-view.el b/mime-view.el index 12809cf..7ef1485 100644 --- a/mime-view.el +++ b/mime-view.el @@ -421,9 +421,38 @@ Each elements are regexp of field-name.") ;;; @@@ entity presentation ;;; -(autoload 'mime-display-text/plain "mime-text") -(autoload 'mime-display-text/enriched "mime-text") -(autoload 'mime-display-text/richtext "mime-text") +(defun mime-display-text/plain (entity situation) + (save-restriction + (narrow-to-region (point-max)(point-max)) + (mime-insert-text-content entity) + (run-hooks 'mime-text-decode-hook) + (goto-char (point-max)) + (if (not (eq (char-after (1- (point))) ?\n)) + (insert "\n") + ) + (mime-add-url-buttons) + (run-hooks 'mime-display-text/plain-hook) + )) + +(defun mime-display-text/richtext (entity situation) + (save-restriction + (narrow-to-region (point-max)(point-max)) + (mime-insert-text-content entity) + (run-hooks 'mime-text-decode-hook) + (let ((beg (point-min))) + (remove-text-properties beg (point-max) '(face nil)) + (richtext-decode beg (point-max)) + ))) + +(defun mime-display-text/enriched (entity situation) + (save-restriction + (narrow-to-region (point-max)(point-max)) + (mime-insert-text-content entity) + (run-hooks 'mime-text-decode-hook) + (let ((beg (point-min))) + (remove-text-properties beg (point-max) '(face nil)) + (enriched-decode beg (point-max)) + ))) (defvar mime-view-announcement-for-message/partial (if (and (>= emacs-major-version 19) window-system)