comparison lisp/packages/jka-compr.el @ 120:cca96a509cfe r20-1b12

Import from CVS: tag r20-1b12
author cvs
date Mon, 13 Aug 2007 09:25:29 +0200
parents fe104dbd9147
children 1856695b1fa9
comparison
equal deleted inserted replaced
119:d101af7320b8 120:cca96a509cfe
99 ;; probably got some ideas from it. 99 ;; probably got some ideas from it.
100 ;; 100 ;;
101 101
102 ;;; Code: 102 ;;; Code:
103 103
104 (defvar jka-compr-shell "sh" 104 (defgroup compression nil
105 "Data compression utilities"
106 :group 'data)
107
108 (defgroup jka-compr nil
109 "jka-compr customization"
110 :group 'compression)
111
112
113 (defcustom jka-compr-shell "sh"
105 "*Shell to be used for calling compression programs. 114 "*Shell to be used for calling compression programs.
106 The value of this variable only matters if you want to discard the 115 The value of this variable only matters if you want to discard the
107 stderr of a compression/decompression program (see the documentation 116 stderr of a compression/decompression program (see the documentation
108 for `jka-compr-compression-info-list').") 117 for `jka-compr-compression-info-list')."
109 118 :type 'string
119 :group 'jka-compr)
110 120
111 (defvar jka-compr-use-shell t) 121 (defvar jka-compr-use-shell t)
112 122
113 123
114 ;;; I have this defined so that .Z files are assumed to be in unix 124 ;;; I have this defined so that .Z files are assumed to be in unix
115 ;;; compress format; and .gz files, in gzip format. 125 ;;; compress format; and .gz files, in gzip format.
116 (defvar jka-compr-compression-info-list 126 (defcustom jka-compr-compression-info-list
117 ;;[regexp 127 ;;[regexp
118 ;; compr-message compr-prog compr-args 128 ;; compr-message compr-prog compr-args
119 ;; uncomp-message uncomp-prog uncomp-args 129 ;; uncomp-message uncomp-prog uncomp-args
120 ;; can-append auto-mode-flag] 130 ;; can-append auto-mode-flag]
121 '(["\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'" 131 '(["\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'"
160 auto-mode flag non-nil means strip the regexp from file names 170 auto-mode flag non-nil means strip the regexp from file names
161 before attempting to set the mode. 171 before attempting to set the mode.
162 172
163 Because of the way `call-process' is defined, discarding the stderr output of 173 Because of the way `call-process' is defined, discarding the stderr output of
164 a program adds the overhead of starting a shell each time the program is 174 a program adds the overhead of starting a shell each time the program is
165 invoked.") 175 invoked."
176 :type '(repeat (vector regexp
177 (choice :tag "Compress Message"
178 (string :format "%v")
179 (const :tag "No Message" nil))
180 (string :tag "Compress Program")
181 (repeat :tag "Compress Arguments" string)
182 (choice :tag "Uncompress Message"
183 (string :format "%v")
184 (const :tag "No Message" nil))
185 (string :tag "Uncompress Program")
186 (repeat :tag "Uncompress Arguments" string)
187 (boolean :tag "Append")
188 (boolean :tag "Auto Mode")))
189 :group 'jka-compr)
166 190
167 (defvar jka-compr-mode-alist-additions 191 (defvar jka-compr-mode-alist-additions
168 (list (cons "\\.tgz\\'" 'tar-mode)) 192 (list (cons "\\.tgz\\'" 'tar-mode))
169 "A list of pairs to add to auto-mode-alist when jka-compr is installed.") 193 "A list of pairs to add to auto-mode-alist when jka-compr is installed.")
170 194
315 339
316 340
317 ;;; Support for temp files. Much of this was inspired if not lifted 341 ;;; Support for temp files. Much of this was inspired if not lifted
318 ;;; from ange-ftp. 342 ;;; from ange-ftp.
319 343
320 (defvar jka-compr-temp-name-template 344 (defcustom jka-compr-temp-name-template
321 "/tmp/jka-com" 345 "/tmp/jka-com"
322 "Prefix added to all temp files created by jka-compr. 346 "Prefix added to all temp files created by jka-compr.
323 There should be no more than seven characters after the final `/'") 347 There should be no more than seven characters after the final `/'"
348 :type 'string
349 :group 'jka-compr)
324 350
325 (defvar jka-compr-temp-name-table (make-vector 31 nil)) 351 (defvar jka-compr-temp-name-table (make-vector 31 nil))
326 352
327 (defun jka-compr-make-temp-name (&optional local-copy) 353 (defun jka-compr-make-temp-name (&optional local-copy)
328 "This routine will return the name of a new file." 354 "This routine will return the name of a new file."