Package mscl-mode provides a major mode for editing MSCL code in GNU Emacs. Features include syntax highlighting and indentation.
To install manually, place mscl-mode.el in your load-path, and add the following lines of code to your init file:
(autoload 'mscl-mode "mscl-mode" "Major mode for editing MSCL code." t)
(add-to-list 'auto-mode-alist '("\\.pwx?macro\\'" . mscl-mode))
TAB indents the current line of MSCL code, including line numbers if available. If the region is active, TAB indents all lines in the region.
C-c C-f formats the entire buffer; indents all lines, and removes any extra whitespace. If the region is active, C-c C-f formats all lines in the region.
Package mscl-mode also provides additional functionality to navigate in the source code. M-. will find and move to the line number, label, or variable at point, and M-, will move back again. For more information, see function xref-find-definitions.
The following table lists the customizable variables that affect mscl-mode in some way:
Name | Description | Default Value |
---|---|---|
mscl-delete-trailing-whitespace | If non-nil, mscl-format-code deletes trailing whitespace while formatting. | nil |
mscl-indent-offset | The number of columns to indent code blocks, for example inside an IF statement. | 4 |
mscl-mode-hook | Hook run when entering MSCL mode. | nil |
delete-trailing-lines (simple.el) | If non-nil, mscl-format-code deletes trailing empty lines while formatting. | t |