Some additional insight. When I take the code out and make a simple command like this, it works from the command line by say_hello:
#pragma option(strict,on)
#include "slick.sh"
_command void say_hello() name_info(',')
{
messageNwait("Hello World. Hit a key.");
}
However it does not work when I put the same code inside the defload() function of my language definition:
#pragma option(strict,on)
#include "slick.sh"
#define R1_MODE_NAME "R1" // appears in "Select Mode" pane
#define R1_LEXER_NAME "R1" // name of file. Assumed name of lexer.
#define R1_EXTENSION1 "r" // canonical extension
#define R1_EXTENSION2 "R" // alternative extension
#define R1_LANGUAGE_ID R1_EXTENSION1 // internal use only?
///////////////////////////////////////////////////////////////////////////////
// This function is called when the module is loaded. It configures the
// "R" and "r" file extensions, sets up the language ID, line numbers, etc.
defload()
{
messageNwait("Hello World. Hit a key.");
// This is not traditionally at the top here. I've put it here just to
// make sure that the code is executed.
_str r_vlx = _config_path() :+ FILESEP :+ R1_LEXER_NAME :+ ".vlx";
if (file_exists(r_vlx)) {
messageNwait("Loaded lexer: " :+ r_vlx);
cload(r_vlx);
}
else {
messageNwait("Missing file: " :+ r_vlx);
}
// We set some parameters and leave others out. Inside _CreateLanguage() these
// actually get [re-]packaged as a setup_info string anyway.
_str compile_info = ""; // no compiling for you!
_str syntax_info = "4 1 3"; // Whiskey Tango Foxtrot?
_str be_info = ""; // Begin/End pairs
_str include_info = "";
_str word_chars = "";
_str lexer_name = R1_LEXER_NAME; // color coding lexer name
_str color_flags = "1"; // color flags
_str setup_info = "MN="R1_MODE_NAME",":+ // mode name
"TABS=+4,":+ // tabs
"MA=1 74 1,":+ // margins
"KEYTAB=ext-keys,":+ // key table
"WW=1,":+ // word wrap
"IWT=0,":+ // indent with tabs OFF
"ST=8,":+ // show special characters
"IN=2,":+ // indent style
"WC="word_chars",":+ // word chars
"LN="lexer_name",":+ // lexer name
"CF="color_flags",":+ // color flags
"LNL=6,":+ // line numbering ON
"TL=0,":+ // truncate length
"BNDS=,"; // bounds
// OK, got all our things
_CreateLanguage( R1_LANGUAGE_ID, R1_MODE_NAME, setup_info, compile_info, syntax_info, be_info);
_CreateExtension( R1_EXTENSION1, R1_EXTENSION1 );
_CreateExtension( R1_EXTENSION2, R1_EXTENSION1 );
}