Mercurial > emacs
comparison lisp/jka-compr.el @ 14169:83f275dcd93a
Update FSF's address.
author | Erik Naggum <erik@naggum.no> |
---|---|
date | Sun, 14 Jan 1996 07:34:30 +0000 |
parents | 37c5ece37d71 |
children | 285482e8df41 |
comparison
equal
deleted
inserted
replaced
14168:3b925cc52931 | 14169:83f275dcd93a |
---|---|
1 ;;; jka-compr.el --- reading/writing/loading compressed files | 1 ;;; jka-compr.el --- reading/writing/loading compressed files |
2 | 2 |
3 ;;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: jka@ece.cmu.edu (Jay K. Adams) | 5 ;; Author: jka@ece.cmu.edu (Jay K. Adams) |
6 ;; Keywords: data | 6 ;; Keywords: data |
7 | 7 |
8 ;; This file is part of GNU Emacs. | 8 ;; This file is part of GNU Emacs. |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | 16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 ;; GNU General Public License for more details. | 18 ;; GNU General Public License for more details. |
19 | 19 |
20 ;; You should have received a copy of the GNU General Public License | 20 ;; You should have received a copy of the GNU General Public License |
21 ;; along with GNU Emacs; see the file COPYING. If not, write to | 21 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
23 ;; Boston, MA 02111-1307, USA. | |
23 | 24 |
24 ;;; Commentary: | 25 ;;; Commentary: |
25 | 26 |
26 ;;; This package implements low-level support for reading, writing, | 27 ;; This package implements low-level support for reading, writing, |
27 ;;; and loading compressed files. It hooks into the low-level file | 28 ;; and loading compressed files. It hooks into the low-level file |
28 ;;; I/O functions (including write-region and insert-file-contents) so | 29 ;; I/O functions (including write-region and insert-file-contents) so |
29 ;;; that they automatically compress or uncompress a file if the file | 30 ;; that they automatically compress or uncompress a file if the file |
30 ;;; appears to need it (based on the extension of the file name). | 31 ;; appears to need it (based on the extension of the file name). |
31 ;;; Packages like Rmail, VM, GNUS, and Info should be able to work | 32 ;; Packages like Rmail, VM, GNUS, and Info should be able to work |
32 ;;; with compressed files without modification. | 33 ;; with compressed files without modification. |
33 | 34 |
34 | 35 |
35 ;;; INSTRUCTIONS: | 36 ;; INSTRUCTIONS: |
36 ;;; | 37 ;; |
37 ;;; To use jka-compr, simply load this package, and edit as usual. | 38 ;; To use jka-compr, simply load this package, and edit as usual. |
38 ;;; Its operation should be transparent to the user (except for | 39 ;; Its operation should be transparent to the user (except for |
39 ;;; messages appearing when a file is being compressed or | 40 ;; messages appearing when a file is being compressed or |
40 ;;; uncompressed). | 41 ;; uncompressed). |
41 ;;; | 42 ;; |
42 ;;; The variable, jka-compr-compression-info-list can be used to | 43 ;; The variable, jka-compr-compression-info-list can be used to |
43 ;;; customize jka-compr to work with other compression programs. | 44 ;; customize jka-compr to work with other compression programs. |
44 ;;; The default value of this variable allows jka-compr to work with | 45 ;; The default value of this variable allows jka-compr to work with |
45 ;;; Unix compress and gzip. | 46 ;; Unix compress and gzip. |
46 ;;; | 47 ;; |
47 ;;; If you are concerned about the stderr output of gzip and other | 48 ;; If you are concerned about the stderr output of gzip and other |
48 ;;; compression/decompression programs showing up in your buffers, you | 49 ;; compression/decompression programs showing up in your buffers, you |
49 ;;; should set the discard-error flag in the compression-info-list. | 50 ;; should set the discard-error flag in the compression-info-list. |
50 ;;; This will cause the stderr of all programs to be discarded. | 51 ;; This will cause the stderr of all programs to be discarded. |
51 ;;; However, it also causes emacs to call compression/uncompression | 52 ;; However, it also causes emacs to call compression/uncompression |
52 ;;; programs through a shell (which is specified by jka-compr-shell). | 53 ;; programs through a shell (which is specified by jka-compr-shell). |
53 ;;; This may be a drag if, on your system, starting up a shell is | 54 ;; This may be a drag if, on your system, starting up a shell is |
54 ;;; slow. | 55 ;; slow. |
55 ;;; | 56 ;; |
56 ;;; If you don't want messages about compressing and decompressing | 57 ;; If you don't want messages about compressing and decompressing |
57 ;;; to show up in the echo area, you can set the compress-name and | 58 ;; to show up in the echo area, you can set the compress-name and |
58 ;;; decompress-name fields of the jka-compr-compression-info-list to | 59 ;; decompress-name fields of the jka-compr-compression-info-list to |
59 ;;; nil. | 60 ;; nil. |
60 | 61 |
61 | 62 |
62 ;;; APPLICATION NOTES: | 63 ;; APPLICATION NOTES: |
63 ;;; | 64 ;; |
64 ;;; crypt++ | 65 ;; crypt++ |
65 ;;; jka-compr can coexist with crpyt++ if you take all the decompression | 66 ;; jka-compr can coexist with crpyt++ if you take all the decompression |
66 ;;; entries out of the crypt-encoding-list. Clearly problems will arise if | 67 ;; entries out of the crypt-encoding-list. Clearly problems will arise if |
67 ;;; you have two programs trying to compress/decompress files. jka-compr | 68 ;; you have two programs trying to compress/decompress files. jka-compr |
68 ;;; will not "work with" crypt++ in the following sense: you won't be able to | 69 ;; will not "work with" crypt++ in the following sense: you won't be able to |
69 ;;; decode encrypted compressed files--that is, files that have been | 70 ;; decode encrypted compressed files--that is, files that have been |
70 ;;; compressed then encrypted (in that order). Theoretically, crypt++ and | 71 ;; compressed then encrypted (in that order). Theoretically, crypt++ and |
71 ;;; jka-compr could properly handle a file that has been encrypted then | 72 ;; jka-compr could properly handle a file that has been encrypted then |
72 ;;; compressed, but there is little point in trying to compress an encrypted | 73 ;; compressed, but there is little point in trying to compress an encrypted |
73 ;;; file. | 74 ;; file. |
74 ;;; | 75 ;; |
75 | 76 |
76 | 77 |
77 ;;; ACKNOWLEDGMENTS | 78 ;; ACKNOWLEDGMENTS |
78 ;;; | 79 ;; |
79 ;;; jka-compr is a V19 adaptation of jka-compr for V18 of Emacs. Many people | 80 ;; jka-compr is a V19 adaptation of jka-compr for V18 of Emacs. Many people |
80 ;;; have made helpful suggestions, reported bugs, and even fixed bugs in | 81 ;; have made helpful suggestions, reported bugs, and even fixed bugs in |
81 ;;; jka-compr. I recall the following people as being particularly helpful. | 82 ;; jka-compr. I recall the following people as being particularly helpful. |
82 ;;; | 83 ;; |
83 ;;; Jean-loup Gailly | 84 ;; Jean-loup Gailly |
84 ;;; David Hughes | 85 ;; David Hughes |
85 ;;; Richard Pieri | 86 ;; Richard Pieri |
86 ;;; Daniel Quinlan | 87 ;; Daniel Quinlan |
87 ;;; Chris P. Ross | 88 ;; Chris P. Ross |
88 ;;; Rick Sladkey | 89 ;; Rick Sladkey |
89 ;;; | 90 ;; |
90 ;;; Andy Norman's ange-ftp was the inspiration for the original jka-compr for | 91 ;; Andy Norman's ange-ftp was the inspiration for the original jka-compr for |
91 ;;; Version 18 of Emacs. | 92 ;; Version 18 of Emacs. |
92 ;;; | 93 ;; |
93 ;;; After I had made progress on the original jka-compr for V18, I learned of a | 94 ;; After I had made progress on the original jka-compr for V18, I learned of a |
94 ;;; package written by Kazushi Jam Marukawa, called jam-zcat, that did exactly | 95 ;; package written by Kazushi Jam Marukawa, called jam-zcat, that did exactly |
95 ;;; what I was trying to do. I looked over the jam-zcat source code and | 96 ;; what I was trying to do. I looked over the jam-zcat source code and |
96 ;;; probably got some ideas from it. | 97 ;; probably got some ideas from it. |
97 ;;; | 98 ;; |
98 | 99 |
99 ;;; Code: | 100 ;;; Code: |
100 | 101 |
101 (defvar jka-compr-shell "sh" | 102 (defvar jka-compr-shell "sh" |
102 "*Shell to be used for calling compression programs. | 103 "*Shell to be used for calling compression programs. |