Function: auto-compression-mode
auto-compression-mode is an interactive and byte-compiled function
defined in jka-cmpr-hook.el.gz.
Signature
(auto-compression-mode &optional ARG)
Documentation
Toggle Auto Compression mode.
Auto Compression mode is a global minor mode. When enabled, compressed files are automatically uncompressed for reading, and compressed when writing.
This is a global minor mode. If called interactively, toggle the
Auto-Compression mode mode. If the prefix argument is positive,
enable the mode, and if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate (default-value \=auto-compression-mode)'.
The mode's hook is called both when the mode is enabled and when it is disabled.
Probably introduced at or before Emacs version 19.30.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/jka-cmpr-hook.el.gz
(define-minor-mode auto-compression-mode
"Toggle Auto Compression mode.
Auto Compression mode is a global minor mode. When enabled,
compressed files are automatically uncompressed for reading, and
compressed when writing."
:global t :init-value t :group 'jka-compr :version "22.1"
(let* ((installed (jka-compr-installed-p))
(flag auto-compression-mode))
(cond
((and flag installed) t) ; already installed
((and (not flag) (not installed)) nil) ; already not installed
(flag (jka-compr-install))
(t (jka-compr-uninstall)))))