changeset 11296:c271ed10f874

(jka-compr-install): Doc fix. (jka-compr-uninstall): Delete entries that jka-compr-install added to inhibit-first-line-modes-suffixes.
author Richard M. Stallman <rms@gnu.org>
date Sat, 08 Apr 1995 06:22:05 +0000
parents 2bb1a6595c14
children 056c7266a614
files lisp/jka-compr.el
diffstat 1 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/jka-compr.el	Sat Apr 08 06:20:51 1995 +0000
+++ b/lisp/jka-compr.el	Sat Apr 08 06:22:05 1995 +0000
@@ -714,7 +714,8 @@
 
 (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 @@
 (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))