Michelson Emacs mode
This mode is a work in progress. Please contact us with bugs and feature requests. All of the options mentioned below are also accessible via the customize menu.
To operate the mode, please install the following dependencies. All are available from either melpa, elpa, or marmalade and are available under a free software license.
To use the mode, you must load the
michelson-mode.el file into Emacs.
Add the following to your
(load "~/tezos/tezos/emacs/michelson-mode.el" nil t)
Before using the Emacs mode, you must configure the
If you have compiled the Tezos Git repository,
set this to be the path to the
tezos-client binary on your system.
Make sure you have an up to date version of the client compiled.
You must also start a tezos node to enable typechecking features.
This option is recommended because it is faster than operating through
the docker container.
If you wish to run the Emacs mode with the alphanet script,
use the path of the
alphanet.sh script, plus the word
You must also set the
michelson-alphanet variable to be
If you do not set this option, the mode will not work with the alphanet.
Here are examples of the client configuration:
Without the alphanet
(setq michelson-client-command "~/tezos/tezos/tezos-client") (setq michelson-alphanet nil)
With the alphanet
(setq michelson-client-command "~/tezos/alphanet/alphanet.sh client") (setq michelson-alphanet t)
There are various feature of the Emacs mode you may wish to configure.
When writing a contract, you may wish to disable error display in order to
avoid the "wrong stack type at end of body" error that is often present.
This can be done by changing the
Both of these options also have interactive toggles for easy access.
You can disable live printing using the
If this option is disabled, both type and error printing are supressed.
No background command will be run, limiting the mode to syntax highlighting.
This command can also be toggled interactively using the
The highlighting colors used can be configured. See the customize menu for details.