]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
Issue 4422/1: Remove parser/location global variable setup
[lilypond.git] / scm / lily.scm
index 27ba76ab378e3d0b1670666bf323b0089f0dada6..b2283e548719975b74db44bfb8fc754dfa68c447 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))
+
+;; 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.
 ;;