lilypond-user
[Top][All Lists]
Advanced

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

How to correctly use ly:warning-located?


From: Simon Albrecht
Subject: How to correctly use ly:warning-located?
Date: Sun, 21 Feb 2016 14:55:53 +0100

Hello,

the doc string for ly:warning-located says

‘Function: ly:warning-located location str rest
A Scheme callable function to issue the warning str at the specified location in an input file. The message is formatted with format and rest.’

However, with this example

%%%%%%%%%%%
\version "2.19.36"

m =
#(define-music-function ()()
(ly:warning-located *location* "Here, \\m should be replaced with \\melisma.")
   #{ \melisma #})

<<
  {
    c'1\m d\melismaEnd
  }
  \addlyrics { test test }
>>
%%%%%%%%

I get

document.ly:5:4: Wrong type argument in position 1 (expecting string): #<procedure *location* ()>

What is the correct way?

TIA, Simon



reply via email to

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