These packages are available on MELPA. See Emacs Wiki for instructions on how to set up and install packages.
The alternative, and recommended, way of installing magik-mode is using use-package:
(use-package magik-mode
:ensure t
:config
(magik-global-bindings)
(magik-menu-set-menus))
Global keys
Global keys are set by calling (magik-global-bindings)
after the packages has been loaded.
Key | Description |
---|---|
F2s | Open Magik version selection |
Major mode for managing multiple Magik environments.
Key | Description |
---|---|
Return | Select the current selected line as the current active environment. |
a | Open gis_aliases file of selected version. Will prompt for layered product to use if selected version has more than one aliases file available. |
+ | Add a new entry to the currently open file. |
Major mode for editing Magik aliases files.
Key | Description |
---|---|
Shift-Return | Run a Magik session for the selected alias. |
Major mode for running Magik session as a direct sub-process.
Major prog mode for editing Magik code.
Support for outline-minor mode. Try: (outline-minor-mode)
Support for imenu. Try: (add-hook 'magik-mode-hook 'imenu-add-menubar-index)
Minor mode for electic Magik.
Major mode for running the Magik Class Browser.
Major mode for editing Magik module.def files.
Major mode for editing Magik product.def files.
Major mode for editing Magik Message files.
Magik-lint support.
To enable automatic linting in magik-mode
buffers, the following conditions have to be met:
- Package flycheck needs to be installed and loaded.
magik-lint-VERSION.jar
(download) has to be installed in~/.emacs.d/magik-lint/
(location can be customized with the variablemagik-lint-jar-file
).- The
java
executable path should be inexec-path
, or the variableflycheck-magik-lint-java-executable
has to be set.flycheck-magik-lint-java-executable
will automatically be set when the environment variableJAVA_HOME
is set. flycheck-mode
has to be enabled formagik-mode
buffers. Or useglobal-flycheck-mode
to enable it for all buffers.
If you plan to use this package with Smallworld-Versions 4.x or older, you should consider the following points:
- Customize the variable
magik-session-auto-insert-dollar
to non nil - You might customize the variable
magik-aliases-layered-products-file
to "$SMALLWORLD_GIS/product/config/LAYERED_PRODUCTS". But if you want to use the EMACS for Smallworld 5.x as well, it's easier to create the directory$SMALLWORLD_GIS/../smallworld_registry
and copy or soft-link the original LAYERED_PRODUCTS file into that directory - so you have the same structure as under Smallworld 5.x. - There is no support (yet) for the Smallworld dev-tools. So if you want to do things like f4d to start debugging a method, you may still want to use the EMACS which has been delivered with the Smallworld 4.x (or older) software.
- Some more things which are at least partly not supported by Smallworld 5.x are not supported (e.g.
deep-print
)
Some keys bindings are changed with respect to a standard EMACS installation, at least when using (magik-global-bindings)
:
Key | Function in standard EMACS | Change in Magik Mode package |
---|---|---|
F2 | 2C-command |
globally changed to prefix key |
F3 | kmacro-start-macro-or-insert-counter |
globally changed to prefix key |
F4 | kmacro-end-or-call-macro |
used in magik-mode and magik-session-mode as prefix key |
The reason for that is, that many Magik developpers are familiar with these bindings from former EMACS installations.
For quick usage of the keyboard-macro functions you may e.g. bind the Ctrl-F2 and Ctrl-F4 combinations by putting the following lines into your .emacs
file:
(global-set-key [C-f3] 'kmacro-start-macro-or-insert-counter)
(global-set-key [C-f4] 'kmacro-end-or-call-macro)