Re: Add syntax highlighting to own command
- To: mathgroup at smc.vnet.net
- Subject: [mg101678] Re: Add syntax highlighting to own command
- From: Simon <simonjtyler at gmail.com>
- Date: Tue, 14 Jul 2009 05:35:10 -0400 (EDT)
- References: <h340tk$guu$1@smc.vnet.net> <h390jd$jmo$1@smc.vnet.net>
Hi Bastian, with regards to the SyntaxInformation line There appears to be no difference between using {{__},_} or {_,_} . This is because you could pass a symbol that evaluates to a list to the first position in {_,_}. ---- to quote the documentation center ---- The first argument of f should be a list of exactly two elements: SyntaxInformation[f] = {"ArgumentsPattern" -> {{_, _}, _}}; {f[{a}, x], f[{a, b}, x], f[{a, b, c}, x]}; -- only the last expression fails the argument pattern. The first argument is allowed to be an expression such as a symbol, which could evaluate to a list: {f[a], f[a, x], f[a, x, y]}; -- the first land last expression here fail the argument pattern, the middle passes. ---- end quote ---- Simon