]> git.eshelyaron.com Git - emacs.git/commitdiff
* tar-mode.el (tar-copy): Call write-region on the right buffer
authorChong Yidong <cyd@stupidchicken.com>
Sat, 7 Nov 2009 18:19:48 +0000 (18:19 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 7 Nov 2009 18:19:48 +0000 (18:19 +0000)
(Bug#4857).

lisp/ChangeLog
lisp/tar-mode.el

index 0d7829302fdfb7bd7aa3c5f2f7e9d63c77388c1c..81e6b9f10b26bd91e8dc1bd28f1ae13cb1e1ffd3 100644 (file)
@@ -1,5 +1,8 @@
 2009-11-07  Chong Yidong  <cyd@stupidchicken.com>
 
+       * 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).
 
index 0e681f5670252654cc4688705811f417b2f885c1..eb7054d88447e282b81fb21c4839f1039a1dca20 100644 (file)
@@ -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)