summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Tse <liquidx@gentoo.org>2003-06-05 13:42:14 +0000
committerAlastair Tse <liquidx@gentoo.org>2003-06-05 13:42:14 +0000
commit7de5bafd3382f0fc0115e571158302702e0632be (patch)
tree3818928b5262d22c31413e0723dd858948fea104 /app-editors/jed/files
parent~ppc (diff)
downloadgentoo-2-7de5bafd3382f0fc0115e571158302702e0632be.tar.gz
gentoo-2-7de5bafd3382f0fc0115e571158302702e0632be.tar.bz2
gentoo-2-7de5bafd3382f0fc0115e571158302702e0632be.zip
make X optional even in the presense of "truetype"
Diffstat (limited to 'app-editors/jed/files')
-rw-r--r--app-editors/jed/files/jed-0.99.16-gentoo-shmode.sl63
1 files changed, 63 insertions, 0 deletions
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");
+}
+