A major mode for editing MAGICAL II macros, the scripting language of Agilent (formerly Varian) VnmrJ and OpenVnmrJ NMR software. Features: - Syntax highlighting of keywords, built-in commands, macro calls, parameter assignments, local variables ($x) and macro arguments ($0, $1, ..., $#). - All three comment forms: "...", // ... and /* ... */. - Both string forms: '...' and `...`, with backslash escapes. - Indentation of if/elseif/else/endif, while/do/endwhile and repeat/until blocks, with electric re-indentation of closers. - `magicalii-describe-command' (C-c C-d) opens the VnmrJ manual page for a command, and `magicalii-find-macro' (C-c C-f) opens the macro file from the maclib search path. Files in any directory named "maclib" open in this mode. For other files, use M-x magicalii-mode or a file-local variable. The syntax follows the MAGICAL lexer and grammar of OpenVnmrJ (src/vnmr/magic.lex.l and magic.gram.y); the list of built-in commands comes from its command table (src/vnmr/table.c).