]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/markup-macros.scm
Imported Upstream version 2.18.0
[lilypond.git] / scm / markup-macros.scm
index 26390a6bd7e3ddb51675ba3edb5ef789c86e7d7b..72b107f8468a83261d38c31209f0d29235534115 100644 (file)
@@ -147,7 +147,7 @@ command.  There is no protection against circular definitions.
                                         ((not (null? (cdr prop-spec)))
                                          `(list ',(car prop-spec) ,(cadr prop-spec)))
                                         (else
-                                          `(list ',(car prop-spec)))))
+                                         `(list ',(car prop-spec)))))
                                 (if (pair? args)
                                     properties
                                     (list)))))
@@ -197,7 +197,7 @@ interpreted, returns a list of stencils instead of a single one"
                                         ((not (null? (cdr prop-spec)))
                                          `(list ',(car prop-spec) ,(cadr prop-spec)))
                                         (else
-                                          `(list ',(car prop-spec)))))
+                                         `(list ',(car prop-spec)))))
                                 (if (pair? args)
                                     properties
                                     (list)))))
@@ -384,10 +384,10 @@ against SIGNATURE, reporting MAKE-NAME as the user-invoked function.
                       (set! args (cons `(list ,@(compile-all-markup-expressions (car rest))) args))
                       (set! rest (cdr rest)))
                      (else
-                       ;; pick up one arg in `rest'
-                       (receive (a r) (compile-markup-arg rest)
-                                (set! args (cons a args))
-                                (set! rest r))))))))
+                      ;; pick up one arg in `rest'
+                      (receive (a r) (compile-markup-arg rest)
+                               (set! args (cons a args))
+                               (set! rest r))))))))
         ((and (pair? expr)
               (pair? (car expr))
               (keyword? (caar expr)))
@@ -398,9 +398,9 @@ against SIGNATURE, reporting MAKE-NAME as the user-invoked function.
               (string? (car expr))) ;; expr === ("string" ...)
          (values `(make-simple-markup ,(car expr)) (cdr expr)))
         (else
-          ;; expr === (symbol ...) or ((funcall ...) ...)
-          (values (car expr)
-                  (cdr expr)))))
+         ;; expr === (symbol ...) or ((funcall ...) ...)
+         (values (car expr)
+                 (cdr expr)))))
 
 (define (compile-all-markup-args expr)
   "Transform `expr' into markup arguments"
@@ -454,21 +454,3 @@ against SIGNATURE, reporting MAKE-NAME as the user-invoked function.
                (string->symbol (format #f "~a-markup-list" code)))))
     (and proc (markup-list-function? proc)
          (cons proc (markup-command-signature proc)))))
-
-;;;;;;;;;;;;;;;;;;;;;;
-;;; used in parser.yy to map a list of markup commands on markup arguments
-(define-public (map-markup-command-list commands markups)
-  "`markups' being a list of markups, eg (markup1 markup2 markup3),
-and `commands' a list of commands with their scheme arguments, in reverse order,
-eg: ((italic) (raise 4) (bold)), maps the commands on each markup argument, eg:
- ((bold (raise 4 (italic markup1)))
-  (bold (raise 4 (italic markup2)))
-  (bold (raise 4 (italic markup3))))
-"
-  (map-in-order (lambda (arg)
-                  (let ((result arg))
-                    (for-each (lambda (cmd)
-                                (set! result (append cmd (list result))))
-                              commands)
-                    result))
-                markups))