Commit 523b128c authored by Miles Bader's avatar Miles Bader
Browse files

(with-auto-compression-mode): New macro.

parent c3b27206
2000-09-20 Miles Bader <miles@lsi.nec.co.jp> 2000-09-20 Miles Bader <miles@lsi.nec.co.jp>
* jka-compr.el (with-auto-compression-mode): New macro.
* cus-edit.el (custom-face-tag-face, custom-group-tag-face-1) * cus-edit.el (custom-face-tag-face, custom-group-tag-face-1)
(custom-group-tag-face, custom-variable-tag-face): Use relative (custom-group-tag-face, custom-variable-tag-face): Use relative
:height and inherit from `variable-pitch' face instead of :height and inherit from `variable-pitch' face instead of
......
;;; jka-compr.el --- reading/writing/loading compressed files ;;; jka-compr.el --- reading/writing/loading compressed files
;; Copyright (C) 1993, 1994, 1995, 1997, 1999 Free Software Foundation, Inc. ;; Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000 Free Software Foundation, Inc.
;; Author: jka@ece.cmu.edu (Jay K. Adams) ;; Author: jka@ece.cmu.edu (Jay K. Adams)
;; Maintainer: FSF ;; Maintainer: FSF
...@@ -812,6 +812,21 @@ saying whether the mode is now on or off." ...@@ -812,6 +812,21 @@ saying whether the mode is now on or off."
flag)) flag))
(defmacro with-auto-compression-mode (&rest body)
"Evalutes BODY with automatic file compression and uncompression enabled."
(let ((already-installed (make-symbol "already-installed")))
`(let ((,already-installed (jka-compr-installed-p)))
(unwind-protect
(progn
(unless ,already-installed
(jka-compr-install))
,@body)
(unless ,already-installed
(jka-compr-uninstall))))))
(put 'with-auto-compression-mode 'lisp-indent-function 0)
(defun jka-compr-build-file-regexp () (defun jka-compr-build-file-regexp ()
(concat (concat
"\\(" "\\("
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment