Commit 76386c5a authored by Bastien Guerry's avatar Bastien Guerry

Fix bug #11726 -- send a message after `toggle-read-only'.

Thanks to Drew Adam for reporting this.
parent 2ee3d7f0
2012-06-22 Bastien Guerry <bzg@gnu.org>
* files.el (toggle-read-only): Display a message telling whether
the buffer is read-only or not (bug#11726).
2012-06-22 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/gv.el: New file.
......
......@@ -4857,6 +4857,7 @@ properties or buffer state) and make changes, temporarily bind
(not buffer-read-only))) ; If buffer-read-only is set correctly,
nil ; do nothing.
;; Toggle.
(progn
(cond
((and buffer-read-only view-mode)
(View-exit-and-edit)
......@@ -4868,7 +4869,9 @@ properties or buffer state) and make changes, temporarily bind
(not (eq (get major-mode 'mode-class) 'special)))
(view-mode-enter))
(t (setq buffer-read-only (not buffer-read-only))
(force-mode-line-update)))))
(force-mode-line-update))))
(message "Read-only %s for this buffer"
(if buffer-read-only "enabled" "disabled"))))
(defun insert-file (filename)
"Insert contents of file FILENAME into buffer after point.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment