• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/

Lines Matching +defs:jka +defs:compr +defs:info +defs:uncompress +defs:program

0 ;;; jka-cmpr-hook.el --- preloaded code to enable jka-compr.el
6 ;; Author: jka@ece.cmu.edu (Jay K. Adams)
30 ;; It is preloaded. The guts of this mode are in jka-compr.el, which
31 ;; is loaded only when you really try to uncompress something.
39 (defgroup jka-compr nil
40 "jka-compr customization."
44 (defvar jka-compr-added-to-file-coding-system-alist nil)
46 (defvar jka-compr-file-name-handler-entry
48 "`file-name-handler-alist' entry used by jka-compr I/O functions.")
52 (defvar jka-compr-compression-info-list)
53 (defvar jka-compr-mode-alist-additions)
54 (defvar jka-compr-load-suffixes)
56 (defvar jka-compr-compression-info-list--internal nil
57 "Stored value of `jka-compr-compression-info-list'.
59 `jka-compr-compression-info-list' when `jka-compr-install' was last called.
62 (defvar jka-compr-mode-alist-additions--internal nil
63 "Stored value of `jka-compr-mode-alist-additions'.
65 `jka-compr-mode-alist-additions' when `jka-compr-install' was last called.
68 (defvar jka-compr-load-suffixes--internal nil
69 "Stored value of `jka-compr-load-suffixes'.
71 `jka-compr-load-suffixes' when `jka-compr-install' was last called.
76 (defun jka-compr-build-file-regexp ()
78 'jka-compr-info-regexp
79 jka-compr-compression-info-list
82 ;; Functions for accessing the return value of jka-compr-get-compression-info
83 (defun jka-compr-info-regexp (info) (aref info 0))
84 (defun jka-compr-info-compress-message (info) (aref info 1))
85 (defun jka-compr-info-compress-program (info) (aref info 2))
86 (defun jka-compr-info-compress-args (info) (aref info 3))
87 (defun jka-compr-info-uncompress-message (info) (aref info 4))
88 (defun jka-compr-info-uncompress-program (info) (aref info 5))
89 (defun jka-compr-info-uncompress-args (info) (aref info 6))
90 (defun jka-compr-info-can-append (info) (aref info 7))
91 (defun jka-compr-info-strip-extension (info) (aref info 8))
92 (defun jka-compr-info-file-magic-bytes (info) (aref info 9))
95 (defun jka-compr-get-compression-info (filename)
98 based on the filename itself and `jka-compr-compression-info-list'."
99 (catch 'compression-info
103 (and (string-match (jka-compr-info-regexp x) filename)
104 (throw 'compression-info x))))
105 jka-compr-compression-info-list)
108 (defun jka-compr-install ()
109 "Install jka-compr.
113 (setq jka-compr-file-name-handler-entry
114 (cons (jka-compr-build-file-regexp) 'jka-compr-handler))
116 (push jka-compr-file-name-handler-entry file-name-handler-alist)
118 (setq jka-compr-compression-info-list--internal
119 jka-compr-compression-info-list
120 jka-compr-mode-alist-additions--internal
121 jka-compr-mode-alist-additions
122 jka-compr-load-suffixes--internal
123 jka-compr-load-suffixes)
125 (dolist (x jka-compr-compression-info-list)
127 (let ((elt (cons (jka-compr-info-regexp x)
130 (push elt jka-compr-added-to-file-coding-system-alist))
132 (and (jka-compr-info-strip-extension x)
136 (push (list (jka-compr-info-regexp x) nil 'jka-compr) auto-mode-alist)
141 (push (jka-compr-info-regexp x)
144 (append auto-mode-alist jka-compr-mode-alist-additions))
148 (append load-file-rep-suffixes jka-compr-load-suffixes nil)))
150 (defun jka-compr-installed-p ()
151 "Return non-nil if jka-compr is installed.
152 The return value is the entry in `file-name-handler-alist' for jka-compr."
158 (and (eq (cdr (car fnha)) 'jka-compr-handler)
164 (defun jka-compr-update ()
166 If you change the options `jka-compr-compression-info-list',
167 `jka-compr-mode-alist-additions' or `jka-compr-load-suffixes'
172 (when (jka-compr-installed-p)
173 (jka-compr-uninstall)
174 (jka-compr-install)))
176 (defun jka-compr-set (variable value)
179 (jka-compr-update))
183 (defcustom jka-compr-compression-info-list
185 ;; compr-message compr-prog compr-args
190 "uncompressing" "uncompress" ("-c")
211 ;; dzip is gzip with random access. Its compression program can't
231 compress-program is a program that performs this compression
234 compress-args is a list of args to pass to the compress program
236 uncompress-msg is the message to issue to the user when doing this
239 uncompress-program is a program that performs this compression
241 uncompress-args is a list of args to pass to the uncompress program
254 `jka-compr-update' after setting it to properly update other
274 :set 'jka-compr-set
275 :group 'jka-compr)
277 (defcustom jka-compr-mode-alist-additions
279 "List of pairs added to `auto-mode-alist' when installing jka-compr.
280 Uninstalling jka-compr removes all pairs from `auto-mode-alist' that
285 `jka-compr-update' after setting it to properly update other
288 :set 'jka-compr-set
289 :group 'jka-compr)
291 (defcustom jka-compr-load-suffixes '(".gz")
299 `jka-compr-update' after setting it to properly update other
302 :set 'jka-compr-set
303 :group 'jka-compr)
309 :global t :init-value t :group 'jka-compr :version "22.1"
310 (let* ((installed (jka-compr-installed-p))
315 (flag (jka-compr-install))
316 (t (jka-compr-uninstall)))))
321 `(let ((,already-installed (jka-compr-installed-p)))
325 (jka-compr-install))
328 (jka-compr-uninstall))))))
332 ;; This is what we need to know about jka-compr-handler
335 (put 'jka-compr-handler 'safe-magic t)
336 (put 'jka-compr-handler 'operations '(byte-compiler-base-file-name
343 (provide 'jka-cmpr-hook)
346 ;;; jka-cmpr-hook.el ends here