Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
c844616c
Commit
c844616c
authored
Dec 15, 1994
by
Richard M. Stallman
Browse files
(vc-toggle-read-only): Accept prefix arg
and pass it along to vc-next-action.
parent
e547d71e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
lisp/vc-hooks.el
lisp/vc-hooks.el
+5
-4
No files found.
lisp/vc-hooks.el
View file @
c844616c
...
...
@@ -161,14 +161,15 @@ Otherwise, not displayed.")
(
vc-file-setprop
file
'vc-name
(
car
name-and-type
))
(
vc-file-setprop
file
'vc-backend
(
cdr
name-and-type
))))))))
(
defun
vc-toggle-read-only
()
(
defun
vc-toggle-read-only
(
&optional
verbose
)
"Change read-only status of current buffer, perhaps via version control.
If the buffer is visiting a file registered with version control,
then check the file in or out. Otherwise, just change the read-only flag
of the buffer."
(
interactive
)
of the buffer.
If you provide a prefix argument, we pass it on to `vc-next-action'."
(
interactive
"P"
)
(
if
(
vc-backend-deduce
(
buffer-file-name
))
(
vc-next-action
nil
)
(
vc-next-action
verbose
)
(
toggle-read-only
)))
(
define-key
global-map
"\C-x\C-q"
'vc-toggle-read-only
)
...
...
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