From: morioka Date: Mon, 17 Mar 1997 04:41:21 +0000 (+0000) Subject: (mime-preview/decode-content, mime-article/decode-content): Add new X-Git-Tag: Hokutetsu-Ishikawa-new~106 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80dbd1355746ed75fee35a6cc51ce87a58c3b997;p=elisp%2Fsemi.git (mime-preview/decode-content, mime-article/decode-content): Add new optional argument `mode'. --- diff --git a/mime-play.el b/mime-play.el index 504ecdb..9514217 100644 --- a/mime-play.el +++ b/mime-play.el @@ -5,7 +5,7 @@ ;; Author: MORIOKA Tomohiko ;; Created: 1995/9/26 (separated from tm-view.el) ;; Renamed: 1997/2/21 from tm-play.el -;; Version: $Id: mime-play.el,v 0.18 1997-03-16 00:22:03 morioka Exp $ +;; Version: $Id: mime-play.el,v 0.19 1997-03-17 04:41:21 morioka Exp $ ;; Keywords: MIME, multimedia, mail, news ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -37,7 +37,7 @@ (defvar mime-preview/after-decoded-position nil) -(defun mime-preview/decode-content () +(defun mime-preview/decode-content (&optional mode) (interactive) (let ((pc (mime-preview/point-pcinfo (point)))) (if pc @@ -45,7 +45,7 @@ (setq mime-preview/after-decoded-position (point)) (set-buffer (mime::preview-content-info/buffer pc)) (mime-article/decode-content - (mime::preview-content-info/content-info pc)) + (mime::preview-content-info/content-info pc) mode) (if (eq (current-buffer) (mime::preview-content-info/buffer pc)) (progn @@ -54,7 +54,10 @@ )) )))) -(defun mime-article/decode-content (cinfo) +(defun mime-article/decode-content (cinfo &optional mode) + (or mode + (setq mode mime-view-decoding-mode) + ) (let ((beg (mime::content-info/point-min cinfo)) (end (mime::content-info/point-max cinfo)) (ctype (or (mime::content-info/type cinfo) "text/plain")) @@ -73,10 +76,8 @@ (cons 'encoding encoding) (cons 'major-mode major-mode) params)) - (if mime-view-decoding-mode - (setq cal (cons - (cons 'mode mime-view-decoding-mode) - cal)) + (if mode + (setq cal (cons (cons 'mode mode) cal)) ) (setq ret (mime/get-content-decoding-alist cal)) (setq method (cdr (assq 'method ret)))