Template:Emacs and ctl
From AbInitio
Revision as of 23:16, 12 October 2010 (edit) Stevenj (Talk | contribs) ← Previous diff |
Revision as of 15:12, 26 August 2016 (edit) Ardavan (Talk | contribs) Next diff → |
||
Line 3: | Line 3: | ||
(if (assoc "\\.ctl" auto-mode-alist) | (if (assoc "\\.ctl" auto-mode-alist) | ||
nil | nil | ||
- | (nconc auto-mode-alist '(("\\.ctl" . scheme-mode)))) | + | (add-to-list 'auto-mode-alist '("\\.ctl\\'" . scheme-mode)))) |
(Incidentally, <code>emacs</code> scripts are written in "elisp," a language closely related to Scheme.) | (Incidentally, <code>emacs</code> scripts are written in "elisp," a language closely related to Scheme.) | ||
If you don't use emacs (or derivatives such as [[w:Aquamacs|Aquamacs]]), it would be good to find another editor that supports a Scheme mode. For example, [http://www.jedit.org/ jEdit] is a free/open-source cross-platform editor with Scheme-syntax support. Another option is [http://projects.gnome.org/gedit/ GNU gedit] (for GNU/Linux and Unix); in fact, S. Hessam Moosavi Mehr has donated a [http://github.com/hessammehr/meepmpb-highlight hilighting mode for Meep/MPB] that specially highlights the Meep/MPB keywords. | If you don't use emacs (or derivatives such as [[w:Aquamacs|Aquamacs]]), it would be good to find another editor that supports a Scheme mode. For example, [http://www.jedit.org/ jEdit] is a free/open-source cross-platform editor with Scheme-syntax support. Another option is [http://projects.gnome.org/gedit/ GNU gedit] (for GNU/Linux and Unix); in fact, S. Hessam Moosavi Mehr has donated a [http://github.com/hessammehr/meepmpb-highlight hilighting mode for Meep/MPB] that specially highlights the Meep/MPB keywords. |
Revision as of 15:12, 26 August 2016
It is useful to have emacs
use its scheme-mode
for editing ctl files, so that hitting tab indents nicely, and so on. emacs
does this automatically for files ending with ".scm
"; to do it for files ending with ".ctl
" as well, add the following lines to your ~/.emacs
file:
(if (assoc "\\.ctl" auto-mode-alist) nil (add-to-list 'auto-mode-alist '("\\.ctl\\'" . scheme-mode))))
(Incidentally, emacs
scripts are written in "elisp," a language closely related to Scheme.)
If you don't use emacs (or derivatives such as Aquamacs), it would be good to find another editor that supports a Scheme mode. For example, jEdit is a free/open-source cross-platform editor with Scheme-syntax support. Another option is GNU gedit (for GNU/Linux and Unix); in fact, S. Hessam Moosavi Mehr has donated a hilighting mode for Meep/MPB that specially highlights the Meep/MPB keywords.