[GAP Forum] GAP mode for emacs
Ivan Andrus
darthandrus at gmail.com
Thu Sep 30 12:40:06 BST 2010
This probably isn't the best place for this, but...
I have taken Michael Smith's gap-mode and made what I hope are improvements. I'm using a very recent version of emacs however, so I may have inadvertently made it backwards incompatible. I also haven't tested on Xemacs. The code can be found at https://bitbucket.org/gvol/gap-mode/ so feel free to open an issue there if you have problems or suggestions (or contact me directly via email).
The main improvements are
1. font-lock support
2. improved local statement functionality
3. beginning/end-of-defun functions
4. bug fixes in indentation
5. converting to defcustom's in gap-mode.el
I haven't touched gap-process.el yet, and may not for a while (I've got other stuff going on). I did remove comint.el since that's been included with Emacs for a long time. Running gap in Emacs seems to work for me, though I haven't tested it much. Thus, if you need that functionality, please don't get rid of your old install!
-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 <rvf0068 at gmail.com> wrote:
>
>> Ivan Andrus <darthandrus at gmail.com>
>> 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
>> Forum at mail.gap-system.org
>> http://mail.gap-system.org/mailman/listinfo/forum
>>
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum
More information about the Forum
mailing list