help-gnu-emacs
[Top][All Lists]
Advanced

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

How to implement comments that always start at the beginning of a line


From: Philipp
Subject: How to implement comments that always start at the beginning of a line
Date: Tue, 24 Oct 2006 02:40:42 -0700 (PDT)

Hi,

I'm writing my own Emacs major mode for a language in with all comments
start with an starisk at the beginning of a line. Unfortunately, I haven't
found a way to implement this in the syntax table. 

I tried to do a two-character comment sequence, with the first character
being a newline and the 2nd character an asterisk. This would neglect
comments in the first line of a buffer, but it would be better than nothing.
The lines I used were

                (modify-syntax-entry ?\n ">1" form-mode-syntax-table)
                (modify-syntax-entry ?* ".2" form-mode-syntax-table)

but that didn't work the way I expected. Does anybody have an idea how to
solve this?

Thanks,
Philipp
-- 
View this message in context: 
http://www.nabble.com/How-to-implement-comments-that-always-start-at-the-beginning-of-a-line-tf2500236.html#a6969840
Sent from the Emacs - Help mailing list archive at Nabble.com.





reply via email to

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