[Grace-core] Most up-to-date Grace emacs mode
James Noble
kjx at ecs.vuw.ac.nz
Sun May 10 14:58:15 PDT 2015
Hi Kim
I really should put this somewhere better
(should at least have a page on the web, if not github, with editor customisations)
What I use is attached. Hasn't been updated for a while though.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grace-generic-mode.el
Type: application/octet-stream
Size: 2089 bytes
Desc: not available
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20150511/718a477e/attachment.obj>
-------------- next part --------------
James
On 10/05/2015, at 12:04pm, Kim Bruce <kim at cs.pomona.edu> wrote:
> I?m upgrading to a new computer, trying to get everything set up. I?m trying to figure out if I have the most up-to-date version of the grace emacs mode (grace-generic-model.el). I?ve attached the file I?m using. Please let me know if that is the most up-to-date version or send me the new one if this is out-of-date.
>
>
> Kim
>
>
> ;; Grace-Generic-Mode
> ;; An attempt at a generic mode for editing Grace files,
> ;; based on generic-mode.
>
> (require 'generic-x)
>
>
>
> (define-generic-mode 'grace-generic-mode
> '("!!") ;; can't get comments to work
> '("assert" "self" "true" "false" "catch" "raise" "return" "method" "const" "def" "var" "object" "class" "type" "prefix" "where" "super" "outer" "finally" "using" "inherits" "extends")
> '((":=" . 'font-lock-builtin-face)
> ("=" . 'font-lock-builtin-face)
> (";" . 'font-lock-builtin-face)
> ("{" . 'font-lock-builtin-face)
> ("}" . 'font-lock-builtin-face)
> (":" . 'font-lock-builtin-face)
> ("->" . 'font-lock-builtin-face)
> )
> '(".grace\\'" ".grc\\'")
> '( (lambda () (grace-mode-startup)) )
> "Generic mode for editing Grace programs, see http://gracelang.org")
>
>
> (defun grace-untabify-buffer ()
> "untabifies the whole buffer"
> (interactive "")
> (msg "running grace-untabify-buffer")
> (save-excursion
> (mark-whole-buffer)
> (untabify (region-beginning) (region-end))
> ))
>
> (defun grace-mode-startup ()
> "start up grace model"
> (msg "running grace-mode-startup")
> (add-hook 'before-save-hook 'grace-untabify-buffer)
> )
>
>
>
> _______________________________________________
> Grace-core mailing list
> Grace-core at cecs.pdx.edu
> https://mailhost.cecs.pdx.edu/mailman/listinfo/grace-core
>
More information about the Grace-core
mailing list