guile-user
[Top][All Lists]
Advanced

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

Re: emacs+guile


From: Mikael Djurfeldt
Subject: Re: emacs+guile
Date: Tue, 3 Jan 2006 17:10:12 +0100

On 1/3/06, Ken Raeburn <address@hidden> wrote:
> Some of you may remember the guile-emacs project I started on years
> ago.  I let it slide a bit when other things got in the way, but the
> last year or so I've been putting some work into it again.

That is good news!

However, concerning moving from Elisp to Scheme, there is one usage
pattern in Elisp code which I think does not yet have any good
counterpart on the Scheme side:

Emacs behavior is to a large extent controlled by the state of a set
of global and buffer-local variables. Elisp code often uses dynamic
binding to temporarily change some state, such as:

 (let ((case-fold-search nil)))
    (string-match ...))

Yes, lexical binding is cleaner and safer, and/or/but, yes, Scheme can
provide dynamic binding using fluids, but the thing is that, given the
extensive use of the above usage pattern in Emacs code I think we have
to come up with some alternative which is as elegant and simple to
use.

If we don't, I expect that this will become the single largest
obstacle for gaining a broad acceptance of Scheme in the Emacs
community.

Possibly one could indeed use fluids if enough convenient helper
syntax, such as some variant of fluid-let, is provided. Personally,
I've been playing with the thought of storing state, such as
case-fold-search, in some kind of objects representing context in
similarity to how GWM (The Generic Window Manager) handles properties
of X windows. Also in this case, there is a need of helper syntax. The
advantage would be that one could avoid dynamic binding and have a
somewhat better modularization and abstraction of states.

M




reply via email to

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