(mime-write-entity): Change message to `write-with-header'.
[elisp/flim.git] / mel-g.el
index 1f50bd0..73db30f 100644 (file)
--- a/mel-g.el
+++ b/mel-g.el
@@ -1,16 +1,15 @@
 ;;; mel-g.el: Gzip64 encoder/decoder for GNU Emacs
 
-;; Copyright (C) 1995,1996,1997 MORIOKA Tomohiko
-;; Copyright (C) 1996 Shuhei KOBAYASHI
+;; Copyright (C) 1995,1996,1997,1998 MORIOKA Tomohiko
+;; Copyright (C) 1996,1997 Shuhei KOBAYASHI
 
 ;; Author: Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp>
 ;;     modified by MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Maintainer: Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp>
 ;; Created: 1995/10/25
-;; Version: $Id: mel-g.el,v 6.1 1997/03/10 13:06:34 morioka Exp $
 ;; Keywords: Gzip64, base64, gzip, MIME
 
-;; This file is not part of MEL (MIME Encoding Library) yet.
+;; This file is part of MEL (MIME Encoding Library).
 
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
+;;; NOTE: Gzip64 is an experimental Content-Transfer-Encoding and its
+;;; use is STRONGLY DISCOURAGED except for private communication.
+
 ;;; Code:
 
 (require 'emu)
-(require 'file-detect)
+(require 'path-util)
 
 
 ;;; @ variables
         (cdr gzip64-external-encoder))
   )
 
+(defun gzip64-write-decoded-region (start end filename)
+  "Decode and write current region encoded by gzip64 into FILENAME.
+START and END are buffer positions."
+  (interactive
+   (list (region-beginning) (region-end)
+        (read-file-name "Write decoded region to file: ")))
+  (as-binary-process
+   (apply (function call-process-region)
+         start end (car gzip64-external-decoder)
+         nil nil nil
+         (let ((args (cdr gzip64-external-decoder)))
+           (append (butlast args)
+                   (list (concat (car (last args)) ">" filename))))
+         )))
+
 
 ;;; @ end
 ;;;