smalltalk-mode.el not good with old syntax
| Project: | GNU Smalltalk |
| Component: | Base classes |
| Category: | bug |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | fixed |
Hello.
I have some files that I created using the old syntax of GNU Smalltalk. With GNU Smalltalk 3.0.1, I can't easily edit those files anymore.
The new command, smalltalk-bang, doesn't seem to work with files using the old syntax.
A silly example:
!Object methodsFor: 'stuff'!
"Newton method for swuare roots -- this is the iterating part."
newtonIterate: n | newValue |
newValue := 0.5 * (n + (self / n)).
( (n - newValue) abs < 0.00000001 )
ifTrue: [ ^newValue ]
ifFalse: [ "newValue printNl." ^self newtonIterate: newValue ] !
"Newton method for square roots."
newton
(self < 0)
ifTrue: [ self error: 'Negative numbers have no square root!' ]
ifFalse: [ ^self newtonIterate: self ] !
If you try hitting ! several times, you will notice that
it will both produce the bang on the text and go,
sometimes to the end of the method, and sometimes somewhere inside a string (if there is a ! inside the string).
Thank you,
J.
PS: I assigned to component base classes because there is no "Emacs interactor" option...
Updates
| Status: | active | » patch |
| Attachment: | gst-179.patch (840 bytes) |
Just a thinko -- smalltalk-end-of-defun should not be executed if in old-syntax mode.
| Status: | patch | » fixed |
committed to master and stable-3.0.
