This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

supporting Emacs Lisp



It occurs to me that there's a way to get basic Emacs Lisp support
working in Guile pretty easily.

First, implement a parser for Emacs Lisp expressions, that builds
Guile objects: pairs, strings, vectors, etc.  This is the 'read'
procedure Emacs Lisp will use, so you'll need it anyway.

Make sure the parser can handle the weird syntax used for Emacs Lisp
bytecode files.  Define a new smob for bytecode objects.

Now, copy Emacs's bytecode interpreter, and change it so that it
operates on Guile objects instead of Emacs objects.

Byte-compile Emacs's byte code compiler using Emacs.  Now load that
bytecode file into Guile, and define your Emacs Lisp `eval' function
to simply invoke the byte-compiler and run the code.

What you get is an Emacs Lisp system where everything is
byte-compiled --- there is no interpreter for straight lists, as Emacs
has now.

You may need to hack the byte compiler to be more thorough about
compiling *everything* to bytecode.  And you'll need to write all the
little support functions that the byte compiler and bytecode
interpreter assume are present.  But I think it could be done.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]