[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] [Axiom In Emacs]
From: |
kai Kaminski |
Subject: |
[Axiom-developer] [Axiom In Emacs] |
Date: |
Thu, 18 Aug 2005 08:34:26 -0500 |
Changes http://www.axiom-developer.org/zope/mathaction/AxiomInEmacs/diff
--
??changed:
-On July 18, 2005 11:50 AM Kai Kaminski wrote:
-
-This is a tiny Emacs major mode for BOOT code. It supports very
-rudimentary syntax highlighting and (un)comment-region. To use it,
-put the file <tt>boot-mode.el</tt> somewhere in your <tt>load-path</tt>
-and add <tt>(require 'boot-mode)</tt> to your <tt>.emacs</tt>.
-You can activate the mode through <tt>M-x boot-mode RET</tt>.
-
-<a href="boot-mode.el">boot-mode.el</a>
-
<h3>Editing Axiom's Source Code</h3>
Emacs can be configured to make editing Axiom's source code much easier. First
of all you have to put <a href="boot-mode.el"><tt>boot-mode.el</tt></a> and
<tt>noweb-mode.el</tt> (included in the noweb distribution, which in turn is
included in the Axiom distribution) into your <tt>load-path</tt>. Then you add
the following to your <tt>.emacs</tt>:
<pre>
;; NOWEB-MODE
(require 'noweb-mode)
(defun kai:set-code-mode ()
(let* ((filename (buffer-file-name)))
(let ((end (string-match "\\.pamphlet" filename)))
(noweb-set-code-mode
(assoc-default (substring filename 0 end)
auto-mode-alist
'string-match
'fundamental-mode)))))
(add-hook 'noweb-mode-hook 'kai:set-code-mode)
;; BOOT-MODE
(require 'boot-mode)
;; AUTO-MODE-ALIST
(setq auto-mode-alist
(list*
'(".*\\.pamphlet" . noweb-mode)
'(".*\\.boot" . boot-mode)
'(".*\\.lisp" . lisp-mode)
'(".*\\.c" . c-mode)
auto-mode-alist))
</pre>
This code tries to automatically set the code mode in noweb, which only works
for files with names of the form <tt>file.ext.pamphlet</tt>, where <tt>ext</tt>
indicates the code mode. For example, <tt>sockio.lisp.pamphlet</tt> would have
its code mode set to <tt>lisp-mode</tt> and <tt>nci.boot.pamphlet</tt> to
<tt>boot-mode</tt>. If the auto-detection can't decide on a mode it uses
<tt>fundamental-mode</tt>.
--
forwarded from http://www.axiom-developer.org/zope/mathaction/address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Axiom-developer] [Axiom In Emacs],
kai Kaminski <=