# HG changeset patch # User Richard M. Stallman # Date 787509485 0 # Node ID 332014233a2c5bc26fea269ccdb4e8d8ecdf9397 # Parent a52d1ab148f574edc74ca664ee10edbdcd87c731 (vc-toggle-read-only): Accept prefix arg and pass it along to vc-next-action. diff -r a52d1ab148f5 -r 332014233a2c lisp/vc-hooks.el --- a/lisp/vc-hooks.el Thu Dec 15 16:30:39 1994 +0000 +++ b/lisp/vc-hooks.el Thu Dec 15 16:38:05 1994 +0000 @@ -161,14 +161,15 @@ (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)