http://ab-initio.mit.edu/wiki/index.php?title=Template:Emacs_and_ctl&action=history&feed=atomTemplate:Emacs and ctl - Revision history2024-03-28T16:47:07ZRevision history for this page on the wikiMediaWiki 1.7.3http://ab-initio.mit.edu/wiki/index.php?title=Template:Emacs_and_ctl&diff=4908&oldid=prevAlexCerjan: Previous code snippet would throw errors with emacs 24.5 in ubuntu 16.042017-02-14T22:05:51Z<p>Previous code snippet would throw errors with emacs 24.5 in ubuntu 16.04</p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 22:05, 14 February 2017</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 1:</strong></td>
<td colspan="2" align="left"><strong>Line 1:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">It is useful to have <code>[[w:emacs|emacs]]</code> use its <code>scheme-mode</code> for editing ctl files, so that hitting tab indents nicely, and so on. <code>emacs</code> does this automatically for files ending with "<code>.scm</code>"; to do it for files ending with "<code>.ctl</code>" as well, add the following lines to your <code>~/.emacs</code> file:</td><td> </td><td style="background: #eee; font-size: smaller;">It is useful to have <code>[[w:emacs|emacs]]</code> use its <code>scheme-mode</code> for editing ctl files, so that hitting tab indents nicely, and so on. <code>emacs</code> does this automatically for files ending with "<code>.scm</code>"; to do it for files ending with "<code>.ctl</code>" as well, add the following lines to your <code>~/.emacs</code> file:</td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"> (push '("\\.ctl\\'" . scheme-mode) auto-mode-alist)</td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;">or if your <code>[[w:emacs|emacs]]</code> version is 24.3 or earlier and you have other "<code>.ctl</code>" files which are not Scheme:</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> (if (assoc "\\.ctl" auto-mode-alist)</td><td> </td><td style="background: #eee; font-size: smaller;"> (if (assoc "\\.ctl" auto-mode-alist)</td></tr>
</table>
AlexCerjanhttp://ab-initio.mit.edu/wiki/index.php?title=Template:Emacs_and_ctl&diff=4868&oldid=prevArdavan at 15:12, 26 August 20162016-08-26T15:12:43Z<p></p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 15:12, 26 August 2016</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 3:</strong></td>
<td colspan="2" align="left"><strong>Line 3:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> (if (assoc "\\.ctl" auto-mode-alist)</td><td> </td><td style="background: #eee; font-size: smaller;"> (if (assoc "\\.ctl" auto-mode-alist)</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> nil</td><td> </td><td style="background: #eee; font-size: smaller;"> nil</td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;"> (<span style="color: red; font-weight: bold;">nconc </span>auto-mode-alist '<span style="color: red; font-weight: bold;">(</span>("\\.ctl" . scheme-mode))))</td><td>+</td><td style="background: #cfc; font-size: smaller;"> (<span style="color: red; font-weight: bold;">add-to-list '</span>auto-mode-alist '("\\.ctl<span style="color: red; font-weight: bold;">\\'</span>" . scheme-mode))))</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">(Incidentally, <code>emacs</code> scripts are written in "elisp," a language closely related to Scheme.)</td><td> </td><td style="background: #eee; font-size: smaller;">(Incidentally, <code>emacs</code> scripts are written in "elisp," a language closely related to Scheme.)</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">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.</td><td> </td><td style="background: #eee; font-size: smaller;">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.</td></tr>
</table>
Ardavanhttp://ab-initio.mit.edu/wiki/index.php?title=Template:Emacs_and_ctl&diff=4339&oldid=prevStevenj at 23:16, 12 October 20102010-10-12T23:16:01Z<p></p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 23:16, 12 October 2010</td>
</tr>
<tr><td colspan="2" align="left"><strong>Line 6:</strong></td>
<td colspan="2" align="left"><strong>Line 6:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;">(Incidentally, <code>emacs</code> scripts are written in "elisp," a language closely related to Scheme.)</td><td> </td><td style="background: #eee; font-size: smaller;">(Incidentally, <code>emacs</code> scripts are written in "elisp," a language closely related to Scheme.)</td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr>
<tr><td colspan="2"> </td><td>+</td><td style="background: #cfc; font-size: smaller;">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.</td></tr>
</table>
Stevenjhttp://ab-initio.mit.edu/wiki/index.php?title=Template:Emacs_and_ctl&diff=1999&oldid=prevStevenj at 18:10, 23 October 20052005-10-23T18:10:23Z<p></p>
<p><b>New page</b></p><div>It is useful to have <code>[[w:emacs|emacs]]</code> use its <code>scheme-mode</code> for editing ctl files, so that hitting tab indents nicely, and so on. <code>emacs</code> does this automatically for files ending with "<code>.scm</code>"; to do it for files ending with "<code>.ctl</code>" as well, add the following lines to your <code>~/.emacs</code> file:<br />
<br />
(if (assoc "\\.ctl" auto-mode-alist)<br />
nil<br />
(nconc auto-mode-alist '(("\\.ctl" . scheme-mode))))<br />
<br />
(Incidentally, <code>emacs</code> scripts are written in "elisp," a language closely related to Scheme.)</div>Stevenj