[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is (catch #t (lambda () (use-modules (xxx))) ...) OK?
From: |
Neil Jerram |
Subject: |
Re: Is (catch #t (lambda () (use-modules (xxx))) ...) OK? |
Date: |
13 Apr 2001 10:42:24 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>>>>> "Rob" == Rob Browning <address@hidden> writes:
Rob> Is this an effective way to test for the existence of a
Rob> module, and if so, will a second (use-modules ...) be
Rob> required to actually get an effect on the top-level envt?
Rob> i.e.
Rob> (if (catch #t (lambda () (use-modules (xxx)) #t) (lambda
Rob> (key . args) #f)) (use-modules xxx) (do-something-else ...))
Rob> or is the use-modules inside the catch sufficient?
I'm not sure about the use-modules inside the closure being
sufficient. But you might like to know that boot-9.scm includes the
`false-if-exception' procedure, which basically implements the catch
for you.
Regards,
Neil