Best current method to include only once

2010-02-14 Thread Michael J. O'Donnell
For those who would like to use it too, I append a complete utility file that I use to copy in a file full of definitions with \includeIfAbsent, skipping the copy if the file has already been copied in with \includeIfAbsent. This utility file should be copied in with \include (not \includeIfAbsent)

Re: Solution for including a file only once

2010-02-11 Thread Michael J. O'Donnell
programming blunder, increases my hope that someone with fuller knowledge will point out some challenging test cases. Cheers, Mike O'D. Carl Sorensen wrote: > > On 2/11/10 11:05 AM, "Michael J. O'Donnell" > wrote: > > >> Here's what I *now think* i

Re: Solution for including a file only once

2010-02-11 Thread Michael J. O'Donnell
Here's what I *now think* is correct code O:-) : includeIfAbsent = #(define-music-function (parser location fileName) (string?) (let ((guardName (string-append "Already Got " fileName))) (if (not (defined? (string->symbol guardName))) (begin (primitive-eval (list 'define (string->symbol guardN

Re: Solution for including a file only once

2010-02-11 Thread Michael J. O'Donnell
Hans and Carl (and the list, which I neglected first time), At present, I am seeking an add-on solution, involving a definition that I can put in a utility file to include. I think I am near finding that. I am not ready to hack the lexical analyzer, and I think that should be pondered carefully, p

Re: Solution for including a file only once

2010-02-11 Thread Michael J. O'Donnell
Hans and Carl, At present, I am seeking an add-on solution, involving a definition that I can put in a utility file to include. I think I am near finding that. I am not ready to hack the lexical analyzer, and I think that should be pondered carefully, particularly when a global reconsideration of

Re: Solution for including a file only once

2010-02-10 Thread Michael J. O'Donnell
em, but I can't find that either. Still hunting, and of course ready to take any hint. Michael J. O'Donnell wrote: > I *think* that I have the essential solution to include a file exactly > once, no matter how many times it is mentioned. That is, with the > following definiti