comparison lisp/jka-compr.el @ 11179:9ff0cfb97106

(jka-compr-install): Add items to inhibit-first-line-modes-suffixes.
author Richard M. Stallman <rms@gnu.org>
date Sun, 02 Apr 1995 02:21:56 +0000
parents 0160fca3dee1
children c271ed10f874
comparison
equal deleted inserted replaced
11178:7d4805feb413 11179:9ff0cfb97106
720 (cons (jka-compr-build-file-regexp) 'jka-compr-handler)) 720 (cons (jka-compr-build-file-regexp) 'jka-compr-handler))
721 721
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)))
738 745
739 746