diff options
author | Aaron S. Hawley <Aaron.S.Hawley@gmail.com> | 2012-03-16 00:21:23 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2012-03-16 00:21:23 -0700 |
commit | 6f09f6ed089766e1bd113d343576da7dd963740b (patch) | |
tree | 8cd1e3ecb11c7b8a7bc34e8aa7aa016e17c7cd82 /lisp | |
parent | 71ec069c23b27c94b8bc10b57e6fa3b8bc702a27 (diff) | |
download | emacs-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')
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/tar-mode.el | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 35da6fc9e31..3fd5cbfcf26 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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) 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) |