aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2009-03-14 03:03:25 +0000
committerStefan Monnier2009-03-14 03:03:25 +0000
commit3ba41ce473f6c9f61e9f131fd086fc535b78ec9e (patch)
treeab1931c5cb642811296bf6b4e15d4898d06167ba
parent405ee48db358592c2d18ab16266180f6d952ac33 (diff)
downloademacs-3ba41ce473f6c9f61e9f131fd086fc535b78ec9e.tar.gz
emacs-3ba41ce473f6c9f61e9f131fd086fc535b78ec9e.zip
(tar-extract): Setup the buffer's name, undo-list, and
modified status before running the major-mode.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/tar-mode.el14
2 files changed, 7 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 38886bb0e18..e056053641f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -5,6 +5,9 @@
5 5
62009-03-14 Stefan Monnier <monnier@iro.umontreal.ca> 62009-03-14 Stefan Monnier <monnier@iro.umontreal.ca>
7 7
8 * tar-mode.el (tar-extract): Setup the buffer's name, undo-list, and
9 modified status before running the major-mode.
10
8 * simple.el (undo): Don't loop when encountering empty undo records. 11 * simple.el (undo): Don't loop when encountering empty undo records.
9 12
102009-03-13 Tassilo Horn <tassilo@member.fsf.org> 132009-03-13 Tassilo Horn <tassilo@member.fsf.org>
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 07d1a54d87b..5da38db052b 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -622,10 +622,6 @@ inside of a tar archive without extracting it and re-archiving it.
622 622
623See also: variables `tar-update-datestamp' and `tar-anal-blocksize'. 623See also: variables `tar-update-datestamp' and `tar-anal-blocksize'.
624\\{tar-mode-map}" 624\\{tar-mode-map}"
625 ;; this is not interactive because you shouldn't be turning this
626 ;; mode on and off. You can corrupt things that way.
627 ;; rms: with permanent locals, it should now be possible to make this work
628 ;; interactively in some reasonable fashion.
629 (make-local-variable 'tar-parse-info) 625 (make-local-variable 'tar-parse-info)
630 (set (make-local-variable 'require-final-newline) nil) ; binary data, dude... 626 (set (make-local-variable 'require-final-newline) nil) ; binary data, dude...
631 (set (make-local-variable 'local-enable-local-variables) nil) 627 (set (make-local-variable 'local-enable-local-variables) nil)
@@ -839,15 +835,13 @@ appear on disk when you save the tar-file's buffer."
839 (setq default-directory 835 (setq default-directory
840 (with-current-buffer tar-buffer 836 (with-current-buffer tar-buffer
841 default-directory)) 837 default-directory))
842 (normal-mode) ; pick a mode.
843 (rename-buffer bufname) 838 (rename-buffer bufname)
844 (make-local-variable 'tar-superior-buffer)
845 (make-local-variable 'tar-superior-descriptor)
846 (setq tar-superior-buffer tar-buffer)
847 (setq tar-superior-descriptor descriptor)
848 (setq buffer-read-only read-only-p)
849 (set-buffer-modified-p nil) 839 (set-buffer-modified-p nil)
850 (setq buffer-undo-list undo-list) 840 (setq buffer-undo-list undo-list)
841 (normal-mode) ; pick a mode.
842 (set (make-local-variable 'tar-superior-buffer) tar-buffer)
843 (set (make-local-variable 'tar-superior-descriptor) descriptor)
844 (setq buffer-read-only read-only-p)
851 (tar-subfile-mode 1))) 845 (tar-subfile-mode 1)))
852 (if view-p 846 (if view-p
853 (view-buffer 847 (view-buffer