1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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

@ -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)