From 1b8a1599c84f25bdca866fc4dc1a7f2217901c4f Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Fri, 30 Apr 2021 15:32:08 +0200 Subject: [PATCH 05/11] etc: committer: Support (list exp ...) in #:make-flags. * etc/committer.scm.in (unwrap-list): New procedure, supporting 'quasiquote', 'quote' and 'list'. (change-commit-message/one-pass)[unwrap-list]: Use new procedure. --- etc/committer.scm.in | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/etc/committer.scm.in b/etc/committer.scm.in index 231f27fe4e..1f8f06b9f1 100755 --- a/etc/committer.scm.in +++ b/etc/committer.scm.in @@ -291,6 +291,15 @@ Return false if all changes could be explained and truth otherwise." (define (make-patch-summary) (%make-patch-summary #f #f #f)) +;; '(x ...) -> (x ...) +;; `(x ...) -> (x ...) +;; (list x ...) -> (x ...) +(define (unwrap-list list) + (case (car list) + ((quasiquote quote) (second list)) + ((list) (cdr list)) + (else (error "I can't interpret that as a list!")))) + (define* (change-commit-message/one-pass file-name old new summary #:optional (port (current-output-port))) @@ -402,8 +411,7 @@ SUMMARY: first using a ‘void port’, then with the ‘real’ output port." (case keyword ((#:make-flags) (format port "[arguments]<#:make-flags>:") - ;; second: skip ' and ` - (if (explain-list-delta (second old) (second new) + (if (explain-list-delta (unwrap-list old) (unwrap-list new) #:pairwise/change explain-make-flags/change) ;; There were some unexplained changes. (format port " Update.~%") -- 2.31.1