diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-03-14 03:03:25 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-03-14 03:03:25 +0000 |
commit | 3ba41ce473f6c9f61e9f131fd086fc535b78ec9e (patch) | |
tree | ab1931c5cb642811296bf6b4e15d4898d06167ba /lisp/tar-mode.el | |
parent | 405ee48db358592c2d18ab16266180f6d952ac33 (diff) | |
download | emacs-3ba41ce473f6c9f61e9f131fd086fc535b78ec9e.tar.gz |
(tar-extract): Setup the buffer's name, undo-list, and
modified status before running the major-mode.
Diffstat (limited to 'lisp/tar-mode.el')
-rw-r--r-- | lisp/tar-mode.el | 14 |
1 files changed, 4 insertions, 10 deletions
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. See also: variables `tar-update-datestamp' and `tar-anal-blocksize'. \\{tar-mode-map}" - ;; this is not interactive because you shouldn't be turning this - ;; mode on and off. You can corrupt things that way. - ;; rms: with permanent locals, it should now be possible to make this work - ;; interactively in some reasonable fashion. (make-local-variable 'tar-parse-info) (set (make-local-variable 'require-final-newline) nil) ; binary data, dude... (set (make-local-variable 'local-enable-local-variables) nil) @@ -839,15 +835,13 @@ appear on disk when you save the tar-file's buffer." (setq default-directory (with-current-buffer tar-buffer default-directory)) - (normal-mode) ; pick a mode. (rename-buffer bufname) - (make-local-variable 'tar-superior-buffer) - (make-local-variable 'tar-superior-descriptor) - (setq tar-superior-buffer tar-buffer) - (setq tar-superior-descriptor descriptor) - (setq buffer-read-only read-only-p) (set-buffer-modified-p nil) (setq buffer-undo-list undo-list) + (normal-mode) ; pick a mode. + (set (make-local-variable 'tar-superior-buffer) tar-buffer) + (set (make-local-variable 'tar-superior-descriptor) descriptor) + (setq buffer-read-only read-only-p) (tar-subfile-mode 1))) (if view-p (view-buffer |