This is creol-mode.el, an Emacs major mode for the programming / modelling language Creol. Creol is being developed at the University of Oslo, Department of Informatics. For further information about the language, see http://heim.ifi.uio.no/~creol/.
Initial emacs mode for Creol by Marcel Kyas <kyas@ifi.uio.no>, further development and maintenance by Rudi Schlatte <rudi@constantly.at>.
Creol-mode is licensed under GPLv3 or later.
Add these lines to your ~/.emacs
file:
(add-to-list 'load-path "path/to/creol-mode") (autoload 'creol-mode "creol-mode" nil t) (unless (assoc "\\.creol\\'" auto-mode-alist) (add-to-list 'auto-mode-alist '("\\.creol\\'" . creol-mode)))
Creol-mode should be active automatically when you open a file of type
.creol
. The key C-c C-c
(creol-next-action
) compiles the buffer
with creolc or starts the Maude interpreter.
To compile the buffer, creol-next-action
calls make
if the current
directory contains a Makefile; otherwise, the Creol compiler is called
with the current file. To use another compile command, set the local
variable creol-compile-command
. This is not a customize option since
the compile command will in general be different for every file
(e.g. different make
targets).
By default, creo-next-action
starts the Maude interpreter and loads
the compiled model if it exists and is newer than the Creol source. The
name of the compiled model is assumed to be the same as the current
buffer but with a .maude
extension. Set the local variable
creol-output-file
to choose another name for the compiled model.
For example, if you have a file program.creol
that is compiled with
make foo
, which produces a file bar.maude
, put these lines at the
end of program.creol
:
// Local Variables: // creol-compile-command: "make foo" // creol-output-file: "bar.maude" // End:
To run Maude from Emacs, you must install maude-mode (find it at http://sourceforge.net/projects/maude-mode/).