Commit 0c53638a authored by Luc Teirlinck's avatar Luc Teirlinck
Browse files

(jka-compr-uninstall): Replace `mapcar' with `mapc'.

Update `load-file-rep-suffixes' instead of `load-suffixes'.
Use jka-compr-compression-info-list--internal,
jka-compr-mode-alist-additions--internal and
jka-compr-load-suffixes--internal.
parent df66263e
...@@ -662,13 +662,13 @@ and `inhibit-first-line-modes-suffixes' that were added ...@@ -662,13 +662,13 @@ and `inhibit-first-line-modes-suffixes' that were added
by `jka-compr-installed'." by `jka-compr-installed'."
;; Delete from inhibit-first-line-modes-suffixes ;; Delete from inhibit-first-line-modes-suffixes
;; what jka-compr-install added. ;; what jka-compr-install added.
(mapcar (mapc
(function (lambda (x) (function (lambda (x)
(and (jka-compr-info-strip-extension x) (and (jka-compr-info-strip-extension x)
(setq inhibit-first-line-modes-suffixes (setq inhibit-first-line-modes-suffixes
(delete (jka-compr-info-regexp x) (delete (jka-compr-info-regexp x)
inhibit-first-line-modes-suffixes))))) inhibit-first-line-modes-suffixes)))))
jka-compr-compression-info-list) jka-compr-compression-info-list--internal)
(let* ((fnha (cons nil file-name-handler-alist)) (let* ((fnha (cons nil file-name-handler-alist))
(last fnha)) (last fnha))
...@@ -686,7 +686,7 @@ by `jka-compr-installed'." ...@@ -686,7 +686,7 @@ by `jka-compr-installed'."
(while (cdr last) (while (cdr last)
(setq entry (car (cdr last))) (setq entry (car (cdr last)))
(if (or (member entry jka-compr-mode-alist-additions) (if (or (member entry jka-compr-mode-alist-additions--internal)
(and (consp (cdr entry)) (and (consp (cdr entry))
(eq (nth 2 entry) 'jka-compr))) (eq (nth 2 entry) 'jka-compr)))
(setcdr last (cdr (cdr last))) (setcdr last (cdr (cdr last)))
...@@ -701,12 +701,12 @@ by `jka-compr-installed'." ...@@ -701,12 +701,12 @@ by `jka-compr-installed'."
file-coding-system-alist))) file-coding-system-alist)))
;; Remove the suffixes that were added by jka-compr. ;; Remove the suffixes that were added by jka-compr.
(let ((suffixes nil) (dolist (suff jka-compr-load-suffixes--internal)
(re (jka-compr-build-file-regexp))) (setq load-file-rep-suffixes (delete suff load-file-rep-suffixes)))
(dolist (suffix load-suffixes)
(unless (string-match re suffix) (setq jka-compr-compression-info-list--internal nil
(push suffix suffixes))) jka-compr-mode-alist-additions--internal nil
(setq load-suffixes (nreverse suffixes)))) jka-compr-load-suffixes--internal nil))
(provide 'jka-compr) (provide 'jka-compr)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment