From: morioka Date: Wed, 11 Mar 1998 16:48:35 +0000 (+0000) Subject: (gzip64-write-decoded-region): New function. X-Git-Tag: mel-7_2~5 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98aa301b8b00f7ff51993a8d7b975e51d6cd0aa3;p=elisp%2Fflim.git (gzip64-write-decoded-region): New function. --- diff --git a/mel-g.el b/mel-g.el index 4a6714c..73db30f 100644 --- a/mel-g.el +++ b/mel-g.el @@ -1,13 +1,12 @@ ;;; mel-g.el: Gzip64 encoder/decoder for GNU Emacs -;; Copyright (C) 1995,1996,1997 MORIOKA Tomohiko +;; Copyright (C) 1995,1996,1997,1998 MORIOKA Tomohiko ;; Copyright (C) 1996,1997 Shuhei KOBAYASHI ;; Author: Shuhei KOBAYASHI ;; modified by MORIOKA Tomohiko ;; Maintainer: Shuhei KOBAYASHI ;; Created: 1995/10/25 -;; Version: $Id: mel-g.el,v 7.1 1997/11/06 16:08:20 morioka Exp $ ;; Keywords: Gzip64, base64, gzip, MIME ;; This file is part of MEL (MIME Encoding Library). @@ -97,6 +96,21 @@ (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 ;;;