From: Miles Bader Date: Sun, 8 Oct 2000 23:35:47 +0000 (+0000) Subject: Don't call `jka-compr-install' when loading (it will be done by the X-Git-Tag: emacs-pretest-21.0.90~1013 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7dbc9c8a2ce6179bee9c82740b2232c22b6a6be3;p=emacs.git Don't call `jka-compr-install' when loading (it will be done by the definition of `auto-compression-mode' if necessary). Move code to uninstall existing file-name handler before definition of `auto-compression-mode'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a4aeec34408..9e25fa395d1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2000-10-09 Miles Bader + + * jka-compr.el: Don't call `jka-compr-install' when loading (it + will be done by the definition of `auto-compression-mode' if + necessary. Move code to uninstall existing file-name handler + before definition of `auto-compression-mode'. + + * image-file.el (auto-image-file-mode): Move to the end of the + file, because `define-minor-mode' actually calls the mode-function + if the associated variable is non-nil, which requires that all + needed functions be already defined. + 2000-10-08 Dave Love * progmodes/ada-mode.el (ada-mode-menu): Add name to menu map. diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el index 9adeddfefa7..036b6db5847 100644 --- a/lisp/jka-compr.el +++ b/lisp/jka-compr.el @@ -873,6 +873,17 @@ The return value is the entry in `file-name-handler-alist' for jka-compr." installed)) +;;; Add the file I/O hook if it does not already exist. +;;; Make sure that jka-compr-file-name-handler-entry is eq to the +;;; entry for jka-compr in file-name-handler-alist. +(and (jka-compr-installed-p) + (jka-compr-uninstall)) + + +;;; Note this definition must be at the end of the file, because +;;; `define-minor-mode' actually calls the mode-function if the +;;; associated variable is non-nil, which requires that all needed +;;; functions be already defined. [This is arguably a bug in d-m-m] ;;;###autoload (define-minor-mode auto-compression-mode "Toggle automatic file compression and uncompression. @@ -890,7 +901,7 @@ Returns the new status of auto compression (non-nil means on)." ;;;###autoload (defmacro with-auto-compression-mode (&rest body) - "Evalutes BODY with automatic file compression and uncompression enabled." + "Evalute BODY with automatic file compression and uncompression enabled." (let ((already-installed (make-symbol "already-installed"))) `(let ((,already-installed (jka-compr-installed-p))) (unwind-protect @@ -903,15 +914,6 @@ Returns the new status of auto compression (non-nil means on)." (put 'with-auto-compression-mode 'lisp-indent-function 0) -;;; Add the file I/O hook if it does not already exist. -;;; Make sure that jka-compr-file-name-handler-entry is eq to the -;;; entry for jka-compr in file-name-handler-alist. -(and (jka-compr-installed-p) - (jka-compr-uninstall)) - -(jka-compr-install) - - (provide 'jka-compr) ;; jka-compr.el ends here.