summaryrefslogtreecommitdiff
path: root/lisp/tar-mode.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-11-03 20:37:28 +0000
committerKarl Heuer <kwzh@gnu.org>1994-11-03 20:37:28 +0000
commitc9e7c08f8cbbec50fc81b3f39389900154c16816 (patch)
tree2429f5908e0f97561472c7427accca306c97aa91 /lisp/tar-mode.el
parent6b947b18d75d9e2546ec0a3aa53eb468926eebb0 (diff)
downloademacs-c9e7c08f8cbbec50fc81b3f39389900154c16816.tar.gz
(tar-extract): Set default-directory to that of the superior buffer, not the
pseudo-dir formed from the archive name.
Diffstat (limited to 'lisp/tar-mode.el')
-rw-r--r--lisp/tar-mode.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 894349cf4f8..9dd9732fab8 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -700,6 +700,12 @@ save your changes to disk."
(make-local-variable 'tar-superior-descriptor)
(setq tar-superior-buffer tar-buffer)
(setq tar-superior-descriptor descriptor)
+ ;; Set the default-directory to the dir of the
+ ;; superior buffer.
+ (setq default-directory
+ (save-excursion
+ (set-buffer tar-superior-buffer)
+ default-directory))
(tar-subfile-mode 1)