summaryrefslogtreecommitdiff
path: root/lisp/jka-compr.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-04-08 06:22:05 +0000
committerRichard M. Stallman <rms@gnu.org>1995-04-08 06:22:05 +0000
commit919a07bb1d628890cbd729285d9b307bb9fe471f (patch)
tree3229906940df0308c10259b504fdf7fc700ff71f /lisp/jka-compr.el
parent9d0eba571730f84fe256f364206b3936e77d31d2 (diff)
downloademacs-919a07bb1d628890cbd729285d9b307bb9fe471f.tar.gz
(jka-compr-install): Doc fix.
(jka-compr-uninstall): Delete entries that jka-compr-install added to inhibit-first-line-modes-suffixes.
Diffstat (limited to 'lisp/jka-compr.el')
-rw-r--r--lisp/jka-compr.el15
1 files changed, 13 insertions, 2 deletions
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el
index c6a3b97879b..5c139c865dd 100644
--- a/lisp/jka-compr.el
+++ b/lisp/jka-compr.el
@@ -714,7 +714,8 @@ Returns the new status of auto compression (non-nil means on)."
(defun jka-compr-install ()
"Install jka-compr.
-This adds entries to `file-name-handler-alist' and `auto-mode-alist'."
+This adds entries to `file-name-handler-alist' and `auto-mode-alist'
+and `inhibit-first-line-modes-suffixes'."
(setq jka-compr-file-name-handler-entry
(cons (jka-compr-build-file-regexp) 'jka-compr-handler))
@@ -747,7 +748,17 @@ This adds entries to `file-name-handler-alist' and `auto-mode-alist'."
(defun jka-compr-uninstall ()
"Uninstall jka-compr.
This removes the entries in `file-name-handler-alist' and `auto-mode-alist'
-that were created by `jka-compr-installed'."
+and `inhibit-first-line-modes-suffixes' that were added
+by `jka-compr-installed'."
+ ;; Delete from inhibit-first-line-modes-suffixes
+ ;; what jka-compr-install added.
+ (mapcar
+ (function (lambda (x)
+ (and (jka-compr-info-strip-extension x)
+ (setq inhibit-first-line-modes-suffixes
+ (delete (jka-compr-info-regexp x)
+ inhibit-first-line-modes-suffixes)))))
+ jka-compr-compression-info-list)
(let* ((fnha (cons nil file-name-handler-alist))
(last fnha))