can you give an example how that would work?  i assume i would modify this block, 

{ name = 'source.perl.mason.line';
begin = '^(%)';
end = '$';
beginCaptures = { 1 = { name = 'keyword.control'; }; };
patterns = ( { include = 'source.perl'; } );
},

but cannot figure out the proper syntax or the right boundaries to copy/paste from the perl language bundle.


repository = {
line_comment =
{ name = 'comment.line.number-sign.perl';
match = '#.*$\n?';
};
[..snip..]
};

is it not possible to copy/overload the single item from source.perl's repository?

On Jul 28, 2006, at 4:49 PM, Allan Odgaard wrote:

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.


______________________________________________________________________
For new threads USE THIS: textmate@lists.macromates.com
(threading gets destroyed and the universe will collapse if you don't)
http://lists.macromates.com/mailman/listinfo/textmate

---
michael reece :: software engineer :: mreece@vinq.com