[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs Lisp and Guile

From: Neil Jerram
Subject: Re: Emacs Lisp and Guile
Date: 20 Jul 2002 09:37:50 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Richard" == Richard Stallman <address@hidden> writes:

    Richard> Can you tell us the status of your work making Emacs Lisp
    Richard> work on Guile?

I've written a prototype translator, mostly in Scheme, which is
available in Guile CVS (HEAD branch).  In this prototype, things that
are `primitives' in Emacs are almost all defined in _Scheme_, not C.

The best demonstration of what it can do is obtained by telling it to
`(load "loadup.el")' and seeing how far it gets before hitting an
error.  Last time I tried, it processed 3279 lines of Elisp before
stopping in mule.el (because I haven't defined the make-char-table

guile> (load-emacs)
Calling loadup.el to clothe the bare Emacs...
Loading /usr/share/emacs/20.7/lisp/loadup.el...
Using load-path ("/usr/share/emacs/20.7/lisp/" 
Loading /usr/share/emacs/20.7/lisp/byte-run.el...
Loading /usr/share/emacs/20.7/lisp/byte-run.el...done
Loading /usr/share/emacs/20.7/lisp/subr.el...
Loading /usr/share/emacs/20.7/lisp/subr.el...done
Loading /usr/share/emacs/20.7/lisp/version.el...
Loading /usr/share/emacs/20.7/lisp/version.el...done
Loading /usr/share/emacs/20.7/lisp/map-ynp.el...
Loading /usr/share/emacs/20.7/lisp/map-ynp.el...done
Loading /usr/share/emacs/20.7/lisp/widget.el...
Loading /usr/share/emacs/20.7/lisp/emacs-lisp/cl.el...
Loading /usr/share/emacs/20.7/lisp/emacs-lisp/cl.el...done
Loading /usr/share/emacs/20.7/lisp/widget.el...done
Loading /usr/share/emacs/20.7/lisp/custom.el...
Loading /usr/share/emacs/20.7/lisp/custom.el...done
Loading /usr/share/emacs/20.7/lisp/cus-start.el...
Note, built-in variable `abbrev-all-caps' not bound
  ... [many other variable not bound messages] ...
Loading /usr/share/emacs/20.7/lisp/cus-start.el...done
Loading /usr/share/emacs/20.7/lisp/international/mule.el...
<unnamed port>: In procedure make-char-table in expression (@fop 
make-char-table (# #)):
<unnamed port>: Symbol's function definition is void
ABORT: (misc-error)

Type "(backtrace)" to get more information or "(debug)" to enter the debugger.

There are two serious restrictions:

- Most Emacs Lisp primitives are not yet implemented.  In particular,
  there are no buffer-related primitives.

- Performance compares badly with Emacs.  Using a handful of
  completely unscientific tests, I found that Guile was between 2 and
  20 times slower than Emacs.

I think that both these restrictions point in the same direction: the
way forward is to define the primitives by compiling a preprocessed
version of the Emacs source code, not by trying to implement them in
Scheme.  This, of course, is what Ken Raeburn's project is already
trying to do, so there is little point in me trying to do the same
thing independently.

Unless this picture changes, I don't plan to do any further
significant work on the prototype translator.

I expect that most of the translator's Scheme code will eventually
become obsolete, replaced by bits of Emacs C code.  Until then,
though, it should have a role:

- as a guide to the Guile Emacs project on how to interface to the
  Elisp support in libguile (notably, usage of address@hidden' and 

- as a proof of concept and fun thing to experiment with

- as a working translator that could help us develop our picture of
  how we want to integrate translator usage in general with the rest
  of Guile.

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]