[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v
From: |
Eric S. Raymond |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v |
Date: |
Fri, 02 May 2008 07:13:04 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Eric S. Raymond <esr> 08/05/02 07:13:01
Index: vc-hooks.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc-hooks.el,v
retrieving revision 1.242
retrieving revision 1.243
diff -u -b -r1.242 -r1.243
--- vc-hooks.el 1 May 2008 19:13:15 -0000 1.242
+++ vc-hooks.el 2 May 2008 07:12:59 -0000 1.243
@@ -679,19 +679,17 @@
"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.
-With prefix argument, ask for version number to check in or check out.
-Check-out of a specified version number does not lock the file;
-to do that, use this command a second time with no argument.
+throw an error, because this is not a safe or really meaningful operation
+on any version-control system newer than RCS.
-If you bind this function to \\[toggle-read-only], then Emacs checks files
-in or out whenever you toggle the read-only flag."
+Otherwise, just change the read-only flag of the buffer.
+
+If you bind this function to \\[toggle-read-only], then Emacs
+will properly intercept all attempts to toggle the read-only flag
+on version-controlled buffer."
(interactive "P")
- (if (or (and (boundp 'vc-dired-mode) vc-dired-mode)
- ;; use boundp because vc.el might not be loaded
- (vc-backend buffer-file-name))
- (vc-next-action verbose)
+ (if (vc-backend buffer-file-name)
+ (error "Toggling the readability of a version controlled file is likely
to wreak havoc.")
(toggle-read-only)))
(defun vc-default-make-version-backups-p (backend file)
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Eric S. Raymond, 2008/05/01
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v,
Eric S. Raymond <=
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Eric S. Raymond, 2008/05/02
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Juanma Barranquero, 2008/05/02
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Eric S. Raymond, 2008/05/02
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Glenn Morris, 2008/05/06
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Eric S. Raymond, 2008/05/06
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Eric S. Raymond, 2008/05/06
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Eric S. Raymond, 2008/05/07
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Eric S. Raymond, 2008/05/07
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Glenn Morris, 2008/05/08
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,v, Stefan Monnier, 2008/05/09