[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106167: Make vc-toggle-read-only an
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106167: Make vc-toggle-read-only an alias for toggle-read-only. |
Date: |
Sun, 23 Oct 2011 11:38:23 +0800 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106167
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2011-10-23 11:38:23 +0800
message:
Make vc-toggle-read-only an alias for toggle-read-only.
It hasn't worked in a VC sense since revision 87208, though this was
not documented at the time (grr).
* lisp/vc/vc-hooks.el (vc-toggle-read-only): Make it an obsolete alias
for toggle-read-only. Note that this hasn't called vc-next-action
since 2008-05-02, though it wasn't documented at the time.
* lisp/files.el (toggle-read-only): Remove obsolete comment about
version control.
* doc/emacs/buffers.texi (Misc Buffer): Don't mention vc-toggle-read-only.
* lisp/cedet/ede.el (ede-maybe-checkout): Function deleted;
vc-toggle-read-only does not do version control now.
* lisp/cedet/ede/project-am.el (project-remove-file, project-add-file)
(project-new-target): Don't call ede-maybe-checkout.
* lisp/cedet/ede/util.el (ede-make-buffer-writable): Don't use
vc-toggle-read-only.
* lisp/vc/ediff-init.el (ediff-toggle-read-only-function): Use
toggle-read-only.
modified:
doc/emacs/ChangeLog
doc/emacs/buffers.texi
etc/NEWS
lisp/ChangeLog
lisp/cedet/ChangeLog
lisp/cedet/ede.el
lisp/cedet/ede/project-am.el
lisp/cedet/ede/util.el
lisp/files.el
lisp/vc/ediff-init.el
lisp/vc/vc-hooks.el
=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog 2011-10-22 10:57:50 +0000
+++ b/doc/emacs/ChangeLog 2011-10-23 03:38:23 +0000
@@ -1,3 +1,7 @@
+2011-10-23 Chong Yidong <address@hidden>
+
+ * buffers.texi (Misc Buffer): Don't mention vc-toggle-read-only.
+
2011-10-22 Chong Yidong <address@hidden>
* windows.texi (Displaying Buffers): Fix broken lispref link.
=== modified file 'doc/emacs/buffers.texi'
--- a/doc/emacs/buffers.texi 2011-10-22 01:17:33 +0000
+++ b/doc/emacs/buffers.texi 2011-10-23 03:38:23 +0000
@@ -231,13 +231,10 @@
@findex toggle-read-only
If you wish to make changes in a read-only buffer, use the command
@kbd{C-x C-q} (@code{toggle-read-only}). It makes a read-only buffer
-writable, and makes a writable buffer read-only. This
-works by setting the variable @code{buffer-read-only}, which has a local
-value in each buffer and makes the buffer read-only if its value is
address@hidden If you have files under version control, you may find
-it convenient to bind @kbd{C-x C-q} to @code{vc-toggle-read-only}
-instead. This will guard you against an operation that will confuse
-most modern version-control systems. @xref{Version Control}.
+writable, and makes a writable buffer read-only. This works by
+setting the variable @code{buffer-read-only}, which has a local value
+in each buffer and makes the buffer read-only if its value is
address@hidden
@findex rename-buffer
@kbd{M-x rename-buffer} changes the name of the current buffer. You
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2011-10-21 14:45:34 +0000
+++ b/etc/NEWS 2011-10-23 03:38:23 +0000
@@ -853,7 +853,12 @@
of a file similar to `vc-diff', but using ediff backend.
+++
-*** The option vc-initial-comment was removed in Emacs 23.2, but
+*** The option `vc-initial-comment' was removed in Emacs 23.2, but
+this was not advertised at the time.
+
++++
+*** `vc-toggle-read-only' is an obsolete alias for `toggle-read-only'.
+Since Emacs 23, it has done the same thing as `toggle-read-only', but
this was not advertised at the time.
** FIXME: xdg-open for browse-url and reportbug, 2010/08.
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-10-22 17:06:13 +0000
+++ b/lisp/ChangeLog 2011-10-23 03:38:23 +0000
@@ -1,3 +1,15 @@
+2011-10-23 Chong Yidong <address@hidden>
+
+ * files.el (toggle-read-only): Remove obsolete comment about
+ version control.
+
+ * vc/vc-hooks.el (vc-toggle-read-only): Make it an obsolete alias
+ for toggle-read-only. Note that this hasn't called vc-next-action
+ since 2008-05-02, though it wasn't documented at the time.
+
+ * vc/ediff-init.el (ediff-toggle-read-only-function): Use
+ toggle-read-only.
+
2011-10-22 Alan Mackenzie <address@hidden>
Fix bug #9560, sporadic wrong indentation; improve instrumentation
=== modified file 'lisp/cedet/ChangeLog'
--- a/lisp/cedet/ChangeLog 2011-10-20 00:26:14 +0000
+++ b/lisp/cedet/ChangeLog 2011-10-23 03:38:23 +0000
@@ -1,3 +1,14 @@
+2011-10-23 Chong Yidong <address@hidden>
+
+ * ede.el (ede-maybe-checkout): Function deleted;
+ vc-toggle-read-only does not do version control now.
+
+ * ede/util.el (ede-make-buffer-writable): Don't use
+ vc-toggle-read-only.
+
+ * ede/project-am.el (project-remove-file, project-add-file)
+ (project-new-target): Don't call ede-maybe-checkout.
+
2011-10-19 Chong Yidong <address@hidden>
* ede.el (ede-minor-mode,global-ede-mode):
=== modified file 'lisp/cedet/ede.el'
--- a/lisp/cedet/ede.el 2011-10-20 00:26:14 +0000
+++ b/lisp/cedet/ede.el 2011-10-23 03:38:23 +0000
@@ -1179,16 +1179,6 @@
Return the first non-nil value returned by PROC."
(eval (cons 'or (ede-map-targets this proc))))
-;;; VC Handling
-;;
-(defun ede-maybe-checkout (&optional buffer)
- "Check BUFFER out of VC if necessary."
- (save-excursion
- (if buffer (set-buffer buffer))
- (if (and buffer-read-only vc-mode
- (y-or-n-p "Checkout Makefile.am from VC? "))
- (vc-toggle-read-only))))
-
;;; Some language specific methods.
;;
=== modified file 'lisp/cedet/ede/project-am.el'
--- a/lisp/cedet/ede/project-am.el 2011-01-25 04:08:28 +0000
+++ b/lisp/cedet/ede/project-am.el 2011-10-23 03:38:23 +0000
@@ -214,7 +214,6 @@
target (project-am-preferred-target-type (buffer-file-name)))))
(ede-with-projectfile ot
(makefile-move-to-macro (project-am-macro ot))
- (ede-maybe-checkout)
(makefile-end-of-command)
(insert " " ofn)
(makefile-fill-paragraph nil)
@@ -226,10 +225,6 @@
"Remove the current buffer from any project targets."
(ede-with-projectfile ot
(makefile-move-to-macro (project-am-macro ot))
- (if (and buffer-read-only vc-mode
- (y-or-n-p "Checkout Makefile.am from VC? "))
- (vc-toggle-read-only t))
- (ede-maybe-checkout)
(makefile-navigate-macro (concat " *" (regexp-quote (ede-name fnnd))))
(replace-match "" t t nil 0)
(makefile-fill-paragraph nil)
@@ -271,7 +266,6 @@
(if (not ot) (error "Error creating target object %S" ntype))
(ede-with-projectfile ot
(goto-char (point-min))
- (ede-maybe-checkout)
(makefile-next-dependency)
(if (= (point) (point-min))
(goto-char (point-max))
=== modified file 'lisp/cedet/ede/util.el'
--- a/lisp/cedet/ede/util.el 2011-01-25 04:08:28 +0000
+++ b/lisp/cedet/ede/util.el 2011-10-23 03:38:23 +0000
@@ -87,12 +87,7 @@
If BUFFER isn't specified, use the current buffer."
(save-excursion
(if buffer (set-buffer buffer))
- (if buffer-read-only
- (if (and vc-mode
- (y-or-n-p (format "Check out %s? " (buffer-file-name))))
- (vc-toggle-read-only)
- (if (not vc-mode)
- (toggle-read-only -1))))))
+ (toggle-read-only -1)))
(provide 'ede/util)
=== modified file 'lisp/files.el'
--- a/lisp/files.el 2011-10-12 18:32:35 +0000
+++ b/lisp/files.el 2011-10-23 03:38:23 +0000
@@ -4700,11 +4700,7 @@
(not (eq (get major-mode 'mode-class) 'special)))
(view-mode-enter))
(t (setq buffer-read-only (not buffer-read-only))
- (force-mode-line-update)))
- (if (memq (vc-backend buffer-file-name) '(RCS SCCS))
- (message "%s" (substitute-command-keys
- (concat "File is under version-control; "
- "use \\[vc-next-action] to check in/out"))))))
+ (force-mode-line-update)))))
(defun insert-file (filename)
"Insert contents of file FILENAME into buffer after point.
=== modified file 'lisp/vc/ediff-init.el'
--- a/lisp/vc/ediff-init.el 2011-03-03 08:19:34 +0000
+++ b/lisp/vc/ediff-init.el 2011-10-23 03:38:23 +0000
@@ -1340,11 +1340,9 @@
ovr-list))))))))
-(defvar ediff-toggle-read-only-function nil
- "*Specifies the function to be used to toggle read-only.
-If nil, Ediff tries to deduce the function from the binding of C-x C-q.
-Normally, this is the `toggle-read-only' function, but, if version
-control is used, it could be `vc-toggle-read-only' or `rcs-toggle-read-only'.")
+(defvar ediff-toggle-read-only-function 'toggle-read-only
+ "Function to be used to toggle read-only status of the buffer.
+If nil, Ediff tries using the command bound to C-x C-q.")
(defcustom ediff-make-buffers-readonly-at-startup nil
"Make all variant buffers read-only when Ediff starts up.
=== modified file 'lisp/vc/vc-hooks.el'
--- a/lisp/vc/vc-hooks.el 2011-01-26 08:36:39 +0000
+++ b/lisp/vc/vc-hooks.el 2011-10-23 03:38:23 +0000
@@ -648,22 +648,8 @@
(throw 'found trial))))
templates))))
-(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,
-throw an error, because this is not a safe or really meaningful operation
-on any version-control system newer than RCS.
-
-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 (vc-backend buffer-file-name)
- (error "Toggling the readability of a version controlled file is likely
to wreak havoc")
- (toggle-read-only)))
+(define-obsolete-function-alias
+ 'vc-toggle-read-only 'toggle-read-only "24.1")
(defun vc-default-make-version-backups-p (backend file)
"Return non-nil if unmodified versions should be backed up locally.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106167: Make vc-toggle-read-only an alias for toggle-read-only.,
Chong Yidong <=