Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
76386c5a
Commit
76386c5a
authored
Jun 22, 2012
by
Bastien Guerry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug #11726 -- send a message after `toggle-read-only'.
Thanks to Drew Adam for reporting this.
parent
2ee3d7f0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
12 deletions
+20
-12
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/files.el
lisp/files.el
+15
-12
No files found.
lisp/ChangeLog
View file @
76386c5a
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.
...
...
lisp/files.el
View file @
76386c5a
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment