<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><div>Hi Adam,</div><div><br></div><div>Thank you for your answer. The thing is that the function name is arbitrary(determined by the programmer just like freely named variables)</div><div><br></div><div>I can define a function with:</div><div><br></div><div>function xyz_any_function_name</div><div>...code</div><div>end function</div><div><br></div><div>The word function and end function are defined as reserved keywords and as such get a color blue(or whatever)</div><div><br></div><div>What I was hoping to have is have the arbitrary name of the function "xyz_any_function_name" have a color red when it's defined(after the word "function") or when it's called(after the word "call".</div><div><br></div><div>Is that possible?</div><div><br></div><div>Thanks</div><div>John<br><br></div><div class="yui_3_2_0_22_132517678742854"
style="font-size: 12pt; "><div class="yui_3_2_0_22_132517678742861" style="font-size: 12pt; "><font size="2" face="Arial"><hr size="1"><b>From:</b> Adam Strzelecki <ono@java.pl><br><b>To:</b> John Relosa <john.relosa@yahoo.com>; TextMate users <textmate@lists.macromates.com> <br><b>Sent:</b> Thursday, December 29, 2011 8:55 AM<br><b>Subject:</b> Re: [TxMt] Coloring for a function call<br></font><br>> How would I make it so the "my_function_name" has a different color after the "call" keyword ? <br><br><br>I guess you need to group the function name via your lang grammar regular expression and assign some scope to it like "support.function.any-method.yourlang", similar way as you already do keyword scope assign for `call`.<br><br>By default themes expect "support.function" scope prefix for standard built-in functions (like time() free() malloc() for C), and "support.function.any-method" prefix for other
non-standard, non-built in, user defined functions.<br><br>Regards,<br>- <br>Adam Strzelecki</div></div></div><div><br></div><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; ">Message: 9<br>Date: Wed, 28 Dec 2011 08:45:02 -0800 (PST)<br>From: John Relosa <<a ymailto="mailto:john.relosa@yahoo.com" href="mailto:john.relosa@yahoo.com">john.relosa@yahoo.com</a>><br>To: "<a ymailto="mailto:textmate@lists.macromates.com" href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</a>" <<a ymailto="mailto:textmate@lists.macromates.com" href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</a>><br>Subject: [TxMt] Coloring for a function call<br>Message-ID:<br> <<a ymailto="mailto:1325090702.17456.YahooMailNeo@web121902.mail.ne1.yahoo.com"
href="mailto:1325090702.17456.YahooMailNeo@web121902.mail.ne1.yahoo.com">1325090702.17456.YahooMailNeo@web121902.mail.ne1.yahoo.com</a>><br>Content-Type: text/plain; charset="iso-8859-1"<br><br>Hello,<br><br>I am trying to create a bundle where in the particular language after a function definition you would call that function with:<br><br>[code....]<br><br>function my_function_name<br>.<br>.<br>code<br><br>.<br>.<br>end function<br><br>...more code...<br><br>call my_function_name<br><br>[/code....]<br><br><br>Now for the question to the TxMt gurus:<br><br>How would I make it so the "my_function_name" has a different color after the "call" keyword ??<br><br>I have already made the "call" to be a reserved keyword colored blue but if would be nice to have the "my_function_name" function colored red or some other catchy color after the word "call"<br><br>Is that possible and what would be the syntax for the bundle?<br><br>Thanks in
advance.<br><br>John<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <<a href="http://lists.macromates.com/textmate/attachments/20111228/5a5b2143/attachment-0001.html" target="_blank">http://lists.macromates.com/textmate/attachments/20111228/5a5b2143/attachment-0001.html</a>><br><br><br> </div> </div> </div></body></html>