;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Fri Aug 26 23:31:39 1994 ;;; from file /gd/gnu/emacs/19.0/lisp/jka-compr.el ;;; emacs version 19.25.94.8. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "`/gd/gnu/emacs/19.0/lisp/jka-compr.el' was compiled for Emacs 19")) (defvar jka-compr-shell "sh" "\ *Shell to be used for calling compression programs. The value of this variable only matters if you want to discard the stderr of a compression/decompression program (see the documentation for `jka-compr-compression-info-list').") (byte-code "!" [boundp jka-compr-use-shell t] 2) (defvar jka-compr-compression-info-list (quote (["\\.Z~?\\'" "compressing" "compress" ("-c") "uncompressing" "uncompress" ("-c") nil t] ["\\.gz~?\\'" "zipping" "gzip" ("-c" "-q") "unzipping" "gzip" ("-c" "-q" "-d") t t])) "\ List of vectors that describe available compression techniques. Each element, which describes a compression technique, is a vector of the form [REGEXP COMPRESS-MSG COMPRESS-PROGRAM COMPRESS-ARGS UNCOMPRESS-MSG UNCOMPRESS-PROGRAM UNCOMPRESS-ARGS APPEND-FLAG EXTENSION], where: regexp is a regexp that matches filenames that are compressed with this format compress-msg is the message to issue to the user when doing this type of compression (nil means no message) compress-program is a program that performs this compression compress-args is a list of args to pass to the compress program uncompress-msg is the message to issue to the user when doing this type of uncompression (nil means no message) uncompress-program is a program that performs this compression uncompress-args is a list of args to pass to the uncompress program append-flag is non-nil if this compression technique can be appended auto-mode flag non-nil means strip the regexp from file names before attempting to set the mode. Because of the way `call-process' is defined, discarding the stderr output of a program adds the overhead of starting a shell each time the program is invoked.") (defvar jka-compr-file-name-handler-entry nil "\ The entry in `file-name-handler-alist' used by the jka-compr I/O functions.") (byte-code "\"\"\"\"\"\"\"\"\"" [defalias jka-compr-info-regexp #[(info) "H" [info 0] 2] jka-compr-info-compress-message #[(info) "H" [info 1] 2] jka-compr-info-compress-program #[(info) "H" [info 2] 2] jka-compr-info-compress-args #[(info) "H" [info 3] 2] jka-compr-info-uncompress-message #[(info) "H" [info 4] 2] jka-compr-info-uncompress-program #[(info) "H" [info 5] 2] jka-compr-info-uncompress-args #[(info) "H" [info 6] 2] jka-compr-info-can-append #[(info) "H" [info 7] 2] jka-compr-info-strip-extension #[(info) "H" [info 8] 2]] 3) (defalias 'jka-compr-get-compression-info #[(filename) "" [compression-info (byte-code "\f\")" [nil case-fold-search mapcar #[(x) "\n! \" \n\"" [string-match jka-compr-info-regexp x filename throw compression-info] 3] jka-compr-compression-info-list] 3)] 2 "\ Return information about the compression scheme of FILENAME. The determination as to which compression scheme, if any, to use is based on the filename itself and `jka-compr-compression-info-list'."]) (byte-code "#!\"!\n!%\f" [put compression-error error-conditions (compression-error file-error error) boundp jka-compr-acceptable-retval-list (0 141) defalias jka-compr-error #[(prog args infile message &optional errfile) "!pq~ \n#\f$c ' !\nq !*\"\fE\"" [get-buffer-create " *jka-compr-error*" curbuf errbuf erase-buffer format "Error while executing \"%s %s < %s\"\n\n" prog mapconcat identity args " " infile errfile insert-file-contents display-buffer signal compression-error "Opening input file" "error %s" message] 8] jka-compr-dd-program "/bin/dd" jka-compr-dd-blocksize 256] 4) (defalias 'jka-compr-partial-uncompress #[(prog message args infile beg len) " \n _Z\f\f \\ T`  # \n 7 TP8&Ԏ&>] %)\fv \f\\\\`Wv \f\\\\`| \\|." [beg jka-compr-dd-blocksize skip prefix len count start jka-compr-make-temp-name err-file format "%s %s 2> %s | %s bs=%d skip=%d %s 2> /dev/null" prog mapconcat identity args " " jka-compr-dd-program "count=" "" run-string ((jka-compr-delete-temp-file err-file)) call-process jka-compr-shell infile t nil "-c" jka-compr-acceptable-retval-list jka-compr-error message] 10 "\ Call program PROG with ARGS args taking input from INFILE. Fourth and fifth args, BEG and LEN, specify which part of the output to keep: LEN chars starting BEG chars from the beginning."]) (defalias (quote jka-compr-call-process) #[(prog message infile output temp args) "G Î ;?\f#\n;0P1%&>E\f\n%*\f;Y[&!o\f$;pqed# q)" [jka-compr-use-shell jka-compr-make-temp-name err-file ((jka-compr-delete-temp-file err-file)) call-process jka-compr-shell infile output nil "-c" format "%s %s 2> %s %s" prog mapconcat identity args " " "> " "" jka-compr-acceptable-retval-list jka-compr-error message zerop apply temp cbuf write-region erase-buffer] 13]) (defvar jka-compr-temp-name-template "/tmp/jka-com" "\ Prefix added to all temp files created by jka-compr. There should be no more than seven characters after the final `/'") (byte-code "! \"ć" [boundp jka-compr-temp-name-table make-vector 31 nil] 3) (defalias 'jka-compr-make-temp-name #[(&optional local-copy) " PGS\n r  I !P\n\n\" N=\n!b TV\nT\nVX! S\nI ?#ɉ\n." [97 lastchar prevchar jka-compr-temp-name-template "aa" template lastpos t not-done nil file entry make-temp-name "#" intern jka-compr-temp-name-table active file-exists-p 122 error "Can't allocate temp file." put local-copy] 5 "\ This routine will return the name of a new file."]) (byte-code "\"\"\"\"" [defalias jka-compr-delete-temp-file #[(temp) "\n \"#Ǐ" [put intern temp jka-compr-temp-name-table active nil (delete-file temp) ((error))] 4] jka-compr-write-region #[(start end file &optional append visit) " ! ; !\n\f!J!!!!!!! \f!Љp!q~ q\n!\n!\"\n##Q#&#+#,-\"Q&qed\n\" q!# =\n1 . ;. 1\n1 ) =? =? ;D\f\". ЂW,-\n \"+" [expand-file-name file filename visit visit-file jka-compr-get-compression-info info jka-compr-info-can-append jka-compr-info-compress-program jka-compr-info-compress-message jka-compr-info-uncompress-program jka-compr-info-uncompress-message jka-compr-info-compress-args jka-compr-info-uncompress-args jka-compr-make-temp-name file-name-nondirectory nil temp-buffer cbuf base-name temp-file uncompress-args compress-args uncompress-message uncompress-program compress-message compress-program can-append get-buffer-create " *jka-compr-temp*" erase-buffer append file-exists-p file-local-copy local-copy local-file ((byte-code "!!" [local-copy file-exists-p delete-file] 2)) message "%s %s..." jka-compr-call-process " " "%s %s...done" jka-compr-run-real-handler write-region start end t dont jka-compr-delete-temp-file buffer-file-name set-visited-file-modtime "Wrote %s"] 12] jka-compr-insert-file-contents #[(file &optional visit beg end replace) " \n !!!\n\n!\n!\n!!C\"ωV `܎o#Ꮘ)  # 8B\". D \n*\"*" [barf-if-buffer-read-only beg end visit error "Attempt to visit less than an entire file" expand-file-name file filename jka-compr-get-compression-info info jka-compr-info-uncompress-message jka-compr-info-uncompress-program jka-compr-info-uncompress-args file-name-nondirectory nil jka-compr-run-real-handler file-local-copy start size local-file local-copy notfound base-name uncompress-args uncompress-program uncompress-message buffer-file-name ((byte-code "!!" [local-copy file-exists-p delete-file] 2)) message "%s %s..." error-code (byte-code "` \n\n/\f Q  (\n(\n Z)\n&?\f Q &`Zbl@!cAS*͇" [start beg end jka-compr-partial-uncompress uncompress-program uncompress-message " " base-name uncompress-args local-file 0 jka-compr-call-process t nil size after-insert-file-functions value list] 9) ((error (byte-code "@=$8 =$\f+AAB\"+@A\"" [error-code file-error 3 local-file visit notfound signal "Opening input file"] 4))) unlock-buffer set-visited-file-modtime "%s %s...done" signal file-error "Opening input file" 2 insert-file-contents replace] 10] jka-compr-file-local-copy #[(file) " !\n!\f!\f!\f!\n!\nC\"!!p@\nڎQ#qQ&t#ed%).\n\nC\"*" [expand-file-name file filename jka-compr-get-compression-info info jka-compr-info-uncompress-message jka-compr-info-uncompress-program jka-compr-info-uncompress-args file-name-nondirectory jka-compr-run-real-handler file-local-copy jka-compr-make-temp-name t get-buffer-create " *jka-compr-temp*" nil local-file cbuf notfound temp-buffer temp-file local-copy base-name uncompress-args uncompress-program uncompress-message ((byte-code "!! q !" [local-copy file-exists-p delete-file cbuf kill-buffer temp-buffer] 2)) message "%s %s..." jka-compr-call-process " " "%s %s...done" write-region dont] 11]] 3) (defalias 'jka-compr-load #[(file &optional noerror nomessage nosuffix) " ! Ďʼn \" \f͉$. \"-͇" [jka-compr-file-local-copy file local-copy load-file ((jka-compr-delete-temp-file local-copy)) nil inhibit-file-name-handlers inhibit-file-name-operation nomessage message "Loading %s..." load noerror t "Loading %s...done."] 6 "\ Documented as original."]) (byte-code "####\"\"" [put write-region jka-compr jka-compr-write-region insert-file-contents jka-compr-insert-file-contents file-local-copy jka-compr-file-local-copy load jka-compr-load defalias jka-compr-handler #[(operation &rest args) " Ž N \" \"+" [match-data match-data ((store-match-data match-data)) operation jka-compr jka-op apply args jka-compr-run-real-handler] 4] jka-compr-run-real-handler #[(operation args) " \n= B\n\n \"*" [jka-compr-handler inhibit-file-name-operation operation inhibit-file-name-handlers apply args] 3]] 4) (defalias 'toggle-auto-compression #[(arg) " \n\f ?\n=\n<\n\nV( = 0 = : = tP L!P! *" [jka-compr-installed-p installed arg t 0 flag jka-compr-install jka-compr-uninstall message "Automatic file (de)compression is now ON." "Automatic file (de)compression is now OFF."] 3 "\ Toggle automatic file compression and decompression. With prefix argument ARG, turn auto compression on if positive, else off. Returns the new status of auto compression (non-nil means on)." "P"]) (defalias (quote jka-compr-build-file-regexp) #[nil " #Q" ["\\(" mapconcat jka-compr-info-regexp jka-compr-compression-info-list "\\)\\|\\(" "\\)"] 5]) (defalias 'jka-compr-install #[nil " B B\"" [jka-compr-build-file-regexp jka-compr-handler jka-compr-file-name-handler-entry file-name-handler-alist mapcar #[(x) " ! !E B" [jka-compr-info-strip-extension x jka-compr-info-regexp nil jka-compr auto-mode-alist] 3] jka-compr-compression-info-list] 4 "\ Install jka-compr. This adds entries to `file-name-handler-alist' and `auto-mode-alist'."]) (defalias 'jka-compr-uninstall #[nil " B A$ A@A= AA A\nA* B A[ A@A:T8=T AA2 A3A+" [nil file-name-handler-alist fnha last jka-compr-handler auto-mode-alist ama entry 2 jka-compr] 3 "\ Uninstall jka-compr. This removes the entries in `file-name-handler-alist' and `auto-mode-alist' that were created by `jka-compr-installed'."]) (defalias 'jka-compr-installed-p #[nil "\n @A= @ A\n*" [file-name-handler-alist nil installed fnha jka-compr-handler] 3 "\ Return non-nil if jka-compr is installed. The return value is the entry in `file-name-handler-alist' for jka-compr."]) (byte-code "  !" [jka-compr-installed-p jka-compr-uninstall jka-compr-install provide jka-compr] 2)