Mercurial > emacs
comparison lisp/jka-compr.el @ 17411:f0ff96a35eb8
Add defgroup's; use defcustom for user vars.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 12 Apr 1997 03:18:33 +0000 |
parents | 6d680b18a47b |
children | 41a10d128e3b |
comparison
equal
deleted
inserted
replaced
17410:777a31320b0f | 17411:f0ff96a35eb8 |
---|---|
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, 1995, 1997 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. |
97 ;; probably got some ideas from it. | 97 ;; probably got some ideas from it. |
98 ;; | 98 ;; |
99 | 99 |
100 ;;; Code: | 100 ;;; Code: |
101 | 101 |
102 (defvar jka-compr-shell "sh" | 102 (defgroup compression nil |
103 "Data compression utilities" | |
104 :group 'data) | |
105 | |
106 (defgroup jka-compr nil | |
107 "jka-compr customization" | |
108 :group 'compression) | |
109 | |
110 | |
111 (defcustom jka-compr-shell "sh" | |
103 "*Shell to be used for calling compression programs. | 112 "*Shell to be used for calling compression programs. |
104 The value of this variable only matters if you want to discard the | 113 The value of this variable only matters if you want to discard the |
105 stderr of a compression/decompression program (see the documentation | 114 stderr of a compression/decompression program (see the documentation |
106 for `jka-compr-compression-info-list').") | 115 for `jka-compr-compression-info-list')." |
107 | 116 :type 'string |
117 :group 'jka-compr) | |
108 | 118 |
109 (defvar jka-compr-use-shell t) | 119 (defvar jka-compr-use-shell t) |
110 | 120 |
111 | 121 |
112 ;;; I have this defined so that .Z files are assumed to be in unix | 122 ;;; I have this defined so that .Z files are assumed to be in unix |
113 ;;; compress format; and .gz files, in gzip format. | 123 ;;; compress format; and .gz files, in gzip format. |
114 (defvar jka-compr-compression-info-list | 124 (defcustom jka-compr-compression-info-list |
115 ;;[regexp | 125 ;;[regexp |
116 ;; compr-message compr-prog compr-args | 126 ;; compr-message compr-prog compr-args |
117 ;; uncomp-message uncomp-prog uncomp-args | 127 ;; uncomp-message uncomp-prog uncomp-args |
118 ;; can-append auto-mode-flag] | 128 ;; can-append auto-mode-flag] |
119 '(["\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'" | 129 '(["\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'" |
158 auto-mode flag non-nil means strip the regexp from file names | 168 auto-mode flag non-nil means strip the regexp from file names |
159 before attempting to set the mode. | 169 before attempting to set the mode. |
160 | 170 |
161 Because of the way `call-process' is defined, discarding the stderr output of | 171 Because of the way `call-process' is defined, discarding the stderr output of |
162 a program adds the overhead of starting a shell each time the program is | 172 a program adds the overhead of starting a shell each time the program is |
163 invoked.") | 173 invoked." |
174 :type '(repeat (vector regexp | |
175 (choice :tag "Compress Message" | |
176 (string :format "%v") | |
177 (const :tag "No Message" nil)) | |
178 (string :tag "Compress Program") | |
179 (repeat :tag "Compress Arguments" string) | |
180 (choice :tag "Uncompress Message" | |
181 (string :format "%v") | |
182 (const :tag "No Message" nil)) | |
183 (string :tag "Uncompress Program") | |
184 (repeat :tag "Uncompress Arguments" string) | |
185 (boolean :tag "Append") | |
186 (boolean :tag "Auto Mode"))) | |
187 :group 'jka-compr) | |
164 | 188 |
165 (defvar jka-compr-mode-alist-additions | 189 (defvar jka-compr-mode-alist-additions |
166 (list (cons "\\.tgz\\'" 'tar-mode)) | 190 (list (cons "\\.tgz\\'" 'tar-mode)) |
167 "A list of pairs to add to auto-mode-alist when jka-compr is installed.") | 191 "A list of pairs to add to auto-mode-alist when jka-compr is installed.") |
168 | 192 |
310 | 334 |
311 | 335 |
312 ;;; Support for temp files. Much of this was inspired if not lifted | 336 ;;; Support for temp files. Much of this was inspired if not lifted |
313 ;;; from ange-ftp. | 337 ;;; from ange-ftp. |
314 | 338 |
315 (defvar jka-compr-temp-name-template | 339 (defcustom jka-compr-temp-name-template |
316 (expand-file-name "jka-com" | 340 (expand-file-name "jka-com" |
317 (or (getenv "TMPDIR") "/tmp/")) | 341 (or (getenv "TMPDIR") "/tmp/")) |
318 "Prefix added to all temp files created by jka-compr. | 342 There should be no more than seven characters after the final `/'." |
319 There should be no more than seven characters after the final `/'") | 343 :type 'string |
344 :group 'jka-compr) | |
320 | 345 |
321 (defvar jka-compr-temp-name-table (make-vector 31 nil)) | 346 (defvar jka-compr-temp-name-table (make-vector 31 nil)) |
322 | 347 |
323 (defun jka-compr-make-temp-name (&optional local-copy) | 348 (defun jka-compr-make-temp-name (&optional local-copy) |
324 "This routine will return the name of a new file." | 349 "This routine will return the name of a new file." |