[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Bug in the smalltalk-mode.el
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] Bug in the smalltalk-mode.el |
Date: |
Thu, 29 Jul 2010 18:55:27 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Thunderbird/3.0.5 |
On 07/29/2010 06:15 PM, Jan Vrany wrote:
Hi,
speaking of smalltalk-mode.el, does anybody know
how to modify it to support also end-of-line style comments
starting with "/ in addition to standard smalltalk "comments"?
Or where to start looking?
I'm using it to edit Smalltalk/X sources that uses such
(non-standard) style of comments.
http://www.zvon.org/other/elisp/Output/SEC561.html
Maybe something like this:
--- a/smalltalk-mode.el
+++ b/smalltalk-mode.el
@@ -66,9 +66,10 @@
(while (<= c ?z)
(setq c (1+ c))
(modify-syntax-entry c "w " table)))
+ (modify-syntax-entry 10 " > " table) ; Comment (generic)
(modify-syntax-entry ?: ". " table) ; Symbol-char
(modify-syntax-entry ?_ "_ " table) ; Symbol-char
- (modify-syntax-entry ?\" "! " table) ; Comment (generic)
+ (modify-syntax-entry ?\" "! 1 " table) ; Comment (generic)
(modify-syntax-entry ?' "\" " table) ; String
(modify-syntax-entry ?# "' " table) ; Symbol or Array constant
(modify-syntax-entry ?\( "() " table) ; Grouping
@@ -88,7 +89,7 @@
(modify-syntax-entry ?+ ". " table) ; math
(modify-syntax-entry ?- ". " table) ; math
(modify-syntax-entry ?* ". " table) ; math
- (modify-syntax-entry ?/ ". " table) ; math
+ (modify-syntax-entry ?/ ". 2 " table) ; math
(modify-syntax-entry ?= ". " table) ; bool/assign
(modify-syntax-entry ?% ". " table) ; valid selector
(modify-syntax-entry ?& ". " table) ; boolean
If it works, let me know and I'll apply the patch.
Paolo