guile-devel
[Top][All Lists]
Advanced

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

Re: @bind


From: Neil Jerram
Subject: Re: @bind
Date: 03 Sep 2001 21:01:37 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Thien-Thi" == Thien-Thi Nguyen <address@hidden> writes:

    Thien-Thi>    From: Neil Jerram <address@hidden> Date: 31
    Thien-Thi> Aug 2001 10:17:28 +0100

    Thien-Thi>    So far, byte-run.el and subr.el are OK, and we get
    Thien-Thi> stuck on `string-match' in version.el.

    Thien-Thi> unfortunately, i don't get as far -- see log below,
    Thien-Thi> made w/ guile 1.5.x.  which emacs version are you
    Thien-Thi> using?  any other hints?

Sorry, I should have been clearer...  This all relies on a change to
the workings of address@hidden' which is only in development CVS.  I'm
surprised you got as far as you did!

My Emacs version is 20.7 - I know this because I recently got past the
definition of (emacs-version) :-).

At the weekend, however, I discovered a big problem with the current
transformer code, namely that it transforms the arguments of
everything that looks like an application, even when that application
may later turn out to be a macro call.  (Macro calls need to be given
their arguments untransformed, of course.)

It's an interesting problem, because in general you can't tell if
`(thing ...)' is an application or a macro call at compile/transform
time; it's only known at eval time, according to whatever is in
thing's function slot at that time.

My proposed solution is to transform `(thing arg1 ...)' to
`(@fop thing (transform-args arg1 ...))', where transform-args is a
memoizing macro that transforms and then evaluates the args.  Then,
when address@hidden' is called,

- if thing holds a function, do nothing new (beyond what @fop already
  does); the evaluator calls transform-args, and the procedure in
  thing's function slot gets a single argument that is a list of
  transformed and evaluated args

- if thing holds a macro, and the expression as a whole is X, do
  `(set-cdr! (cdr X) (cdr (caddr X)))' to cut the `transform-args' out
  of the expression; the macro then gets the args untransformed.

Thanks for your interest.  By the way, do you think it would be a good
idea for me to use your (ttn gap-buffer) as a proof of concept
implementation of the buffer primitives?

        Neil




reply via email to

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