Mercurial > emacs
changeset 12662:07ba0f6e9ada
(tar-copy): Inhibit use of jka-compr handler
when both to- and from- files would use it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 25 Jul 1995 20:27:07 +0000 |
parents | 3c0fbefb3833 |
children | 14d407b83eb3 |
files | lisp/tar-mode.el |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/tar-mode.el Tue Jul 25 20:26:10 1995 +0000 +++ b/lisp/tar-mode.el Tue Jul 25 20:27:07 1995 +0000 @@ -789,9 +789,20 @@ (name (tar-header-name tokens)) (size (tar-header-size tokens)) (start (+ (tar-desc-data-start descriptor) tar-header-offset -1)) - (end (+ start size))) + (end (+ start size)) + (inhibit-file-name-handlers inhibit-file-name-handlers) + (inhibit-file-name-operation inhibit-file-name-operation)) (save-restriction (widen) + ;; Inhibit compressing a subfile again if *both* name and + ;; to-file are handled by jka-compr + (if (and (eq (find-file-name-handler name 'write-region) 'jka-compr-handler) + (eq (find-file-name-handler to-file 'write-region) 'jka-compr-handler)) + (setq inhibit-file-name-handlers + (cons 'jka-compr-handler + (and (eq inhibit-file-name-operation 'write-region) + inhibit-file-name-handlers)) + inhibit-file-name-operation 'write-region)) (write-region start end to-file)) (message "Copied tar entry %s to %s" name to-file)))