summaryrefslogtreecommitdiff
path: root/lisp/jka-compr.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-04-02 02:21:56 +0000
committerRichard M. Stallman <rms@gnu.org>1995-04-02 02:21:56 +0000
commite0b25338e9d04dc37855fe4aa55f442c27038df8 (patch)
tree9e992eada86c58d1a9b11ce91f5501d1a7eb5352 /lisp/jka-compr.el
parenteb8eff93511e902920f62f7228b17704a55b13f0 (diff)
downloademacs-e0b25338e9d04dc37855fe4aa55f442c27038df8.tar.gz
(jka-compr-install): Add items to inhibit-first-line-modes-suffixes.
Diffstat (limited to 'lisp/jka-compr.el')
-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'."
(setq file-name-handler-alist (cons jka-compr-file-name-handler-entry
file-name-handler-alist))
- ;; Make entries in auto-mode-alist so that modes are chosen right
- ;; according to the file names sans `.gz'.
(mapcar
(function (lambda (x)
- (and
- (jka-compr-info-strip-extension x)
- (setq auto-mode-alist (cons (list (jka-compr-info-regexp x)
- nil 'jka-compr)
- auto-mode-alist)))))
-
+ (and (jka-compr-info-strip-extension x)
+ ;; Make entries in auto-mode-alist so that modes
+ ;; are chosen right according to the file names
+ ;; sans `.gz'.
+ (setq auto-mode-alist
+ (cons (list (jka-compr-info-regexp x)
+ nil 'jka-compr)
+ auto-mode-alist))
+ ;; Also add these regexps to
+ ;; inhibit-first-line-modes-suffixes, so that a
+ ;; -*- line in the first file of a compressed tar
+ ;; file doesn't override tar-mode.
+ (setq inhibit-first-line-modes-suffixes
+ (cons (jka-compr-info-regexp x)
+ inhibit-first-line-modes-suffixes)))))
jka-compr-compression-info-list)
(setq auto-mode-alist
(append auto-mode-alist jka-compr-mode-alist-additions)))