%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************

#(ly:set-option 'eps-box-padding 3.000000)



\paper {
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}




% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "/lilypond-2.24.4/input/regression/other/scheme-error-locations.ly"
\sourcefileline 0
\version "2.24.2"

\header {
  texidoc = "When using the @code{-dcompile-scheme-code} option,
Scheme errors point at the precise form where the error occurs
(this is limited by the precision of the information Guile provides)."
}

expect-error = ##t

% Error will point to "#(begin" line
#(begin
  (define (f x)
    (1+ (g x)))
  (define (g x)
    (1+ (h x)))
  (define (h x)
    (1+ (i x)))
  (define (i x)
    (1+ x))
  (f 'oops))

#(ly:set-option 'compile-scheme-code)

% Error should point to a more specific line, although it might
% not point to the "(1+ x)" line because Guile does not always
% retain all stack info.
#(begin
  (define (f x)
    (1+ (g x)))
  (define (g x)
    (1+ (h x)))
  (define (h x)
    (1+ (i x)))
  (define (i x)
    (1+ x))
  (f 'oops))



% ****************************************************************
% end ly snippet
% ****************************************************************
