summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-11-07 18:19:48 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-11-07 18:19:48 +0000
commit6960d7b9bd5f7a3de26bc79ef2686a96f69f86ef (patch)
tree7d2727b300035f1f28dab53f3ca9737c74efe1e4 /lisp
parentb42b2189a37b5f5186d1731acf129ba9a3c15ff7 (diff)
downloademacs-6960d7b9bd5f7a3de26bc79ef2686a96f69f86ef.tar.gz
emacs-6960d7b9bd5f7a3de26bc79ef2686a96f69f86ef.tar.bz2
emacs-6960d7b9bd5f7a3de26bc79ef2686a96f69f86ef.zip
* tar-mode.el (tar-copy): Call write-region on the right buffer
(Bug#4857).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/tar-mode.el10
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 <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).
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)