help-smalltalk
[Top][All Lists]
Advanced

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

[Help-smalltalk] Improved EMACS mode


From: David Forster
Subject: [Help-smalltalk] Improved EMACS mode
Date: Mon, 22 Jul 2002 01:05:20 -0600
User-agent: Mutt/1.3.28i

Over the past couple of days I've been simultaneously learning EMACS
lisp and updating the Smalltalk mode distributed with GNU Smalltalk.
Where as what I have isn't totally complete or polished, I figured I'd
share what I have so far.

Really I've done two things:  I've updating the font-locking support
to the Emacs 20/21 mechanism and I've split everything into three
files (editing mode, interpreter mode, and browser).

Using the new highlighting code means that comments are now
highlighted properly, as it relies on the syntax table for
finding comments and strings.  The drawback to this is that the
previous code depended on the syntax table treating comments like
strings, which throws some functions off.  I've fixed the most obvious
problems with smalltalk-indent-line, but problems probably
persist...More testing is needed.  In addition, I've added some new
highlighting rules, so things are more colorful. ;)

Also, in many places it seems [A-z0-9] was considered a valid symbol
name, but [A-z0-9_] seems more valid...Binary selectors like #@ and #,
are also (seemingly) highlighted correctly.

I think smalltalk-mode (renamed from st-mode) is probably on par with
the old code in turns of working.  Of course, this only works with
Emacs 20+...

The interpreter mode (M-x gst) seems to work OK.  I split that out
into a separate file, along with the browser, as I think it's better
to keep things separated, IMHO.  But maybe I'm just being fancy...
You need to load everything anyways to have key bindings in
smalltalk-mode (which is automatic --- just put `(require
'smalltalk-mode)' in Emacs init).

I never could get the browser to work right (before I messed with
stuff, that is), so I'm leaving it as is...I got a class hierarchy to
come up but that's it...If any one wants, it shouldn't be that hard to
repair if it worked in the first place.  Probably just missing a
function call or a key binding...

Ultimately, however, I think what I have is better for Emacs 20+
(mostly tested with Emacs 21.2.1) users then what exists now.  I plan
on working some more on this (including to a limited extent the
browser), but I have some other stuff I have to do... So if anyone
wants to clean this mess up, by all means!

Comments welcome on features that I took out (like the
smalltalk-c-style-tab variable...Who wouldn't want indenting?? ;)  or
bugs found...

Everything is attached as a tar.gz...I apologize for spamming the list
with a large message, but I don't have any place to put it...

Good luck ;),

-David Forster <address@hidden>

Attachment: smalltalk-mode.tar.gz
Description: Binary data


reply via email to

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