diff options
Diffstat (limited to 'lisp/vc.el')
-rw-r--r-- | lisp/vc.el | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index 78e098d874f..3fc3784fdf1 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -1145,7 +1145,7 @@ Used by `vc-restore-buffer-context' to later restore the context." ;; ;; We may want to reparse the compilation buffer after revert ;; (reparse (and (boundp 'compilation-error-list) ;compile loaded ;; ;; Construct a list; each elt is nil or a buffer - ;; ;; iff that buffer is a compilation output buffer + ;; ;; if that buffer is a compilation output buffer ;; ;; that contains markers into the current buffer. ;; (save-current-buffer ;; (mapcar (lambda (buffer) @@ -2636,6 +2636,9 @@ changes found in the master file; use \\[universal-argument] \\[vc-next-action] (message "Reverting %s...done" file))) ;;;###autoload +(define-obsolete-function-alias 'vc-revert-buffer 'vc-revert "23.1") + +;;;###autoload (defun vc-update () "Update the current buffer's file to the latest version on its branch. If the file contains no changes, and is not locked, then this simply replaces @@ -2718,8 +2721,9 @@ return its name; otherwise return nil." (vc-resynch-buffer file t t)) ;;;###autoload -(defun vc-rollback () - "Get rid of most recently checked in version of this file." +(defun vc-rollback (&optional norevert) + "Get rid of most recently checked in version of this file. +A prefix argument NOREVERT means do not revert the buffer afterwards." (interactive "P") (vc-ensure-vc-buffer) (let* ((file buffer-file-name) @@ -3268,12 +3272,19 @@ colors. `vc-annotate-background' specifies the background color." (set (make-local-variable 'vc-annotate-parent-display-mode) display-mode))) - (vc-exec-after - `(progn - (when ,current-line - (goto-line ,current-line ,temp-buffer-name)) - (unless (active-minibuffer-window) - (message "Annotating... done")))))) + (with-current-buffer temp-buffer-name + (vc-exec-after + `(progn + ;; Ideally, we'd rather not move point if the user has already + ;; moved it elsewhere, but really point here is not the position + ;; of the user's cursor :-( + (when ,current-line ;(and (bobp)) + (let ((win (get-buffer-window (current-buffer) 0))) + (when win + (with-selected-window win + (goto-line ,current-line))))) + (unless (active-minibuffer-window) + (message "Annotating... done"))))))) (defun vc-annotate-prev-version (prefix) "Visit the annotation of the version previous to this one. |