tar-mode buffer-read-only fix

* lisp/tar-mode.el (tar-mode): Fix saving by conditionally undoing
`special-mode' setting of `buffer-read-only'.

Fixes: debbugs:11010
This commit is contained in:
Aaron S. Hawley 2012-03-16 00:21:23 -07:00 committed by Glenn Morris
parent 71ec069c23
commit 6f09f6ed08
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2012-03-16 Aaron S. Hawley <Aaron.S.Hawley@gmail.com>
* tar-mode.el (tar-mode): Fix saving by conditionally undoing
`special-mode' setting of `buffer-read-only'. (Bug#11010)
2012-03-16 Glenn Morris <rgm@gnu.org>
* view.el (view-buffer, view-buffer-other-window)

View file

@ -634,6 +634,9 @@ 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}"
(and buffer-file-name
(file-writable-p buffer-file-name)
(setq buffer-read-only nil)) ; undo what `special-mode' did
(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)