]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/translation-functions.scm
Issue 3666: Format error message for argument errors more nicely
[lilypond.git] / scm / translation-functions.scm
index bc988ebd5a79e5854806b65216727c5a596ec43b..9bc12cc53c170745b4c5011cfb3b72b059a4d6e9 100644 (file)
@@ -321,14 +321,14 @@ along with @var{minimum-fret}, @var{maximum-stretch}, and
 if no fingering is present."
       (let* ((articulations (ly:event-property ev 'articulations))
              (finger-found #f))
-        (map (lambda (art)
-               (let* ((num (ly:event-property art 'digit)))
-
-                 (if (and (ly:in-event-class? art 'fingering-event)
-                          (number? num)
-                          (> num 0))
-                     (set! finger-found num))))
-             articulations)
+        (for-each (lambda (art)
+                    (let* ((num (ly:event-property art 'digit)))
+
+                      (if (and (ly:in-event-class? art 'fingering-event)
+                               (number? num)
+                               (> num 0))
+                          (set! finger-found num))))
+                  articulations)
         finger-found))
 
     (define (delete-free-string string)
@@ -464,9 +464,11 @@ the current tuning?"
                (if fit-string
                    (set-fret! pitch-entry fit-string finger)
                    (begin
-                     (ly:warning (_ "No string for pitch ~a (given frets ~a)")
-                                 pitch
-                                 specified-frets)
+                     (ly:event-warning
+                      (list-ref notes (cdr pitch-entry))
+                      (_ "No string for pitch ~a (given frets ~a)")
+                      pitch
+                      specified-frets)
                      (kill-note! string-fret-fingers
                                  (cdr pitch-entry)))))))
        (sort pitch-alist (lambda (pitch-entry-a pitch-entry-b)
@@ -580,7 +582,7 @@ only ~a fret labels provided")
   (make-vcenter-markup
    (format #f "~a" fret-number)))
 
-;; The 5-string banjo has got a extra string, the fifth (duh), which
+;; The 5-string banjo has got an extra string, the fifth (duh), which
 ;; starts at the fifth fret on the neck.  Frets on the fifth string
 ;; are referred to relative to the other frets:
 ;;   the "first fret" on the fifth string is really the sixth fret