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

This commit is contained in:
Miles Bader
2000-09-20 04:44:35 +00:00
parent c3b2720659
commit 523b128cff
2 changed files with 18 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
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)
(custom-group-tag-face, custom-variable-tag-face): Use relative
:height and inherit from `variable-pitch' face instead of

View File

@@ -1,6 +1,6 @@
;;; 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)
;; Maintainer: FSF
@@ -812,6 +812,21 @@ saying whether the mode is now on or off."
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 ()
(concat
"\\("