[TxMt] perl bundle: line_comment

Allan Odgaard throw-away-1 at macromates.com
Fri Jul 28 23:49:48 UTC 2006


On 29/7/2006, at 1:00, Michael Reece wrote:

> can anyone explain why this definition in the perl language bundle  
> includes the newline as part of the comment?

So that when you’re at the end of the line, you’re still in the  
single-line comment scope, e.g. for overloading of the enter key in  
line comments or improved visual styling (which would make the  
background color extend to the right window border.)

> [...] if i want to change the line_comment pattern, but not miss  
> any future updates that might come with the perl bundle, what is  
> the right way to go about it?

In your Mason language grammar, before you include source.perl, put  
your own comment rule there which doesn’t include the newline -- that  
one will take precedence over the one you include.




More information about the textmate mailing list