summaryrefslogtreecommitdiff
path: root/lisp/tar-mode.el
diff options
context:
space:
mode:
authorAaron S. Hawley <Aaron.S.Hawley@gmail.com>2012-03-16 00:21:23 -0700
committerGlenn Morris <rgm@gnu.org>2012-03-16 00:21:23 -0700
commit6f09f6ed089766e1bd113d343576da7dd963740b (patch)
tree8cd1e3ecb11c7b8a7bc34e8aa7aa016e17c7cd82 /lisp/tar-mode.el
parent71ec069c23b27c94b8bc10b57e6fa3b8bc702a27 (diff)
downloademacs-6f09f6ed089766e1bd113d343576da7dd963740b.tar.gz
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
Diffstat (limited to 'lisp/tar-mode.el')
-rw-r--r--lisp/tar-mode.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 949ac4c0889..3eb2be15698 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -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)