Could Emacs be rewritten in Python?
a.schmolck at gmx.net
Mon Apr 7 18:26:05 CEST 2003
Kim Petersen <kp at kyborg.dk> writes:
> > Remember that the scope of elisp variables for example are not lexical.
> > This is something very hard to emulate in python.
> Why would the variable scheme that elisp uses be tougher to emulate in python
> than a lexical version ? From my pov it should make it a heck of a lot easier
> (think of emacsen as having 1 global dictionary and 1 buffer specific
> dictionary for global/buffer local variables) then every time you call a
> function in elisp - do a shallow copy of local variable space (dictionary) and
> send it as the local vars - you can safely throw away the dict after function
Ahem, there are several thousand variables kicking about in global in emacs,
you want to copy them all for each function call?
How do your propose to handle the following efficiently:
(message "when foo is called folding is: %s" case-fold-search))
(message "when bar is called folding is: %s" case-fold-search)
(let ((case-fold-search t))
(message "now folding is: %s again" case-fold-search))
when bar is called folding is: nil
when foo is called folding is: t
now folding is: nil again
More information about the Python-list