aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-04-02 02:21:56 +0000
committerRichard M. Stallman1995-04-02 02:21:56 +0000
commit469f4e8cfcea07d6a1fcd807e2d40dfc223c5e26 (patch)
treeb538101c0f877336595cc8043e6bad4f203835f2
parent24aac19dbb7230a7a395ace89f2f700ea743bce1 (diff)
downloademacs-469f4e8cfcea07d6a1fcd807e2d40dfc223c5e26.tar.gz
emacs-469f4e8cfcea07d6a1fcd807e2d40dfc223c5e26.zip
(jka-compr-install): Add items to inhibit-first-line-modes-suffixes.
-rw-r--r--lisp/jka-compr.el23
1 files changed, 15 insertions, 8 deletions
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el
index 94c5d747704..c6a3b97879b 100644
--- a/lisp/jka-compr.el
+++ b/lisp/jka-compr.el
@@ -722,16 +722,23 @@ This adds entries to `file-name-handler-alist' and `auto-mode-alist'."
722 (setq file-name-handler-alist (cons jka-compr-file-name-handler-entry 722 (setq file-name-handler-alist (cons jka-compr-file-name-handler-entry
723 file-name-handler-alist)) 723 file-name-handler-alist))
724 724
725 ;; Make entries in auto-mode-alist so that modes are chosen right
726 ;; according to the file names sans `.gz'.
727 (mapcar 725 (mapcar
728 (function (lambda (x) 726 (function (lambda (x)
729 (and 727 (and (jka-compr-info-strip-extension x)
730 (jka-compr-info-strip-extension x) 728 ;; Make entries in auto-mode-alist so that modes
731 (setq auto-mode-alist (cons (list (jka-compr-info-regexp x) 729 ;; are chosen right according to the file names
732 nil 'jka-compr) 730 ;; sans `.gz'.
733 auto-mode-alist))))) 731 (setq auto-mode-alist
734 732 (cons (list (jka-compr-info-regexp x)
733 nil 'jka-compr)
734 auto-mode-alist))
735 ;; Also add these regexps to
736 ;; inhibit-first-line-modes-suffixes, so that a
737 ;; -*- line in the first file of a compressed tar
738 ;; file doesn't override tar-mode.
739 (setq inhibit-first-line-modes-suffixes
740 (cons (jka-compr-info-regexp x)
741 inhibit-first-line-modes-suffixes)))))
735 jka-compr-compression-info-list) 742 jka-compr-compression-info-list)
736 (setq auto-mode-alist 743 (setq auto-mode-alist
737 (append auto-mode-alist jka-compr-mode-alist-additions))) 744 (append auto-mode-alist jka-compr-mode-alist-additions)))