Getting Started: Auto-loading agda-mode

This commit is contained in:
Orestis Melkonian 2019-09-25 21:22:29 +01:00
parent eb56d3a85e
commit 2cebb92bc6

View file

@ -37,6 +37,22 @@ modules from the book, you need to do this. To do so, add the path to
`plfa.agda-lib` to `~/.agda/libraries` and add `plfa` to `plfa.agda-lib` to `~/.agda/libraries` and add `plfa` to
`~/.agda/defaults`, both on lines of their own. `~/.agda/defaults`, both on lines of their own.
## Auto-loading `agda-mode` in Emacs
In order to have `agda-mode` automatically loaded whenever you open a file ending
with `.agda` or `.lagda.md`, put the following on your Emacs configuration file:
``` elisp
(setq auto-mode-alist
(append
'(("\\.agda\\'" . agda2-mode)
("\\.lagda.md\\'" . agda2-mode))
auto-mode-alist))
```
The configuration file for Emacs is normally located in `~/.emacs` or `~/.emacs.d/init.el`,
but Aquamacs users might need to move their startup settings to the Preferences.el file in
`~/Library/Preferences/Aquamacs Emacs/Preferences`.
## Unicode characters ## Unicode characters