[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/jka-cmpr-hook.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/jka-cmpr-hook.el |
Date: |
Thu, 10 Nov 2005 23:22:46 -0500 |
Index: emacs/lisp/jka-cmpr-hook.el
diff -c emacs/lisp/jka-cmpr-hook.el:1.5 emacs/lisp/jka-cmpr-hook.el:1.6
*** emacs/lisp/jka-cmpr-hook.el:1.5 Mon Oct 10 19:56:37 2005
--- emacs/lisp/jka-cmpr-hook.el Fri Nov 11 04:22:44 2005
***************
*** 40,47 ****
"jka-compr customization."
:group 'compression)
! ;;; I have this defined so that .Z files are assumed to be in unix
! ;;; compress format; and .gz files, in gzip format, and .bz2 files in bzip
fmt.
(defcustom jka-compr-compression-info-list
;;[regexp
;; compr-message compr-prog compr-args
--- 40,47 ----
"jka-compr customization."
:group 'compression)
! ;; I have this defined so that .Z files are assumed to be in unix
! ;; compress format; and .gz files, in gzip format, and .bz2 files in bzip fmt.
(defcustom jka-compr-compression-info-list
;;[regexp
;; compr-message compr-prog compr-args
***************
*** 158,164 ****
jka-compr-compression-info-list
"\\|"))
! ;;; Functions for accessing the return value of jka-compr-get-compression-info
(defun jka-compr-info-regexp (info) (aref info 0))
(defun jka-compr-info-compress-message (info) (aref info 1))
(defun jka-compr-info-compress-program (info) (aref info 2))
--- 158,164 ----
jka-compr-compression-info-list
"\\|"))
! ;; Functions for accessing the return value of jka-compr-get-compression-info
(defun jka-compr-info-regexp (info) (aref info 0))
(defun jka-compr-info-compress-message (info) (aref info 1))
(defun jka-compr-info-compress-program (info) (aref info 2))
***************
*** 192,239 ****
(setq jka-compr-file-name-handler-entry
(cons (jka-compr-build-file-regexp) 'jka-compr-handler))
! (setq file-name-handler-alist (cons jka-compr-file-name-handler-entry
! file-name-handler-alist))
! (setq jka-compr-added-to-file-coding-system-alist nil)
!
! (mapcar
! (function (lambda (x)
! ;; Don't do multibyte encoding on the compressed files.
! (let ((elt (cons (jka-compr-info-regexp x)
! '(no-conversion . no-conversion))))
! (setq file-coding-system-alist
! (cons elt file-coding-system-alist))
! (setq jka-compr-added-to-file-coding-system-alist
! (cons elt jka-compr-added-to-file-coding-system-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))
;; Make sure that (load "foo") will find /bla/foo.el.gz.
(setq load-suffixes
(apply 'append
! (mapcar (lambda (suffix)
! (cons suffix
! (mapcar (lambda (ext) (concat suffix ext))
! jka-compr-load-suffixes)))
! load-suffixes))))
(defun jka-compr-installed-p ()
--- 192,229 ----
(setq jka-compr-file-name-handler-entry
(cons (jka-compr-build-file-regexp) 'jka-compr-handler))
! (push jka-compr-file-name-handler-entry file-name-handler-alist)
! (dolist (x jka-compr-compression-info-list)
! ;; Don't do multibyte encoding on the compressed files.
! (let ((elt (cons (jka-compr-info-regexp x)
! '(no-conversion . no-conversion))))
! (push elt file-coding-system-alist)
! (push elt jka-compr-added-to-file-coding-system-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'.
! (push (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.
! (push (jka-compr-info-regexp x)
! inhibit-first-line-modes-suffixes)))
(setq auto-mode-alist
(append auto-mode-alist jka-compr-mode-alist-additions))
;; Make sure that (load "foo") will find /bla/foo.el.gz.
(setq load-suffixes
(apply 'append
! (append (mapcar (lambda (suffix)
! (cons suffix
! (mapcar (lambda (ext) (concat suffix
ext))
! jka-compr-load-suffixes)))
! load-suffixes)
! (list jka-compr-load-suffixes)))))
(defun jka-compr-installed-p ()
***************
*** 277,291 ****
(put 'with-auto-compression-mode 'lisp-indent-function 0)
! ;;; This is what we need to know about jka-compr-handler
! ;;; in order to decide when to call it.
(put 'jka-compr-handler 'safe-magic t)
(put 'jka-compr-handler 'operations '(byte-compiler-base-file-name
write-region insert-file-contents
file-local-copy load))
! ;;; Turn on the mode.
(auto-compression-mode 1)
(provide 'jka-cmpr-hook)
--- 267,281 ----
(put 'with-auto-compression-mode 'lisp-indent-function 0)
! ;; This is what we need to know about jka-compr-handler
! ;; in order to decide when to call it.
(put 'jka-compr-handler 'safe-magic t)
(put 'jka-compr-handler 'operations '(byte-compiler-base-file-name
write-region insert-file-contents
file-local-copy load))
! ;; Turn on the mode.
(auto-compression-mode 1)
(provide 'jka-cmpr-hook)
- [Emacs-diffs] Changes to emacs/lisp/jka-cmpr-hook.el,
Stefan Monnier <=