From 65025034b83aac9c6ad14ce9a0fb65639634575c Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Fri, 26 Apr 2013 16:03:38 +0200 Subject: [PATCH] Issue 3335: Remove "dispatch" function from scm/output-svg.scm It does not appear to make any sense at all. --- scm/output-svg.scm | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/scm/output-svg.scm b/scm/output-svg.scm index a15a9d8ad0..354bff4e05 100644 --- a/scm/output-svg.scm +++ b/scm/output-svg.scm @@ -17,7 +17,6 @@ ;;;; along with LilyPond. If not, see . (define-module (scm output-svg)) -(define this-module (current-module)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; globals @@ -39,14 +38,6 @@ (define lily-unit-length 1.7573) -(define (dispatch expr) - (let ((keyword (car expr))) - (cond ((eq? keyword 'some-func) "") - (else (if (module-defined? this-module keyword) - (apply (eval keyword this-module) (cdr expr)) - (begin (ly:warning (_ "undefined: ~S") keyword) - "")))))) - ;; Helper functions (define-public (attributes attributes-alist) (apply string-append @@ -330,8 +321,7 @@ ;;; (define (char font i) - (dispatch - `(fontify ,font ,(entity 'tspan (char->entity (integer->char i)))))) + (fontify font (entity 'tspan (char->entity (integer->char i))))) (define (circle radius thick is-filled) (entity @@ -486,7 +476,7 @@ "") (define (named-glyph font name) - (dispatch `(fontify ,font ,name))) + (fontify font name)) (define (no-origin) "") @@ -613,7 +603,7 @@ x y)) (define (text font string) - (dispatch `(fontify ,font ,(entity 'tspan (string->entities string))))) + (fontify font (entity 'tspan (string->entities string)))) (define (url-link url x y) (string-append @@ -632,5 +622,5 @@ (let ((escaped-string (string-regexp-substitute "<" "<" (string-regexp-substitute "&" "&" string)))) - (dispatch `(fontify ,pango-font-description - ,(entity 'tspan escaped-string))))) + (fontify pango-font-description + (entity 'tspan escaped-string)))) -- 2.39.2