[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nesting with-imported-modules
From: |
Ludovic Courtès |
Subject: |
Re: nesting with-imported-modules |
Date: |
Wed, 05 Feb 2020 15:07:09 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hello!
Ricardo Wurmus <address@hidden> skribis:
> it seems that it is impossible to nest with-imported-modules. A gexp
> that is wrapped in multiple layers of with-imported-modules won’t depend
> on the list of all mentioned modules but only on the outermost.
>
> This is because with-imported-modules sets the current-imported-modules
> parameter without checking if the parameter already has a value.
>
> Should nesting be supported? It seems useful.
Is it? :-)
My impression is that one would always write:
(with-imported-modules … #~(…))
or possibly combining multiple expressions:
(define e1 (with-imported-modules … #~(…)))
(define e2 (with-imported-modules … #~(… #$e1 …)))
in which case modules are appended.
I couldn’t think of a use case where one would literally write:
(with-imported-modules …
(with-imported-modules …
#~(…)))
Perhaps I’m missing some pattern where it could be useful though?
Thanks,
Ludo’.