Now on revision 106167. Conflicting tags: mh-e-doc-8.3 mh-e-8.3 ------------------------------------------------------------ revno: 106167 committer: Chong Yidong 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. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-10-22 10:57:50 +0000 +++ doc/emacs/ChangeLog 2011-10-23 03:38:23 +0000 @@ -1,3 +1,7 @@ +2011-10-23 Chong Yidong + + * buffers.texi (Misc Buffer): Don't mention vc-toggle-read-only. + 2011-10-22 Chong Yidong * windows.texi (Displaying Buffers): Fix broken lispref link. === modified file 'doc/emacs/buffers.texi' --- doc/emacs/buffers.texi 2011-10-22 01:17:33 +0000 +++ 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 -non-@code{nil}. 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 +non-@code{nil}. @findex rename-buffer @kbd{M-x rename-buffer} changes the name of the current buffer. You === modified file 'etc/NEWS' --- etc/NEWS 2011-10-21 14:45:34 +0000 +++ 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' --- lisp/ChangeLog 2011-10-22 17:06:13 +0000 +++ lisp/ChangeLog 2011-10-23 03:38:23 +0000 @@ -1,3 +1,15 @@ +2011-10-23 Chong Yidong + + * 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 Fix bug #9560, sporadic wrong indentation; improve instrumentation === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2011-10-20 00:26:14 +0000 +++ lisp/cedet/ChangeLog 2011-10-23 03:38:23 +0000 @@ -1,3 +1,14 @@ +2011-10-23 Chong Yidong + + * 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 * ede.el (ede-minor-mode,global-ede-mode): === modified file 'lisp/cedet/ede.el' --- lisp/cedet/ede.el 2011-10-20 00:26:14 +0000 +++ 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' --- lisp/cedet/ede/project-am.el 2011-01-25 04:08:28 +0000 +++ 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' --- lisp/cedet/ede/util.el 2011-01-25 04:08:28 +0000 +++ 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' --- lisp/files.el 2011-10-12 18:32:35 +0000 +++ 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' --- lisp/vc/ediff-init.el 2011-03-03 08:19:34 +0000 +++ 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' --- lisp/vc/vc-hooks.el 2011-01-26 08:36:39 +0000 +++ 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. ------------------------------------------------------------ revno: 106166 committer: martin rudalics branch nick: trunk timestamp: Sat 2011-10-22 19:06:13 +0200 message: In mouse-drag-line correctly use window-in-direction. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-10-22 10:17:25 +0000 +++ lisp/ChangeLog 2011-10-22 17:06:13 +0000 @@ -12,7 +12,7 @@ 2011-10-22 Martin Rudalics * mouse.el (mouse-drag-line): Fix minibuffer resizing broken by - last fix. + last fix. Use window-in-direction correctly. 2011-10-21 Chong Yidong === modified file 'lisp/mouse.el' --- lisp/mouse.el 2011-10-22 09:43:09 +0000 +++ lisp/mouse.el 2011-10-22 17:06:13 +0000 @@ -419,8 +419,9 @@ (cond ((eq line 'header) ;; Check whether header-line can be dragged at all. - (when (window-at-side-p window 'top) - (setq done t))) + (if (window-at-side-p window 'top) + (setq done t) + (setq window (window-in-direction 'above window t)))) ((eq line 'mode) ;; Check whether mode-line can be dragged at all. (when (and (window-at-side-p window 'bottom) @@ -436,7 +437,7 @@ window ;; If the scroll bar is on the start-event window's left, ;; adjust the window on the left of it. - (window-in-direction 'left window))))) + (window-in-direction 'left window t))))) ;; Start tracking. (track-mouse ------------------------------------------------------------ revno: 106165 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-10-22 18:57:50 +0800 message: * doc/emacs/windows.texi (Displaying Buffers): Fix broken lispref link. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-10-22 01:17:33 +0000 +++ doc/emacs/ChangeLog 2011-10-22 10:57:50 +0000 @@ -1,5 +1,9 @@ 2011-10-22 Chong Yidong + * windows.texi (Displaying Buffers): Fix broken lispref link. + +2011-10-22 Chong Yidong + * mini.texi (Minibuffer Exit): Rename from Strict Completion. Move confirm-nonexistent-file-or-buffer discussion here. === modified file 'doc/emacs/windows.texi' --- doc/emacs/windows.texi 2011-09-24 18:19:20 +0000 +++ doc/emacs/windows.texi 2011-10-22 10:57:50 +0000 @@ -343,8 +343,8 @@ additionally select the displaying window so that you can begin editing its buffer. The command @kbd{C-x `} (@code{next-error}) is one example (@pxref{Compilation Mode}). Such commands work by calling -@code{pop-to-buffer} internally. @xref{Displaying Buffers,,Displaying -Buffers in Windows, elisp, The Emacs Lisp Reference Manual}. +@code{pop-to-buffer} internally. @xref{Switching Buffers,,Switching +to a Buffer in a Window, elisp, The Emacs Lisp Reference Manual}. Commands with names ending in @code{-other-window} behave like @code{display-buffer}, except that they never display in the selected