emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs and guile (Re: ehelp woes, or why I hate a module that I love


From: Richard Stallman
Subject: Re: emacs and guile (Re: ehelp woes, or why I hate a module that I love so much)
Date: Sun, 21 Jul 2002 14:14:50 -0600 (MDT)

    Ok.  However, we have only two sizes of Scheme cells: 2 words and 4
    words.  (Non-immediate objects are implemented by pointers to such a
    cell.)

Most of the Emacs misc objects are 4 words or less.  Can Scheme's
4-word types be used for them?

What part of that 4 words is used for specifying the data type more
precisely?

One very important type, the marker, needs 5 words as currently
defined.  More precisely, it contains a buffer, a chain of markers
pointer, two kinds of buffer positions (integers), and a bit flag.  We
could use a list to record the markers in a buffer instead of chaining
them together; that would cost one extra word per marker, which is ok.
Then the marker would use 3 words and one bit.  Could the 4-word object
be used for this?

An Emacs Lisp symbol has 3 slots of meaning: value, function, and
plist.  It also has its name and the mechanism of interning it; I
suppose Scheme symbols already have something equivalent to that.
Does this mean we don't need any more slots in a symbol?

Emacs Lisp allows multiple obarrays, but we might be able to dispense
with that feature, since (I think) only abbrevs use it.  (Does anyone
know of other uses?)  However, uninterned symbols are used in more
places I think.  Is there anything like an uninterned symbol in
Scheme?

A Lisp symbol also has a couple of flag bits, one for "variable alias"
(which says this variable is an alias for another variable) and one
for "constant" (it is an error to try to set this variable).  There
are a few data types that appear only in the value cell of a symbol,
and indicate special ways to get and set the value.  For instance, one
says "this is a buffer-local variable" and another says "the value is
stored in a certain address."

These flag bits and forwarding values have a lot in common, and we
could implement them with a single mechanism.  But what mechanism?





reply via email to

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