]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
Doc: NR - 3.4.2 - update eg. Score.skipTypesetting
[lilypond.git] / scm / lily.scm
index 27ba76ab378e3d0b1670666bf323b0089f0dada6..ff5d66dfeda1ca70294b161031d538d6815b16bf 100644 (file)
    (string-downcase
     (car (string-tokenize (utsname:sysname (uname)) char-set:letter)))))
 
+;; We don't use (srfi srfi-39) (parameter objects) here because that
+;; does not give us a name/handle to the underlying fluids themselves.
+
+(define %parser (make-fluid))
+(define %location (make-fluid))
+;; No public setters: should not get overwritten in action
+(define-public (*parser*) (fluid-ref %parser))
+(define-public (*location*) (fluid-ref %location))
+;; but properly scoped location should be fine
+(defmacro-public with-location (loc . body)
+  `(with-fluids ((,%location ,loc)) ,@body))
+
+;; It would be nice to convert occurences of parser/location to
+;; (*parser*)/(*location*) using the syncase module but it is utterly
+;; broken in GUILE 1 and would require changing a lot of unrelated
+;; innocuous constructs which just happen to fall apart with
+;; inscrutable error messages.
+
 ;;
 ;; Session-handling variables and procedures.
 ;;
@@ -560,7 +578,6 @@ messages into errors.")
     "auto-beam.scm"
     "chord-name.scm"
     "bezier-tools.scm"
-    "ly-syntax-constructors.scm"
 
     "define-context-properties.scm"
     "translation-functions.scm"