From: David Nalesnik Date: Sun, 15 Feb 2015 19:47:46 +0000 (-0600) Subject: Scheme function to return a grob's name X-Git-Tag: release/2.19.16-1~2^2~1 X-Git-Url: https://git.donarmstrong.com/?p=lilypond.git;a=commitdiff_plain;h=d1bbf27185836f37042012b255f1ce0beeb4b268 Scheme function to return a grob's name Users of Scheme would benefit from a convenient way to access a grob's name. This patch creates the function grob::name, which takes a grob as argument and returns its name as a symbol. --- diff --git a/scm/output-lib.scm b/scm/output-lib.scm index fdcea5de64..7f956a54d5 100644 --- a/scm/output-lib.scm +++ b/scm/output-lib.scm @@ -26,6 +26,10 @@ (define-public (grob::is-live? grob) (pair? (ly:grob-basic-properties grob))) +(define-public (grob::name grob) + "Return the name of the grob @var{grob} as a symbol." + (assq-ref (ly:grob-property grob 'meta) 'name)) + (define-public (make-stencil-boxer thickness padding callback) "Return function that adds a box around the grob passed as argument." (lambda (grob)