]> git.donarmstrong.com Git - lilypond.git/commit
Issue 2872: Provide define-session and define-session-public commands
authorDavid Kastrup <dak@gnu.org>
Mon, 1 Oct 2012 12:15:17 +0000 (14:15 +0200)
committerDavid Kastrup <dak@gnu.org>
Fri, 5 Oct 2012 16:04:45 +0000 (18:04 +0200)
commit9eb1eba8423cdd66f7bb0e51cb1b6104fe4e3019
treec16563c6fb5b00d2547aa9b02e3447b23aab3ad6
parent44240869b4d78df01ce4751fe7aae4b8d4e9d947
Issue 2872: Provide define-session and define-session-public commands

Also moves the session logic into lily.scm instead of init.ly

A session corresponds to one .ly file on the LilyPond command line;
sessions are supposed to be processed independently in one LilyPond
run.

define-session will declare a variable that has its value recorded at
the start of the first session and reinstated at the start of each
following sessions.  This is automatically the case for every variable
defined in variables in the parser module established while loading
ly/declarations-init.ly.  However, not every changeable information
handled in the .scm parts of LilyPond can easily or reasonably be
stored in the parser module.  define-session (and
define-session-public) provide a way to get the same semantics for
variables defined in the Scheme parts of LilyPond.
ly/init.ly
scm/lily.scm