summaryrefslogtreecommitdiff
path: root/lisp/vc-hooks.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-12-15 16:38:05 +0000
committerRichard M. Stallman <rms@gnu.org>1994-12-15 16:38:05 +0000
commitc844616ca64344a4f414c0717f1ce06fb4305b0b (patch)
treee979f56f3b97bdd82bfbf2902f92466ed585ebb9 /lisp/vc-hooks.el
parente547d71e2cfd9d8e95a044c06ceb1db8fb3a3fee (diff)
downloademacs-c844616ca64344a4f414c0717f1ce06fb4305b0b.tar.gz
(vc-toggle-read-only): Accept prefix arg
and pass it along to vc-next-action.
Diffstat (limited to 'lisp/vc-hooks.el')
-rw-r--r--lisp/vc-hooks.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index 23faab08947..6780f3ad703 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -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)