[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to use ejacs to eval a file as with command line driven interpr
Re: how to use ejacs to eval a file as with command line driven interpreters
Mon, 12 Jan 2009 19:18:31 -0700
Thunderbird 188.8.131.52 (Macintosh/20081209)
Xah Lee wrote:
On Jan 9, 7:09 pm, Kevin Rodgers <address@hidden> wrote:
There is also a console load() function that takes as an argument the
Thanks Kevin. I missed that.
... haven't spend time on this... but “load” is actually just a
function of js, much like “include” in other lang.
i'm hoping to have something like eval-region and eval-buffer for it.
Using the “load” function to implement this might mean a bit of a
... looking at the source code, looks like js-evaluate in the right
thing to call. Just did this:
seems it insert result and consol prompt into the current buffer, as
if expecting it is called in a console... a bit more look i found js-
// (js-eval-buffer (current-buffer))
but got error
let: No catch for tag: js-THROW, throw
So you need to establish the js-THROW tag before calling js-eval-buffer:
If you search the ejacs source code for js-THROW and js-eval-buffer, you
should be able to find out how to do it properly.
Denver, Colorado, USA