From 2c894ac3f60274f9fdd0bf2593cfb856c5c7b13f Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Fri, 16 Jun 2017 10:50:58 +0200 Subject: [PATCH] Issue 5148/1: Various chain-assoc-get -> #:properties --- ly/toc-init.ly | 3 ++- scm/define-markup-commands.scm | 13 ++++++------- scm/harp-pedals.scm | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ly/toc-init.ly b/ly/toc-init.ly index c3fd5ab57d..ad7c64b72c 100644 --- a/ly/toc-init.ly +++ b/ly/toc-init.ly @@ -36,13 +36,14 @@ tocItemWithDotsMarkup = \markup \fill-with-pattern #1 #RIGHT . \fromproperty #'toc:text \fromproperty #'toc:page #(define-markup-list-command (table-of-contents layout props) () + #:properties ((baseline-skip)) ( _i "Outputs the table of contents, using the paper variable @code{tocTitleMarkup} for its title, then the list of lines built using the @code{tocItem} music function Usage: @code{\\markuplist \\table-of-contents}" ) (cons (interpret-markup layout props (ly:output-def-lookup layout 'tocTitleMarkup)) - (space-lines (chain-assoc-get 'baseline-skip props) + (space-lines baseline-skip (map (lambda (toc-item) (let ((label (car toc-item)) (toc-markup (cadr toc-item)) diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 370d9de4f2..3e7b2f2308 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -2637,6 +2637,7 @@ may be any property supported by @rinternals{font-interface}, (define-markup-command (abs-fontsize layout props size arg) (number? markup?) + #:properties ((word-space 0.6) (baseline-skip 3)) #:category font "Use @var{size} as the absolute font size (in points) to display @var{arg}. Adjusts @code{baseline-skip} and @code{word-space} accordingly. @@ -2652,14 +2653,12 @@ Adjusts @code{baseline-skip} and @code{word-space} accordingly. @end lilypond" (let* ((ref-size (ly:output-def-lookup layout 'text-font-size 12)) (text-props (list (ly:output-def-lookup layout 'text-font-defaults))) - (ref-word-space (chain-assoc-get 'word-space text-props 0.6)) - (ref-baseline (chain-assoc-get 'baseline-skip text-props 3)) (magnification (/ size ref-size))) (interpret-markup layout (cons - `((baseline-skip . ,(* magnification ref-baseline)) - (word-space . ,(* magnification ref-word-space)) + `((baseline-skip . ,(* magnification baseline-skip)) + (word-space . ,(* magnification word-space)) (font-size . ,(magnification->font-size magnification))) props) arg))) @@ -4452,6 +4451,7 @@ Draw vertical brackets around @var{arg}. (padding) (size 1) (thickness 1) + (line-thickness 0.1) (width 0.25)) " @cindex placing parentheses around text @@ -4482,12 +4482,11 @@ a column containing several lines of text. (let* ((m (interpret-markup layout props arg)) (scaled-width (* size width)) (scaled-thickness - (* (chain-assoc-get 'line-thickness props 0.1) - thickness)) + (* line-thickness thickness)) (half-thickness (min (* size 0.5 scaled-thickness) (* (/ 4 3.0) scaled-width))) - (padding (chain-assoc-get 'padding props half-thickness))) + (padding (or padding half-thickness))) (parenthesize-stencil m half-thickness scaled-width angularity padding))) diff --git a/scm/harp-pedals.scm b/scm/harp-pedals.scm index 9365f0a034..58576a3148 100644 --- a/scm/harp-pedals.scm +++ b/scm/harp-pedals.scm @@ -68,7 +68,7 @@ spacing after the divider). (details (begin (harp-pedal-check pedal-list) harp-pedal-details)) (dy (* size (assoc-get 'box-offset details 0.8))) ; offset of the box center from the line (line-width (* (ly:output-def-lookup layout 'line-thickness) - (chain-assoc-get 'thickness props 0.5))) + thickness)) (box-width (* size (assoc-get 'box-width details 0.4))) (box-hheight (* size (/ (assoc-get 'box-height details 1.0) 2))) ; half the box-height, saves some divisions by 2 (spacebeforedivider (* size (assoc-get 'space-before-divider details 0.8))) ; full space between boxes before the first divider -- 2.39.2