diff options
| author | Miles Bader | 2000-10-08 23:35:47 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-10-08 23:35:47 +0000 |
| commit | 7dbc9c8a2ce6179bee9c82740b2232c22b6a6be3 (patch) | |
| tree | 96569a74304dae107b0d22c60a4d2cd910c4154e | |
| parent | 33c7a00c075f8ca2aabf39493e77b7c919d27d2d (diff) | |
| download | emacs-7dbc9c8a2ce6179bee9c82740b2232c22b6a6be3.tar.gz emacs-7dbc9c8a2ce6179bee9c82740b2232c22b6a6be3.zip | |
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'.
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/jka-compr.el | 22 |
2 files changed, 24 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a4aeec34408..9e25fa395d1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2000-10-09 Miles Bader <miles@gnu.org> | ||
| 2 | |||
| 3 | * jka-compr.el: Don't call `jka-compr-install' when loading (it | ||
| 4 | will be done by the definition of `auto-compression-mode' if | ||
| 5 | necessary. Move code to uninstall existing file-name handler | ||
| 6 | before definition of `auto-compression-mode'. | ||
| 7 | |||
| 8 | * image-file.el (auto-image-file-mode): Move to the end of the | ||
| 9 | file, because `define-minor-mode' actually calls the mode-function | ||
| 10 | if the associated variable is non-nil, which requires that all | ||
| 11 | needed functions be already defined. | ||
| 12 | |||
| 1 | 2000-10-08 Dave Love <fx@gnu.org> | 13 | 2000-10-08 Dave Love <fx@gnu.org> |
| 2 | 14 | ||
| 3 | * progmodes/ada-mode.el (ada-mode-menu): Add name to menu map. | 15 | * 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." | |||
| 873 | installed)) | 873 | installed)) |
| 874 | 874 | ||
| 875 | 875 | ||
| 876 | ;;; Add the file I/O hook if it does not already exist. | ||
| 877 | ;;; Make sure that jka-compr-file-name-handler-entry is eq to the | ||
| 878 | ;;; entry for jka-compr in file-name-handler-alist. | ||
| 879 | (and (jka-compr-installed-p) | ||
| 880 | (jka-compr-uninstall)) | ||
| 881 | |||
| 882 | |||
| 883 | ;;; Note this definition must be at the end of the file, because | ||
| 884 | ;;; `define-minor-mode' actually calls the mode-function if the | ||
| 885 | ;;; associated variable is non-nil, which requires that all needed | ||
| 886 | ;;; functions be already defined. [This is arguably a bug in d-m-m] | ||
| 876 | ;;;###autoload | 887 | ;;;###autoload |
| 877 | (define-minor-mode auto-compression-mode | 888 | (define-minor-mode auto-compression-mode |
| 878 | "Toggle automatic file compression and uncompression. | 889 | "Toggle automatic file compression and uncompression. |
| @@ -890,7 +901,7 @@ Returns the new status of auto compression (non-nil means on)." | |||
| 890 | 901 | ||
| 891 | ;;;###autoload | 902 | ;;;###autoload |
| 892 | (defmacro with-auto-compression-mode (&rest body) | 903 | (defmacro with-auto-compression-mode (&rest body) |
| 893 | "Evalutes BODY with automatic file compression and uncompression enabled." | 904 | "Evalute BODY with automatic file compression and uncompression enabled." |
| 894 | (let ((already-installed (make-symbol "already-installed"))) | 905 | (let ((already-installed (make-symbol "already-installed"))) |
| 895 | `(let ((,already-installed (jka-compr-installed-p))) | 906 | `(let ((,already-installed (jka-compr-installed-p))) |
| 896 | (unwind-protect | 907 | (unwind-protect |
| @@ -903,15 +914,6 @@ Returns the new status of auto compression (non-nil means on)." | |||
| 903 | (put 'with-auto-compression-mode 'lisp-indent-function 0) | 914 | (put 'with-auto-compression-mode 'lisp-indent-function 0) |
| 904 | 915 | ||
| 905 | 916 | ||
| 906 | ;;; Add the file I/O hook if it does not already exist. | ||
| 907 | ;;; Make sure that jka-compr-file-name-handler-entry is eq to the | ||
| 908 | ;;; entry for jka-compr in file-name-handler-alist. | ||
| 909 | (and (jka-compr-installed-p) | ||
| 910 | (jka-compr-uninstall)) | ||
| 911 | |||
| 912 | (jka-compr-install) | ||
| 913 | |||
| 914 | |||
| 915 | (provide 'jka-compr) | 917 | (provide 'jka-compr) |
| 916 | 918 | ||
| 917 | ;; jka-compr.el ends here. | 919 | ;; jka-compr.el ends here. |