]> git.donarmstrong.com Git - lilypond.git/commitdiff
Create ly:event-warning function
authorDavid Kastrup <dak@gnu.org>
Thu, 1 Aug 2013 15:31:00 +0000 (17:31 +0200)
committerDavid Kastrup <dak@gnu.org>
Tue, 6 Aug 2013 14:47:28 +0000 (16:47 +0200)
scm/music-functions.scm

index f4c27bf973c51a4d412586ba70328eddcc677019..ff2bcb7ec72ea5b79e311f1566247af73b4940a5 100644 (file)
@@ -891,6 +891,12 @@ actually fully cloned."
         (apply ly:input-warning ip msg rest)
         (apply ly:warning msg rest))))
 
+(define-public (ly:event-warning event msg . rest)
+  (let ((ip (ly:event-property event 'origin)))
+    (if (ly:input-location? ip)
+        (apply ly:input-warning ip msg rest)
+        (apply ly:warning msg rest))))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; setting stuff for grace context.