mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
928cb48dd4
* docs: Overhaul and organize all of the existing documentation we have * docs: Autoscroll to top when changing pages
33 lines
1.1 KiB
Markdown
33 lines
1.1 KiB
Markdown
# Editor Configuration
|
|
|
|
## EMacs
|
|
|
|
The following EMacs config file should get you started and configure OpenGOAL's formatting style
|
|
|
|
```lisp
|
|
;; make gc files use lisp-mode
|
|
(add-to-list 'auto-mode-alist '("\\.gc\\'" . lisp-mode))
|
|
;; run setup-goal when we enter lisp mode
|
|
(add-hook 'lisp-mode-hook 'setup-goal)
|
|
|
|
(defun setup-goal ()
|
|
;; if we are in a gc file, change indent settings for GOAL
|
|
(when (and (stringp buffer-file-name)
|
|
(string-match "\\.gc\\'" buffer-file-name))
|
|
(put 'with-pp 'common-lisp-indent-function 0)
|
|
(put 'while 'common-lisp-indent-function 1)
|
|
(put 'rlet 'common-lisp-indent-function 1)
|
|
(put 'until 'common-lisp-indent-function 1)
|
|
(put 'countdown 'common-lisp-indent-function 1)
|
|
(put 'defun-debug 'common-lisp-indent-function 2)
|
|
(put 'defenum 'common-lisp-indent-function 2)
|
|
|
|
;; indent for common lisp, this makes if's look nicer
|
|
(custom-set-variables '(lisp-indent-function 'common-lisp-indent-function))
|
|
(autoload 'common-lisp-indent-function "cl-indent" "Common Lisp indent.")
|
|
;; use spaces, not tabs
|
|
(setq-default indent-tabs-mode nil)
|
|
)
|
|
)
|
|
|
|
``` |