-;; FIXME: remove need for me, use text-append throughout
-(define (chord::text-cleanup dirty)
- "
- Recursively remove '() #f, and #<unspecified> from markup text tree.
- This allows us to leave else parts of (if # #) off.
- Otherwise, you'd have to do (if # # '()), and you'd have to
- filter-out the '() anyway.
- "
- (if (pair? dirty)
- (let ((r (car dirty)))
- (if (chord::text? r)
- (cons (if (pair? r) (chord::text-cleanup r) r)
- (chord::text-cleanup (cdr dirty)))
- (chord::text-cleanup (cdr dirty))))
- (if (chord::text? dirty)
- dirty
- '())))
-
-(define (text-append l . r)
- (if (not (chord::text? r))
- l
- (if (not (chord::text? l))
- r
- (if (null? (cdr r))
- (list 'columns l (car r))
- (text-append (list 'columns l (car r)) (cdr r))))))