Prepare for any keys in blame listings.
This commit is contained in:
parent
f37006ab09
commit
ac4471bfc3
2 changed files with 23 additions and 14 deletions
|
@ -140,7 +140,8 @@
|
||||||
(#:context-post ctx-post "")
|
(#:context-post ctx-post "")
|
||||||
(#:highlight-pre hl-pre a:error)
|
(#:highlight-pre hl-pre a:error)
|
||||||
(#:highlight-post hl-post a:default)
|
(#:highlight-post hl-post a:default)
|
||||||
(#:context context 3))
|
(#:context context 3)
|
||||||
|
(#:keys keys '(number line comment)))
|
||||||
(let loop ((lines lines)
|
(let loop ((lines lines)
|
||||||
(number 1)
|
(number 1)
|
||||||
(printed-something #f)
|
(printed-something #f)
|
||||||
|
@ -179,20 +180,27 @@
|
||||||
(add1 number)
|
(add1 number)
|
||||||
#t
|
#t
|
||||||
#t
|
#t
|
||||||
(cons (list (format "\t~A~A. ~A" pre-str number post-str)
|
(cons (map (lambda (key)
|
||||||
(format "~A~A~A"
|
(case key
|
||||||
pre-str
|
((number)
|
||||||
(if (ldict? line)
|
(format "\t~A~A. ~A" pre-str number post-str))
|
||||||
(ldict-ref line 'line)
|
((line)
|
||||||
line)
|
(format "~A~A~A"
|
||||||
post-str)
|
|
||||||
(if comment
|
|
||||||
(format "~A # <<< ~A~A"
|
|
||||||
pre-str
|
pre-str
|
||||||
comment
|
(if (ldict? line)
|
||||||
post-str)
|
(ldict-ref line 'line)
|
||||||
"")
|
line)
|
||||||
)
|
post-str))
|
||||||
|
((comment)
|
||||||
|
(if comment
|
||||||
|
(format "~A # <<< ~A~A"
|
||||||
|
pre-str
|
||||||
|
comment
|
||||||
|
post-str)
|
||||||
|
""))
|
||||||
|
(else
|
||||||
|
"xxx")))
|
||||||
|
keys)
|
||||||
rtbl)))
|
rtbl)))
|
||||||
(loop (cdr lines)
|
(loop (cdr lines)
|
||||||
(+ number 1)
|
(+ number 1)
|
||||||
|
|
|
@ -180,6 +180,7 @@
|
||||||
blame
|
blame
|
||||||
hls
|
hls
|
||||||
#:context -1
|
#:context -1
|
||||||
|
#:keys '(commit number line comment)
|
||||||
)))
|
)))
|
||||||
|
|
||||||
;; Prints nicely printed payments
|
;; Prints nicely printed payments
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue