diff --git a/src/listing.scm b/src/listing.scm index 037fb97..96be059 100644 --- a/src/listing.scm +++ b/src/listing.scm @@ -140,7 +140,8 @@ (#:context-post ctx-post "") (#:highlight-pre hl-pre a:error) (#:highlight-post hl-post a:default) - (#:context context 3)) + (#:context context 3) + (#:keys keys '(number line comment))) (let loop ((lines lines) (number 1) (printed-something #f) @@ -179,20 +180,27 @@ (add1 number) #t #t - (cons (list (format "\t~A~A. ~A" pre-str number post-str) - (format "~A~A~A" - pre-str - (if (ldict? line) - (ldict-ref line 'line) - line) - post-str) - (if comment - (format "~A # <<< ~A~A" + (cons (map (lambda (key) + (case key + ((number) + (format "\t~A~A. ~A" pre-str number post-str)) + ((line) + (format "~A~A~A" pre-str - comment - post-str) - "") - ) + (if (ldict? line) + (ldict-ref line 'line) + line) + post-str)) + ((comment) + (if comment + (format "~A # <<< ~A~A" + pre-str + comment + post-str) + "")) + (else + "xxx"))) + keys) rtbl))) (loop (cdr lines) (+ number 1) diff --git a/src/members-print.scm b/src/members-print.scm index afe9eda..534c72f 100644 --- a/src/members-print.scm +++ b/src/members-print.scm @@ -180,6 +180,7 @@ blame hls #:context -1 + #:keys '(commit number line comment) ))) ;; Prints nicely printed payments