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
commit57293ab3e3f98a370872236f5046936ca528b231 (patch)
treeac4b3ff1fb092be3ac4ef8480fe9564cfcb47c63 /lisp/jka-compr.el
parent4dcb1656203e2fdae2464453e5625f6ea4254307 (diff)
downloademacs-57293ab3e3f98a370872236f5046936ca528b231.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))