X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fmarkup-macros.scm;h=09ab0fc8f243dbf991f096da29c2b5f1259fa4fd;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=67db7b5e8cead5ba9cc134ea7b4406866b9a6267;hpb=0b544cfb7332615ef809b71b57ab656741311ae1;p=lilypond.git diff --git a/scm/markup-macros.scm b/scm/markup-macros.scm index 67db7b5e8c..09ab0fc8f2 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--2014 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))