Code: Select all
(dofile (sym filespec opts) (some-code))
where
sym is symbol name like exactly such one in (dolist) - not predefined and existing locally to dofile contents.
filespec can be value or expression that results in str-filename or int-fd.
opts are optional arguments like record delimiter other than \n, or buffer size for (read-buf) etc.
My trouble is about a way to handle sym in macro function. Only way I found is to compose lambda like
Code: Select all
(let (sym dofile-current-record-value) (some-code))
Is this the best choice?