From 6960d7b9bd5f7a3de26bc79ef2686a96f69f86ef Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 7 Nov 2009 18:19:48 +0000 Subject: [PATCH] * tar-mode.el (tar-copy): Call write-region on the right buffer (Bug#4857). --- lisp/ChangeLog | 3 +++ lisp/tar-mode.el | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d7829302fd..81e6b9f10b2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-11-07 Chong Yidong + * tar-mode.el (tar-copy): Call write-region on the right buffer + (Bug#4857). + * mail/rmailsum.el (rmail-summary-rmail-update): Call linum-update by hand, if necessary (Bug#4878). diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index 0e681f56702..eb7054d8844 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -909,12 +909,14 @@ the current tar-entry." (end (+ start size)) (inhibit-file-name-handlers inhibit-file-name-handlers) (inhibit-file-name-operation inhibit-file-name-operation)) - (save-restriction - (widen) + (with-current-buffer + (if (tar-data-swapped-p) tar-data-buffer (current-buffer)) ;; 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)) + (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) -- 2.11.4.GIT