help-smalltalk
[Top][All Lists]
Advanced

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

Re: [Help-smalltalk] Improved EMACS mode


From: Bonzini
Subject: Re: [Help-smalltalk] Improved EMACS mode
Date: Mon, 22 Jul 2002 16:45:48 +0200

> 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).

I've started from your separated files to remove the browser.  And I have
autoconfiscated the thing in that the path to gst is filled in at configure
time (if you send patches down the road, I will adjust for this
transparently for you -- as soon as I release an alpha, I will include your
code).

I also made the files byte-compilable -- again, this is transparent for you.
It suffices to add a couple of `let' variables.

> 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. ;)

The thing I would like most is to indent blocks like this:
- if the line with the bracket matches
      \[\(\( *:[A-Za-z_]+\)* *|\)?\( *|\( *[A-Za-z_]+\)|\)? *$

   bracket   \[
   followed by arguments \(\( *:[A-Za-z_]+\)* *|\)?
   followed by temporaries \( *|\( *[A-Za-z_]+\)|\)?
   followed by spaces *$

  indent 4 spaces after the line (*not* after the bracket
  as it is now)

        example:
            self do: [ :each |
                each printNl ].

- if a line is found that matches the same regular expression
  without the ending $, indent to the first character after
  the match (something similar is probably already there).
        example:
            self do:
                [ :each |
                 each printNl ].

(you should use the syntax table to match spaces, I don't remember how it
works).

> Also, in many places it seems [A-z0-9] was considered a valid symbol
> name, but [A-z0-9_] seems more valid...

Right.  Again syntax tables are probably useful but I don't remember much
about them.

> 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+...

No problem.

> I never could get the browser to work right (before I messed with
> stuff, that is), so I'm leaving it as is...

I had fixed the bugs a week ago, but I decided to dump it now.  The
Smalltalk interactor mode is a hacking tool, not a full programming
environment IMHO.

Paolo





reply via email to

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