X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=tm-rich.el;h=447f61b6d7591841a469f95d8fbbb534b64d4783;hb=3fe76b044cf6350e4fddadbc8e3c12af0a97866b;hp=6968a318f429b48d328859dd4d4238fbbaefa34e;hpb=769476d363d9780208eac36abd53939cff8819d6;p=elisp%2Ftm.git diff --git a/tm-rich.el b/tm-rich.el index 6968a31..447f61b 100644 --- a/tm-rich.el +++ b/tm-rich.el @@ -3,27 +3,33 @@ ;;; richtext filter for tm-view ;;; ;;; Copyright (C) 1995 Free Software Foundation, Inc. -;;; Copyright (C) 1994,1995 MORIOKA Tomohiko +;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-rich.el,v 6.14 1995/09/21 00:18:32 morioka Exp $ +;;; $Id: tm-rich.el,v 7.5 1996/05/07 06:28:36 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia, richtext, enriched ;;; ;;; 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. +;;; +;;; Code: (require 'tm-view) -(defvar tm-rich/richtext-module - (if (or (< emacs-major-version 19) - (and (= emacs-major-version 19) - (< emacs-minor-version 29)) - ) - 'tinyrich - 'richtext)) -(require tm-rich/richtext-module) - ;;; @ content filters for tm-view ;;; @@ -32,18 +38,12 @@ (let* ((mode mime::preview/original-major-mode) (m (assq mode mime-viewer/code-converter-alist)) (charset (assoc "charset" params)) - ;; 1995/9/21 + ;; 1995/9/21 (c.f. tm-eng:105), 1995/10/3 (c.f. tm-eng:121) ;; modified by Eric Ding - ;; (c.f. tm-eng:105) (beg (point-min)) (end (point-max)) ) - (cond ((string= encoding "quoted-printable") - (quoted-printable-decode-region beg end) - ) - ((string= encoding "base64") - (base64-decode-region beg end) - )) - ;; end + (remove-text-properties beg end '(face nil)) + (mime/decode-region encoding beg end) (if (and m (fboundp (setq m (cdr m)))) (funcall m beg (point-max) charset encoding) (mime-viewer/default-code-convert-region beg (point-max) @@ -56,18 +56,12 @@ (let* ((mode mime::preview/original-major-mode) (m (assq mode mime-viewer/code-converter-alist)) (charset (assoc "charset" params)) - ;; 1995/9/21 + ;; 1995/9/21 (c.f. tm-eng:105), 1995/10/3 (c.f. tm-eng:121) ;; modified by Eric Ding - ;; (c.f. tm-eng:105) (beg (point-min)) (end (point-max)) ) - (cond ((string= encoding "quoted-printable") - (quoted-printable-decode-region beg end) - ) - ((string= encoding "base64") - (base64-decode-region beg end) - )) - ;; end + (remove-text-properties beg end '(face nil)) + (mime/decode-region encoding beg end) (if (and m (fboundp (setq m (cdr m)))) (funcall m beg (point-max) charset encoding) (mime-viewer/default-code-convert-region beg (point-max) @@ -87,6 +81,11 @@ "text/enriched" (function mime-viewer/filter-text/enriched)) -(run-hooks 'tm-rich-load-hook) +;;; @ end +;;; (provide 'tm-rich) + +(run-hooks 'tm-rich-load-hook) + +;;; tm-rich.el ends here