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
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk