From 7de5bafd3382f0fc0115e571158302702e0632be Mon Sep 17 00:00:00 2001 From: Alastair Tse Date: Thu, 5 Jun 2003 13:42:14 +0000 Subject: make X optional even in the presense of "truetype" --- app-editors/jed/files/jed-0.99.16-gentoo-shmode.sl | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 app-editors/jed/files/jed-0.99.16-gentoo-shmode.sl (limited to 'app-editors/jed/files') diff --git a/app-editors/jed/files/jed-0.99.16-gentoo-shmode.sl b/app-editors/jed/files/jed-0.99.16-gentoo-shmode.sl new file mode 100644 index 000000000000..edeeb2c8f523 --- /dev/null +++ b/app-editors/jed/files/jed-0.99.16-gentoo-shmode.sl @@ -0,0 +1,63 @@ +% This is a simple shell mode. It does not defined any form of indentation +% style. Rather, it simply implements a highlighting scheme. + +$1 = "SH"; + +create_syntax_table ($1); +define_syntax ("#", "", '%', $1); +define_syntax ("([{", ")]}", '(', $1); + +% Unfortunately, the editor cannot currently correctly deal with multiple +% string characters. So, inorder to handle something like: +% echo "I'd rather be home" +% make the '"' character the actual string character but also give '\'' +% a string syntax. However, this will cause '"' to give problems but +% usually, '"' characters will be paired. +define_syntax ('\'', '"', $1); +define_syntax ('"', '"', $1); + +define_syntax ('\\', '\\', $1); +define_syntax ("-0-9a-zA-Z_", 'w', $1); % words +define_syntax ("-+0-9", '0', $1); % Numbers +define_syntax (",;:", ',', $1); +define_syntax ("%-+/&*=<>|!~^", '+', $1); + +#ifdef HAS_DFA_SYNTAX +%%% DFA_CACHE_BEGIN %%% +static define setup_dfa_callback (name) +{ + dfa_enable_highlight_cache ("shmode.dfa", name); + dfa_define_highlight_rule ("\\\\.", "normal", name); + dfa_define_highlight_rule ("#.*$", "comment", name); + dfa_define_highlight_rule ("\"([^\\\\\"]|\\\\.)*\"", "string", name); + dfa_define_highlight_rule ("\"([^\\\\\"]|\\\\.)*$", "string", name); + dfa_define_highlight_rule ("'[^']*'", "string", name); + dfa_define_highlight_rule ("'[^']*$", "string", name); + dfa_define_highlight_rule ("[\\|&;\\(\\)<>]", "Qdelimiter", name); + dfa_define_highlight_rule ("[\\[\\]\\*\\?]", "Qoperator", name); + dfa_define_highlight_rule ("[^ \t\"'\\\\\\|&;\\(\\)<>\\[\\]\\*\\?]+", + "Knormal", name); + dfa_define_highlight_rule (".", "normal", name); + dfa_build_highlight_table (name); +} +dfa_set_init_callback (&setup_dfa_callback, "SH"); +%%% DFA_CACHE_END %%% +#endif + +() = define_keywords ($1, "cddofiifin", 2); +() = define_keywords ($1, "forletpwdset", 3); +() = define_keywords ($1, "casedoneechoelifelseesacevalexitifeqreadtestthentype", 4); +() = define_keywords ($1, "aliasbreakendifendswifdefifneqlocalshiftumaskunsetuntilwhile", 5); +() = define_keywords ($1, "exportifndefreturnsetenvsourceswitch", 6); +() = define_keywords ($1, "breaksw", 7); +() = define_keywords ($1, "continuefunction", 8); + +define sh_mode () +{ + set_mode("SH", 0); + use_syntax_table ("SH"); + mode_set_mode_info ("SH", "fold_info", "#{{{\r#}}}\r\r"); + run_mode_hooks("sh_mode_hook"); + setkey("self_insert_cmd", "^I"); +} + -- cgit v1.2.3-65-gdbad