Mercurial > emacs
comparison lisp/info.el @ 34503:00d3d092888c
(Info-suffix-list): Change format for a command that
requires arguments.
(info-insert-file-contents): Adjusted for the above change.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 13 Dec 2000 00:14:52 +0000 |
parents | 7ae9e37868e6 |
children | 9283cc675c49 |
comparison
equal
deleted
inserted
replaced
34502:1e95dcc56171 | 34503:00d3d092888c |
---|---|
172 ;; The MS-DOS list should work both when long file names are | 172 ;; The MS-DOS list should work both when long file names are |
173 ;; supported (Windows 9X), and when only 8+3 file names are available. | 173 ;; supported (Windows 9X), and when only 8+3 file names are available. |
174 (if (eq system-type 'ms-dos) | 174 (if (eq system-type 'ms-dos) |
175 '( (".gz" . "gunzip") | 175 '( (".gz" . "gunzip") |
176 (".z" . "gunzip") | 176 (".z" . "gunzip") |
177 (".bz2" . "bzip2 -dc") | 177 (".bz2" . ("bzip2" "-dc")) |
178 (".inz" . "gunzip") | 178 (".inz" . "gunzip") |
179 (".igz" . "gunzip") | 179 (".igz" . "gunzip") |
180 (".info.Z" . "gunzip") | 180 (".info.Z" . "gunzip") |
181 (".info.gz" . "gunzip") | 181 (".info.gz" . "gunzip") |
182 ("-info.Z" . "gunzip") | 182 ("-info.Z" . "gunzip") |
190 ("" . nil)) | 190 ("" . nil)) |
191 '( (".info.Z". "uncompress") | 191 '( (".info.Z". "uncompress") |
192 (".info.Y". "unyabba") | 192 (".info.Y". "unyabba") |
193 (".info.gz". "gunzip") | 193 (".info.gz". "gunzip") |
194 (".info.z". "gunzip") | 194 (".info.z". "gunzip") |
195 (".info.bz2" . "bzip2 -dc") | 195 (".info.bz2" . ("bzip2" "-dc")) |
196 (".info". nil) | 196 (".info". nil) |
197 ("-info.Z". "uncompress") | 197 ("-info.Z". "uncompress") |
198 ("-info.Y". "unyabba") | 198 ("-info.Y". "unyabba") |
199 ("-info.gz". "gunzip") | 199 ("-info.gz". "gunzip") |
200 ("-info.bz2" . "bzip2 -dc") | 200 ("-info.bz2" . ("bzip2" "-dc")) |
201 ("-info.z". "gunzip") | 201 ("-info.z". "gunzip") |
202 ("-info". nil) | 202 ("-info". nil) |
203 ("/index.Z". "uncompress") | 203 ("/index.Z". "uncompress") |
204 ("/index.Y". "unyabba") | 204 ("/index.Y". "unyabba") |
205 ("/index.gz". "gunzip") | 205 ("/index.gz". "gunzip") |
206 ("/index.z". "gunzip") | 206 ("/index.z". "gunzip") |
207 ("/index.bz2". "bzip2 -dc") | 207 ("/index.bz2". ("bzip2" "-dc")) |
208 ("/index". nil) | 208 ("/index". nil) |
209 (".Z". "uncompress") | 209 (".Z". "uncompress") |
210 (".Y". "unyabba") | 210 (".Y". "unyabba") |
211 (".gz". "gunzip") | 211 (".gz". "gunzip") |
212 (".z". "gunzip") | 212 (".z". "gunzip") |
213 (".bz2" . "bzip2 -dc") | 213 (".bz2" . ("bzip2" "-dc")) |
214 ("". nil))) | 214 ("". nil))) |
215 "List of file name suffixes and associated decoding commands. | 215 "List of file name suffixes and associated decoding commands. |
216 Each entry should be (SUFFIX . STRING); the file is given to | 216 Each entry should be (SUFFIX . STRING); the file is given to |
217 the command as standard input. If STRING is nil, no decoding is done. | 217 the command as standard input. |
218 | |
219 STRING may be a list of strings. In that case, the first element is | |
220 the command name, and the rest are arguments to that command. | |
221 | |
222 If STRING is nil, no decoding is done. | |
218 Because the SUFFIXes are tried in order, the empty string should | 223 Because the SUFFIXes are tried in order, the empty string should |
219 be last in the list.") | 224 be last in the list.") |
220 | 225 |
221 ;; Concatenate SUFFIX onto FILENAME. SUFFIX should start with a dot. | 226 ;; Concatenate SUFFIX onto FILENAME. SUFFIX should start with a dot. |
222 ;; First, on ms-dos, delete some of the extension in FILENAME | 227 ;; First, on ms-dos, delete some of the extension in FILENAME |
282 (insert-file-contents-literally fullname visit) | 287 (insert-file-contents-literally fullname visit) |
283 (let ((buffer-read-only nil) | 288 (let ((buffer-read-only nil) |
284 (coding-system-for-write 'no-conversion) | 289 (coding-system-for-write 'no-conversion) |
285 (default-directory (or (file-name-directory fullname) | 290 (default-directory (or (file-name-directory fullname) |
286 default-directory))) | 291 default-directory))) |
287 (call-process-region (point-min) (point-max) decoder t t))) | 292 (or (consp decoder) |
293 (setq decoder (list decoder))) | |
294 (apply 'call-process-region (point-min) (point-max) | |
295 (car decoder) t t nil (cdr decoder)))) | |
288 (insert-file-contents fullname visit)))) | 296 (insert-file-contents fullname visit)))) |
289 | 297 |
290 (defun info-initialize () | 298 (defun info-initialize () |
291 "Initialize `Info-directory-list', if that hasn't been done yet." | 299 "Initialize `Info-directory-list', if that hasn't been done yet." |
292 (unless Info-directory-list | 300 (unless Info-directory-list |