Changeset 4210 for trunk/lisp/tar-mode.el
- Timestamp:
- 06/02/07 09:29:41 (1 year ago)
- Files:
-
- trunk/lisp/tar-mode.el (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/tar-mode.el
r4190 r4210 682 682 (tar-extract)) 683 683 684 (defun tar-file-name-handler (op &rest args) 685 "Helper function for `tar-extract'." 686 (or (eq op 'file-exists-p) 687 (let ((file-name-handler-alist nil)) 688 (apply op args)))) 689 684 690 (defun tar-extract (&optional other-window-p) 685 691 "In Tar mode, extract this entry of the tar file into its own buffer." … … 736 742 (funcall set-auto-coding-function 737 743 name (- (point-max) (point))))) 738 (car (find-operation-coding-system 739 'insert-file-contents 740 (cons name (current-buffer)) t)))) 744 ;; The following binding causes 745 ;; find-buffer-file-type-coding-system 746 ;; (defined on dos-w32.el) to act as if 747 ;; the file being extracted existed, so 748 ;; that the file's contents' encoding and 749 ;; EOL format are auto-detected. 750 (let ((file-name-handler-alist 751 (if (featurep 'dos-w32) 752 '(("" . tar-file-name-handler)) 753 file-name-handler-alist))) 754 (car (find-operation-coding-system 755 'insert-file-contents 756 (cons name (current-buffer)) t))))) 741 757 (multibyte enable-multibyte-characters) 742 758 (detected (detect-coding-region … … 759 775 coding 'raw-text))) 760 776 (decode-coding-region (point-min) (point-max) coding) 761 (set-buffer-file-coding-system coding)) 777 ;; Force buffer-file-coding-system to what 778 ;; decode-coding-region actually used. 779 (set-buffer-file-coding-system last-coding-system-used t)) 762 780 ;; Set the default-directory to the dir of the 763 781 ;; superior buffer.
