From 7b23e17eb8f001a48ef27d2b30765d71c4a47f6e Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 11 Jun 2026 15:05:59 +0100 Subject: [PATCH 1/2] * lisp/vc/vc.el (vc-log-remote-unintegrated): Set vc-log-view-type. Do not merge to master. --- lisp/vc/vc.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 256a04812f6..882e572b46b 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -3643,7 +3643,8 @@ When called from Lisp, optional argument FILESET overrides the fileset." ;; REFRESH nil here because we just refreshed. (vc--outgoing-base-mergebase backend upstream-location - nil 'force-topic)))) + nil 'force-topic) + 'log-unintegrated))) ;;;###autoload (defun vc-root-log-remote-unintegrated (&optional upstream-location) From 2c6a03b08c95af79294e788e29a3c41cbdcaca04 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 11 Jun 2026 15:38:56 +0100 Subject: [PATCH 2/2] Fix fontification in short unintegrated changes logs (bug#81215) Do not merge to master. * lisp/vc/vc.el (vc--shortlog): New variable. (vc-print-log-internal): * lisp/vc/vc-git.el (vc-git-log-view-mode): * lisp/vc/vc-hg.el (vc-hg-log-view-mode): Use it. --- lisp/vc/vc-git.el | 13 +++++++++---- lisp/vc/vc-hg.el | 5 +++-- lisp/vc/vc.el | 8 ++++++++ 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 6b9530c9570..2a328f5cc9f 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1975,17 +1975,22 @@ log entries." (setq-local log-view-file-re regexp-unmatchable) (setq-local log-view-per-file-logs nil) (setq-local log-view-message-re - (if (not (memq vc-log-view-type '(long log-search with-diff))) + (if (if (eq vc-log-view-type 'log-unintegrated) + vc--shortlog + (not (memq vc-log-view-type '(long log-search with-diff)))) (cadr vc-git-root-log-format) "^commit +\\([0-9a-z]+\\)")) ;; Allow expanding short log entries. - (when (memq vc-log-view-type - '(short log-outgoing log-incoming log-unintegrated mergebase)) + (when (if (eq vc-log-view-type 'log-unintegrated) + vc--shortlog + (memq vc-log-view-type '(short log-outgoing log-incoming mergebase))) (setq truncate-lines t) (setq-local log-view-expanded-log-entry-function 'vc-git-expanded-log-entry)) (setq-local log-view-font-lock-keywords - (if (not (memq vc-log-view-type '(long log-search with-diff))) + (if (if (eq vc-log-view-type 'log-unintegrated) + vc--shortlog + (not (memq vc-log-view-type '(long log-search with-diff)))) (list (cons (nth 1 vc-git-root-log-format) (nth 2 vc-git-root-log-format))) (append diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 02db4b134fe..a45279a574c 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -471,8 +471,9 @@ the log starting from that revision." (define-derived-mode vc-hg-log-view-mode log-view-mode "Hg-Log-View" (require 'add-log) ;; we need the add-log faces - (let ((shortp (memq vc-log-view-type - '(short log-incoming log-outgoing log-unintegrated)))) + (let ((shortp (if (eq vc-log-view-type 'log-unintegrated) + vc--shortlog + (memq vc-log-view-type '(short log-incoming log-outgoing))))) (setq-local log-view-file-re regexp-unmatchable) (setq-local log-view-per-file-logs nil) (setq-local log-view-message-re diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 882e572b46b..8506e182799 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -4309,6 +4309,13 @@ button for. Same for CURRENT-REVISION. LIMIT means the usual." "Show the log for the file name(s) %s the rename" before-after)))) +(defvar-local vc--shortlog nil + "Whether this is a shortlog. +This is a hack to fix bug#81215 which came up after the Emacs 31 freeze. +For Emacs 32 that bug is fixed by replacing `vc-log-view-type' with +`vc-log-view-types'.") +(put 'vc--shortlog 'permanent-local t) + (defun vc-print-log-internal (backend files working-revision &optional is-start-revision limit type) "For specified BACKEND and FILES, show the VC log. @@ -4328,6 +4335,7 @@ LIMIT can also be a string, which means the revision before which to stop." (vc-log-internal-common backend buffer-name files type (lambda (bk buf _type-arg files-arg) + (with-current-buffer buf (setq-local vc--shortlog shortlog)) (vc-call-backend bk 'print-log files-arg buf shortlog (when is-start-revision working-revision) limit) (when log-view-vc-prev-fileset