aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2000-09-20 04:44:35 +0000
committerMiles Bader2000-09-20 04:44:35 +0000
commit523b128cff09d99187a026ccf4bbd6d075b8602f (patch)
tree980dd747597a347ebbbab109a073abac9fcdf03d
parentc3b27206597f8366b900e84d9a20509b4c565d6e (diff)
downloademacs-523b128cff09d99187a026ccf4bbd6d075b8602f.tar.gz
emacs-523b128cff09d99187a026ccf4bbd6d075b8602f.zip
(with-auto-compression-mode): New macro.
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/jka-compr.el17
2 files changed, 18 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 66845d062ac..8b5a92b0d56 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
12000-09-20 Miles Bader <miles@lsi.nec.co.jp> 12000-09-20 Miles Bader <miles@lsi.nec.co.jp>
2 2
3 * jka-compr.el (with-auto-compression-mode): New macro.
4
3 * cus-edit.el (custom-face-tag-face, custom-group-tag-face-1) 5 * cus-edit.el (custom-face-tag-face, custom-group-tag-face-1)
4 (custom-group-tag-face, custom-variable-tag-face): Use relative 6 (custom-group-tag-face, custom-variable-tag-face): Use relative
5 :height and inherit from `variable-pitch' face instead of 7 :height and inherit from `variable-pitch' face instead of
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el
index 7539ef9999c..1d67272008e 100644
--- a/lisp/jka-compr.el
+++ b/lisp/jka-compr.el
@@ -1,6 +1,6 @@
1;;; jka-compr.el --- reading/writing/loading compressed files 1;;; jka-compr.el --- reading/writing/loading compressed files
2 2
3;; Copyright (C) 1993, 1994, 1995, 1997, 1999 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000 Free Software Foundation, Inc.
4 4
5;; Author: jka@ece.cmu.edu (Jay K. Adams) 5;; Author: jka@ece.cmu.edu (Jay K. Adams)
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -812,6 +812,21 @@ saying whether the mode is now on or off."
812 812
813 flag)) 813 flag))
814 814
815
816(defmacro with-auto-compression-mode (&rest body)
817 "Evalutes BODY with automatic file compression and uncompression enabled."
818 (let ((already-installed (make-symbol "already-installed")))
819 `(let ((,already-installed (jka-compr-installed-p)))
820 (unwind-protect
821 (progn
822 (unless ,already-installed
823 (jka-compr-install))
824 ,@body)
825 (unless ,already-installed
826 (jka-compr-uninstall))))))
827(put 'with-auto-compression-mode 'lisp-indent-function 0)
828
829
815(defun jka-compr-build-file-regexp () 830(defun jka-compr-build-file-regexp ()
816 (concat 831 (concat
817 "\\(" 832 "\\("