]> git.donarmstrong.com Git - lilypond.git/commitdiff
scheme coverage fixes.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 26 Jan 2007 14:49:00 +0000 (15:49 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 26 Jan 2007 14:49:00 +0000 (15:49 +0100)
buildscripts/coverage.py
scm/define-markup-commands.scm
scm/font.scm
scm/lily-library.scm
scm/music-functions.scm
scm/output-lib.scm
scm/output-socket.scm

index 0b3b2b7aafa1f431ed8112dccfa95936c35cd728..68428decd40111526a1432b57636352cd9169cfc 100644 (file)
@@ -79,6 +79,9 @@ class SchemeChunk (Chunk):
             and not text.startswith ('(define (')):
             return 0
 
+        if text.startswith  ('(use-modules '):
+            return 0
+
         if (text.startswith  ('(define-public ')
             and not text.startswith ('(define-public (')):
             return 0
index 12dd691634b4bf127761ac77f29056e1dcf1145e..45833f08e0abf7e41cb01c8a31c3a1edaa704948 100644 (file)
@@ -848,10 +848,7 @@ any sort of property supported by @internalsref{font-interface} and
                   (cons 'font-size (+ fs increment )))))
 
     (interpret-markup layout (cons entries props) arg)))
-  
-
 
-;; FIXME -> should convert to font-size.
 (define-builtin-markup-command (magnify layout props sz arg) (number? markup?)
   "Set the font magnification for the its argument. In the following
 example, the middle A will be 10% larger:
@@ -863,7 +860,7 @@ Note: magnification only works if a font-name is explicitly selected.
 Use @code{\\fontsize} otherwise."
   (interpret-markup
    layout 
-   (prepend-alist-chain 'font-magnification sz props)
+   (prepend-alist-chain 'font-size (magnification->font-size sz) props)
    arg))
 
 (define-builtin-markup-command (bold layout props arg) (markup?)
index 8774042ca90b87d8ef458f2e7ebbb828cec44fcb..4d5a4bcef367f8c3ca93b4fb6086283bf0884204 100644 (file)
     "Century Schoolbook L" 
     "Sans" "Mono" factor))
 
-(define-public (magstep x)
-  (exp (* (/ x 6) (log 2))))
+(define-public (magstep s)
+  (exp (* (/ s 6) (log 2))))
+
+(define-public (magnification->font-size m)
+  (* 6 (/ (log m) (log 2))))
index 0746876ca3d6625d9c678c857618fe38f8ebf00a..8cc699c2540defaa2382dfad8245bc2a903fcaa9 100644 (file)
   (string<? (symbol->string (car x))
            (symbol->string (car y))))
 
-(define-public (chain-assoc x alist-list)
-  (if (null? alist-list)
-      #f
-      (let* ((handle (assoc x (car alist-list))))
-       (if (pair? handle)
-           handle
-           (chain-assoc x (cdr alist-list))))))
-
 (define-public (chain-assoc-get x alist-list . default)
   "Return ALIST entry for X. Return DEFAULT (optional, else #f) if not
 found."
index 049f27ea3ae63cf69e77267c9c4227a9a7b8652f..c4bfa93d18afb11f0c915049a8628745dde136f3 100644 (file)
@@ -620,7 +620,7 @@ of beat groupings "
   "Replace MUS by RestEvent of the same duration if it is a
 SkipEvent. Useful for extracting parts from crowded scores"
 
-  (if (equal? (ly:music-property mus 'name) 'SkipEvent)
+  (if  (memq (ly:music-property mus 'name) '(SkipEvent SkipMusic))
    (make-music 'RestEvent 'duration (ly:music-property mus 'duration))
    mus))
 
index d8f52c588e9e497ce8161e6ccd77c6ee4aa88da3..3cfefc8f3e58f53aac4f323105d7f769fb32d3ef 100644 (file)
                   (ly:grob-property grob 'text))
             ))
 
-(define-public (music-cause grob)
-  (let*
-      ((event (event-cause grob)))
-
-    (if (ly:stream-event? event)
-       (ly:event-property event 'music-cause)
-       #f)))
-
 (define-public (event-cause grob)
   (let*
       ((cause (ly:grob-property  grob 'cause)))
index e992e7c74b095605c4729338a10bdc3bb59f42cb..083d5a081be223493612e8be276aa4f366de2664 100644 (file)
@@ -55,7 +55,6 @@
 
     (cond
      ((ly:stream-event? cause) cause)
-;     ((ly:grob? cause) (music-cause cause))
      (else
       #f))))