[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 2703629: Stop vc-print-log from jumping to the top
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] master 2703629: Stop vc-print-log from jumping to the top |
Date: |
Sun, 03 May 2015 18:32:53 +0000 |
branch: master
commit 2703629711f29f6a46e2766c10df5df5863d2ab9
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Stop vc-print-log from jumping to the top
* lisp/vc/vc.el (vc-print-log-internal): Pass nil
GOTO-LOCATION-FUNC to vc-log-internal-common when WORKING-REVISION
is not specified.
(vc-incoming-outgoing-internal): Always pass nil.
(vc-log-internal-common): When GOTO-LOCATION-FUNC is nil, don't
call it, and don't set vc-sentinel-movepoint (bug#15322).
(vc-print-root-log): Don't fetch the root working revision, nor
pass it to vc-print-log-internal.
---
lisp/vc/vc.el | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index bb4dd60..1a997a4 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2224,8 +2224,10 @@ earlier revisions. Show up to LIMIT entries (non-nil
means unlimited)."
(lambda (_bk _files-arg ret)
(vc-print-log-setup-buttons working-revision
is-start-revision limit ret))
- (lambda (bk)
- (vc-call-backend bk 'show-log-entry working-revision))
+ ;; When it's nil, point really shouldn't move (bug#15322).
+ (when working-revision
+ (lambda (bk)
+ (vc-call-backend bk 'show-log-entry working-revision)))
(lambda (_ignore-auto _noconfirm)
(vc-print-log-internal backend files working-revision
is-start-revision limit)))))
@@ -2263,8 +2265,9 @@ earlier revisions. Show up to LIMIT entries (non-nil
means unlimited)."
(let ((inhibit-read-only t))
(funcall setup-buttons-func backend files retval)
(shrink-window-if-larger-than-buffer)
- (funcall goto-location-func backend)
- (setq vc-sentinel-movepoint (point))
+ (when goto-location-func
+ (funcall goto-location-func backend)
+ (setq vc-sentinel-movepoint (point)))
(set-buffer-modified-p nil)))))
(defun vc-incoming-outgoing-internal (backend remote-location buffer-name type)
@@ -2273,7 +2276,7 @@ earlier revisions. Show up to LIMIT entries (non-nil
means unlimited)."
(lambda (bk buf type-arg _files)
(vc-call-backend bk type-arg buf remote-location))
(lambda (_bk _files-arg _ret) nil)
- (lambda (_bk) (goto-char (point-min)))
+ nil ;; Don't move point.
(lambda (_ignore-auto _noconfirm)
(vc-incoming-outgoing-internal backend remote-location buffer-name
type))))
@@ -2328,16 +2331,15 @@ When called interactively with a prefix argument,
prompt for LIMIT."
(list (when (> vc-log-show-limit 0) vc-log-show-limit)))))
(let ((backend (vc-deduce-backend))
(default-directory default-directory)
- rootdir working-revision)
+ rootdir)
(if backend
(setq rootdir (vc-call-backend backend 'root default-directory))
(setq rootdir (read-directory-name "Directory for VC root-log: "))
(setq backend (vc-responsible-backend rootdir))
(unless backend
(error "Directory is not version controlled")))
- (setq working-revision (vc-working-revision rootdir)
- default-directory rootdir)
- (vc-print-log-internal backend (list rootdir) working-revision nil limit)))
+ (setq default-directory rootdir)
+ (vc-print-log-internal backend (list rootdir) nil nil limit)))
;;;###autoload
(defun vc-log-incoming (&optional remote-location)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 2703629: Stop vc-print-log from jumping to the top,
Dmitry Gutov <=