emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/jka-compr.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/jka-compr.el
Date: Thu, 10 Nov 2005 21:54:08 -0500

Index: emacs/lisp/jka-compr.el
diff -c emacs/lisp/jka-compr.el:1.87 emacs/lisp/jka-compr.el:1.88
*** emacs/lisp/jka-compr.el:1.87        Sat Aug  6 22:13:43 2005
--- emacs/lisp/jka-compr.el     Fri Nov 11 02:54:08 2005
***************
*** 101,106 ****
--- 101,108 ----
  
  ;;; Code:
  
+ (require 'jka-cmpr-hook)
+ 
  (defcustom jka-compr-shell "sh"
    "*Shell to be used for calling compression programs.
  The value of this variable only matters if you want to discard the
***************
*** 119,150 ****
  (make-variable-buffer-local 'jka-compr-really-do-compress)
  (put 'jka-compr-really-do-compress 'permanent-local t)
  
- ;;; 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))
- (defun jka-compr-info-compress-args        (info)  (aref info 3))
- (defun jka-compr-info-uncompress-message   (info)  (aref info 4))
- (defun jka-compr-info-uncompress-program   (info)  (aref info 5))
- (defun jka-compr-info-uncompress-args      (info)  (aref info 6))
- (defun jka-compr-info-can-append           (info)  (aref info 7))
- (defun jka-compr-info-strip-extension      (info)  (aref info 8))
- (defun jka-compr-info-file-magic-bytes     (info)  (aref info 9))
- 
- 
- (defun jka-compr-get-compression-info (filename)
-   "Return information about the compression scheme of FILENAME.
- The determination as to which compression scheme, if any, to use is
- based on the filename itself and `jka-compr-compression-info-list'."
-   (catch 'compression-info
-     (let ((case-fold-search nil))
-       (mapcar
-        (function (lambda (x)
-                  (and (string-match (jka-compr-info-regexp x) filename)
-                       (throw 'compression-info x))))
-        jka-compr-compression-info-list)
-       nil)))
- 
  
  (put 'compression-error 'error-conditions '(compression-error file-error 
error))
  
--- 121,126 ----
***************
*** 154,161 ****
  
  (defun jka-compr-error (prog args infile message &optional errfile)
  
!   (let ((errbuf (get-buffer-create " *jka-compr-error*"))
!       (curbuf (current-buffer)))
      (with-current-buffer errbuf
        (widen) (erase-buffer)
        (insert (format "Error while executing \"%s %s < %s\"\n\n"
--- 130,136 ----
  
  (defun jka-compr-error (prog args infile message &optional errfile)
  
!   (let ((errbuf (get-buffer-create " *jka-compr-error*")))
      (with-current-buffer errbuf
        (widen) (erase-buffer)
        (insert (format "Error while executing \"%s %s < %s\"\n\n"
***************
*** 270,277 ****
           (erase-buffer)))))
  
  
! ;;; Support for temp files.  Much of this was inspired if not lifted
! ;;; from ange-ftp.
  
  (defcustom jka-compr-temp-name-template
    (expand-file-name "jka-com" temporary-file-directory)
--- 245,252 ----
           (erase-buffer)))))
  
  
! ;; Support for temp files.  Much of this was inspired if not lifted
! ;; from ange-ftp.
  
  (defcustom jka-compr-temp-name-template
    (expand-file-name "jka-com" temporary-file-directory)
***************
*** 563,569 ****
               (jka-compr-run-real-handler 'file-local-copy (list filename)))
              (temp-file (jka-compr-make-temp-name t))
              (temp-buffer (get-buffer-create " *jka-compr-flc-temp*"))
-             (notfound nil)
              local-file)
  
          (setq local-file (or local-copy filename))
--- 538,543 ----
***************
*** 611,617 ****
        (jka-compr-run-real-handler 'file-local-copy (list filename)))))
  
  
! ;;; Support for loading compressed files.
  (defun jka-compr-load (file &optional noerror nomessage nosuffix)
    "Documented as original."
  
--- 585,591 ----
        (jka-compr-run-real-handler 'file-local-copy (list filename)))))
  
  
! ;; Support for loading compressed files.
  (defun jka-compr-load (file &optional noerror nomessage nosuffix)
    "Documented as original."
  
***************
*** 720,736 ****
  
      (setq auto-mode-alist (cdr ama)))
  
!   (let* ((ama (cons nil file-coding-system-alist))
!        (last ama)
!        entry)
! 
!     (while (cdr last)
!       (setq entry (car (cdr last)))
!       (if (member entry jka-compr-added-to-file-coding-system-alist)
!         (setcdr last (cdr (cdr last)))
!       (setq last (cdr last))))
! 
!     (setq file-coding-system-alist (cdr ama)))
  
    ;; Remove the suffixes that were added by jka-compr.
    (let ((suffixes nil)
--- 694,704 ----
  
      (setq auto-mode-alist (cdr ama)))
  
!   (while jka-compr-added-to-file-coding-system-alist
!     (setq file-coding-system-alist
!           (delq (car (member (pop jka-compr-added-to-file-coding-system-alist)
!                              file-coding-system-alist))
!                 file-coding-system-alist)))
  
    ;; Remove the suffixes that were added by jka-compr.
    (let ((suffixes nil)
***************
*** 742,746 ****
  
  (provide 'jka-compr)
  
! ;;; arch-tag: 3f15b630-e9a7-46c4-a22a-94afdde86ebc
  ;;; jka-compr.el ends here
--- 710,714 ----
  
  (provide 'jka-compr)
  
! ;; arch-tag: 3f15b630-e9a7-46c4-a22a-94afdde86ebc
  ;;; jka-compr.el ends here




reply via email to

[Prev in Thread] Current Thread [Next in Thread]