X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fmarkup-macros.scm;h=6c50ec51280e614796229fd565401b9474d16d07;hb=90e4d7057f3857da049dfda3d130017d4719bd6b;hp=72b107f8468a83261d38c31209f0d29235534115;hpb=bd751630011a6fbfcf069ec1fc41a8eaed8a6b87;p=lilypond.git diff --git a/scm/markup-macros.scm b/scm/markup-macros.scm index 72b107f846..6c50ec5128 100644 --- a/scm/markup-macros.scm +++ b/scm/markup-macros.scm @@ -1,6 +1,6 @@ ;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; Copyright (C) 2003--2012 Han-Wen Nienhuys +;;;; Copyright (C) 2003--2015 Han-Wen Nienhuys ;;;; ;;;; LilyPond is free software: you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by @@ -110,14 +110,14 @@ command. There is no protection against circular definitions. (set! body (cddr body))) `(begin ;; define the COMMAND-markup function - ,(let* ((documentation (if (string? (car body)) - (list (car body)) - '())) - (real-body (if (or (null? documentation) + ,(let* ((documentation + (format #f "~a\n~a" (cddr args) + (if (string? (car body)) (car body) ""))) + (real-body (if (or (not (string? (car body))) (null? (cdr body))) body (cdr body)))) `(define-public (,command-name ,@args) - ,@documentation + ,documentation (let ,(map (lambda (prop-spec) (let ((prop (car prop-spec)) (default-value (if (null? (cdr prop-spec)) @@ -168,14 +168,14 @@ interpreted, returns a list of stencils instead of a single one" (set! body (cddr body))) `(begin ;; define the COMMAND-markup-list function - ,(let* ((documentation (if (string? (car body)) - (list (car body)) - '())) - (real-body (if (or (null? documentation) + ,(let* ((documentation + (format #f "~a\n~a" (cddr args) + (if (string? (car body)) (car body) ""))) + (real-body (if (or (not (string? (car body))) (null? (cdr body))) body (cdr body)))) `(define-public (,command-name ,@args) - ,@documentation + ,documentation (let ,(map (lambda (prop-spec) (let ((prop (car prop-spec)) (default-value (if (null? (cdr prop-spec)) @@ -236,11 +236,11 @@ interpreted, returns a list of stencils instead of a single one" ;;;;;;;;;;;;;;;;;;;;;; ;;; markup type predicates -(define (markup-function? x) +(define-public (markup-function? x) (and (markup-command-signature x) (not (object-property x 'markup-list-command)))) -(define (markup-list-function? x) +(define-public (markup-list-function? x) (and (markup-command-signature x) (object-property x 'markup-list-command)))