From d1bbf27185836f37042012b255f1ce0beeb4b268 Mon Sep 17 00:00:00 2001 From: David Nalesnik Date: Sun, 15 Feb 2015 13:47:46 -0600 Subject: [PATCH] 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. --- scm/output-lib.scm | 4 ++++ 1 file changed, 4 insertions(+) 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) -- 2.39.2