Rename `mime-view-original-major-mode' ->
[elisp/semi.git] / mime-text.el
index ce93088..7b63a9d 100644 (file)
@@ -1,13 +1,11 @@
 ;;; mime-text.el --- mime-view content filter for text
 
-;; Copyright (C) 1994,1995,1996,1997 Free Software Foundation, Inc.
+;; Copyright (C) 1994,1995,1996,1997,1998 Free Software Foundation, Inc.
 
 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version:
-;;     $Id: mime-text.el,v 0.22 1997-03-18 15:12:10 morioka Exp $
 ;; Keywords: text, MIME, multimedia, mail, news
 
-;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
+;; 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
@@ -86,6 +84,10 @@ CHARSET.  CHARSET is SYMBOL and ENCODING is nil or STRING.
 It calls text decoder for MIME charset specified by buffer local
 variable `mime-text-decoder' and variable `mime-text-decoder-alist'."
   (mime-decode-region (point-min) (point-max) encoding)
+  (goto-char (point-min))
+  (while (search-forward "\r\n" nil t)
+    (replace-match "\n")
+    )
   (let ((text-decoder
         (save-excursion
           (set-buffer mime-raw-buffer)
@@ -121,7 +123,7 @@ variable `mime-text-decoder' and variable `mime-text-decoder-alist'."
 ;;; @ content filters for mime-text
 ;;;
 
-(defun mime-preview/filter-for-text/plain (ctype params encoding)
+(defun mime-view-filter-for-text/plain (ctype params encoding)
   (mime-decode-text-body (cdr (assoc "charset" params)) encoding)
   (goto-char (point-max))
   (if (not (eq (char-after (1- (point))) ?\n))
@@ -140,7 +142,7 @@ variable `mime-text-decoder' and variable `mime-text-decoder-alist'."
   (run-hooks 'mime-view-plain-text-preview-hook)
   )
 
-(defun mime-preview/filter-for-text/richtext (ctype params encoding)
+(defun mime-view-filter-for-text/richtext (ctype params encoding)
   (let* ((charset (cdr (assoc "charset" params)))
         (beg (point-min))
         )
@@ -149,7 +151,7 @@ variable `mime-text-decoder' and variable `mime-text-decoder-alist'."
     (richtext-decode beg (point-max))
     ))
 
-(defun mime-preview/filter-for-text/enriched (ctype params encoding)
+(defun mime-view-filter-for-text/enriched (ctype params encoding)
   (let* ((charset (cdr (assoc "charset" params)))
         (beg (point-min))
         )