]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 3335: Remove "dispatch" function from scm/output-svg.scm
authorDavid Kastrup <dak@gnu.org>
Fri, 26 Apr 2013 14:03:38 +0000 (16:03 +0200)
committerDavid Kastrup <dak@gnu.org>
Fri, 10 May 2013 09:53:18 +0000 (11:53 +0200)
It does not appear to make any sense at all.

scm/output-svg.scm

index a15a9d8ad0bc59432a8b69bf164017a56fa78ccf..354bff4e0521e79bf9fa3f8cf6e3c2ad496c45ee 100644 (file)
@@ -17,7 +17,6 @@
 ;;;; along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (scm output-svg))
-(define this-module (current-module))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; globals
 
 (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
 ;;;
 
 (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
   "")
 
 (define (named-glyph font name)
-  (dispatch `(fontify ,font ,name)))
+  (fontify font name))
 
 (define (no-origin)
   "")
             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
   (let ((escaped-string (string-regexp-substitute
                          "<" "&lt;"
                          (string-regexp-substitute "&" "&amp;" string))))
-    (dispatch `(fontify ,pango-font-description
-                       ,(entity 'tspan escaped-string)))))
+    (fontify pango-font-description
+             (entity 'tspan escaped-string))))