Cool, thanks Rafael.  I think I may create an improved gap-mode which includes 
this (or some derivative thereof, though it may take some time since I'm a bit 
busy right now.

-Ivan

On Aug 24, 2010, at 11:00 AM, Attila Egri-Nagy wrote:

> Hi,
> 
> It is crazy but I've been using python-mode for gap files. It gets the
> comments and strings right, at least...
> 
> attila
> 
> 
> On Tue, Aug 24, 2010 at 1:39 AM, Rafael <[email protected]> wrote:
> 
>> Ivan Andrus <[email protected]>
>> writes:
>> 
>>> I have been using gap-mode for emacs version 1.96 by Michael Smith.
>>> There are a few things that I would like to add, principally syntax
>>> highlighting.  Has anyone else done this that I couldn't find?  Would
>>> there be interest in an updated version with some improvements?
>> 
>> This is what I use. It is really far from perfect, but it is something...
>> 
>> (defun add-custom-keyw()
>>   "adds a few special keywords for gap mode"
>>   (font-lock-add-keywords nil
>>    '(
>>      ("\\bif\\b\\|then\\|else\\|elseif" . 'font-lock-keyword-face )
>>      ("while\\|\\bdo\\b\\|\\bfi\\b" . 'font-lock-keyword-face )
>>      ("\\bend\\b\\|return\\|\\bnot\\b\\|function\\|\\blocal\\b" .
>> 'font-lock-keyword-face )
>>      ("\\bfor\\b\\|\\bin\\b\\|\\bod\\b\\|\\bmod\\b\\|\\band\\b" .
>> 'font-lock-keyword-face )
>>      ("true\\|false" . 'font-lock-constant-face )
>>      ("Print\\|Length\\|\\bOrbits\\b\\|Subsets\\|Difference" .
>> 'font-lock-function-name-face )
>>      ("List\\|OnSets\\|Group\\|Intersection" .
>> 'font-lock-function-name-face )
>>      ("IsTransitive\\|OnTuples\\|Concatenation\\|Filtered" .
>> 'font-lock-function-name-face )
>>      ("Add\\|Sum\\|SymmetricGroup\\|Filtered\\|RightCosets" .
>> 'font-lock-function-name-face )
>>      ("Eigenvalues\\|Rationals\\|" . 'font-lock-function-name-face )
>>      ("\\bCharacteristicPolynomial\\b" . 'font-lock-function-name-face )
>>      ("Filtered\\|RightCosets" . 'font-lock-function-name-face )
>>      ("#.*" . font-lock-comment-face)
>>      )))
>> (add-hook 'gap-mode-hook 'add-custom-keyw)
>> 
>> 
>> _______________________________________________
>> Forum mailing list
>> [email protected]
>> http://mail.gap-system.org/mailman/listinfo/forum
>> 
> _______________________________________________
> Forum mailing list
> [email protected]
> http://mail.gap-system.org/mailman/listinfo/forum


_______________________________________________
Forum mailing list
[email protected]
http://mail.gap-system.org/mailman/listinfo/forum

Reply via email to