lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scheme: problem with variable and value


From: K. Blum
Subject: scheme: problem with variable and value
Date: Fri, 20 Sep 2024 21:20:37 +0200
User-agent: Mozilla Thunderbird

Dear community,

I try to use a variable instead of a simple hard-coded value (outside the MWE, 
this would be the result of a calculation):

%-----------------------------------
\version "2.24.3"

#(define-markup-command (dosomething layout props text) (markup?)
   (let* ((myvalue 1))
     (interpret-markup
      layout props
      ; (markup #:override '(box-padding . 1) #:box text))   ; works
      (markup #:override '(box-padding . myvalue) #:box text))   ; doesn't work
     ))

\markup \dosomething "blah"
%-----------------------------------

This ends up in an error message:
----------
C:/Portable/lilypond-2.24.3/share/lilypond/2.24.3/ly/init.ly:65:2: Fehler: 
Guile signaled an error for the expression beginning here
#
 (let ((book-handler (if (defined? 'default-toplevel-book-handler)
In procedure *: Wrong type: myvalue
Wurde mit dem Return-Code 1 beendet.
----------

I've tried numerous variations of (un-)quoting, but I can't seem to find my 
mistake.
Can anybody tell me what I'm doing wrong?

Thanks in advance,
Klaus



reply via email to

[Prev in Thread] Current Thread [Next in Thread]