Ivan Andrus <darthand...@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@mail.gap-system.org http://mail.gap-system.org/mailman/listinfo/forum