diff options
| author | Dmitry Gutov | 2024-01-11 01:21:14 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2024-01-11 01:21:41 +0200 |
| commit | 1ecb53ad2fc9888ce0d0073c8fc3f36d63394dcd (patch) | |
| tree | e139f90374e63f103a675fe45d01ffed2cc4586e | |
| parent | 6a645cd53289853bc2239657d2b0bb6384875903 (diff) | |
| download | emacs-1ecb53ad2fc9888ce0d0073c8fc3f36d63394dcd.tar.gz emacs-1ecb53ad2fc9888ce0d0073c8fc3f36d63394dcd.zip | |
vc-log-mergebase: Fix the printing of buttons at the bottom
* lisp/vc/vc.el (vc-print-log-setup-buttons):
Fix when LIMIT is a string (bug#68364).
(vc-print-log-internal): Update docstring.
| -rw-r--r-- | lisp/vc/vc.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index b8cc44fc3dc..94bc3f0911a 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -2703,20 +2703,22 @@ Not all VC backends support short logs!") | |||
| 2703 | (defun vc-print-log-setup-buttons (working-revision is-start-revision limit pl-return) | 2703 | (defun vc-print-log-setup-buttons (working-revision is-start-revision limit pl-return) |
| 2704 | "Insert at the end of the current buffer buttons to show more log entries. | 2704 | "Insert at the end of the current buffer buttons to show more log entries. |
| 2705 | In the new log, leave point at WORKING-REVISION (if non-nil). | 2705 | In the new log, leave point at WORKING-REVISION (if non-nil). |
| 2706 | LIMIT is the current maximum number of entries shown. Does | 2706 | LIMIT is the current maximum number of entries shown, or the |
| 2707 | nothing if IS-START-REVISION is non-nil and LIMIT is 1, or if | 2707 | revision (string) before which to stop. Does nothing if |
| 2708 | LIMIT is nil, or if PL-RETURN is `limit-unsupported'." | 2708 | IS-START-REVISION is non-nil and LIMIT is 1, or if LIMIT is nil, |
| 2709 | or if PL-RETURN is `limit-unsupported'." | ||
| 2709 | ;; LIMIT=1 is set by vc-annotate-show-log-revision-at-line | 2710 | ;; LIMIT=1 is set by vc-annotate-show-log-revision-at-line |
| 2710 | ;; or by vc-print-root-log with current-prefix-arg=1. | 2711 | ;; or by vc-print-root-log with current-prefix-arg=1. |
| 2711 | ;; In either case only one revision is wanted, no buttons. | 2712 | ;; In either case only one revision is wanted, no buttons. |
| 2712 | (when (and limit (not (eq 'limit-unsupported pl-return)) | 2713 | (when (and limit (not (eq 'limit-unsupported pl-return)) |
| 2713 | (not (and is-start-revision | 2714 | (not (and is-start-revision |
| 2714 | (= limit 1)))) | 2715 | (eql limit 1)))) |
| 2715 | (let ((entries 0)) | 2716 | (let ((entries 0)) |
| 2716 | (goto-char (point-min)) | 2717 | (goto-char (point-min)) |
| 2717 | (while (re-search-forward log-view-message-re nil t) | 2718 | (while (re-search-forward log-view-message-re nil t) |
| 2718 | (cl-incf entries)) | 2719 | (cl-incf entries)) |
| 2719 | (if (< entries limit) | 2720 | (if (or (stringp limit) |
| 2721 | (< entries limit)) | ||
| 2720 | ;; The log has been printed in full. Perhaps it started | 2722 | ;; The log has been printed in full. Perhaps it started |
| 2721 | ;; with a copy or rename? | 2723 | ;; with a copy or rename? |
| 2722 | ;; FIXME: We'd probably still want this button even when | 2724 | ;; FIXME: We'd probably still want this button even when |
| @@ -2811,7 +2813,8 @@ button for. Same for CURRENT-REVISION. LIMIT means the usual." | |||
| 2811 | Leave point at WORKING-REVISION, if it is non-nil. | 2813 | Leave point at WORKING-REVISION, if it is non-nil. |
| 2812 | If IS-START-REVISION is non-nil, start the log from WORKING-REVISION | 2814 | If IS-START-REVISION is non-nil, start the log from WORKING-REVISION |
| 2813 | \(not all backends support this); i.e., show only WORKING-REVISION and | 2815 | \(not all backends support this); i.e., show only WORKING-REVISION and |
| 2814 | earlier revisions. Show up to LIMIT entries (non-nil means unlimited)." | 2816 | earlier revisions. Show up to LIMIT entries (non-nil means unlimited). |
| 2817 | LIMIT can also be a string, which means the revision before which to stop." | ||
| 2815 | ;; Don't switch to the output buffer before running the command, | 2818 | ;; Don't switch to the output buffer before running the command, |
| 2816 | ;; so that any buffer-local settings in the vc-controlled | 2819 | ;; so that any buffer-local settings in the vc-controlled |
| 2817 | ;; buffer can be accessed by the command. | 2820 | ;; buffer can be accessed by the command. |