Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 2.06 KB

README.org

File metadata and controls

55 lines (41 loc) · 2.06 KB

Creol Mode

Overview

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/.

Contributors and License

Initial emacs mode for Creol by Marcel Kyas <[email protected]>, further development and maintenance by Rudi Schlatte <[email protected]>.

Creol-mode is licensed under GPLv3 or later.

Installation

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)))

Usage

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/).