Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.13
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
jed /
lib /
[ HOME SHELL ]
Name
Size
Permission
Action
colors
[ DIR ]
drwxr-xr-x
abbrev.sl
838
B
-rw-r--r--
abbrev.slc
636
B
-rw-r--r--
abbrmisc.sl
2.15
KB
-rw-r--r--
abbrmisc.slc
1.98
KB
-rw-r--r--
aboutjed.hlp
252
B
-rw-r--r--
acompile.sl
2.04
KB
-rw-r--r--
acompile.slc
2.02
KB
-rw-r--r--
aprocess.sl
267
B
-rw-r--r--
aprocess.slc
238
B
-rw-r--r--
ashell.sl
7.69
KB
-rw-r--r--
ashell.slc
6.96
KB
-rw-r--r--
backups.sl
1.41
KB
-rw-r--r--
backups.slc
637
B
-rw-r--r--
bibtex.sl
17.05
KB
-rw-r--r--
bibtex.slc
12.74
KB
-rw-r--r--
binary.sl
589
B
-rw-r--r--
binary.slc
522
B
-rw-r--r--
bookmark.sl
1.6
KB
-rw-r--r--
bookmark.slc
1.2
KB
-rw-r--r--
brief.sl
5.98
KB
-rw-r--r--
buf.sl
3.41
KB
-rw-r--r--
buf.slc
1.96
KB
-rw-r--r--
bufed.sl
6.69
KB
-rw-r--r--
bufed.slc
4.68
KB
-rw-r--r--
bytecomp.sl
3.38
KB
-rw-r--r--
cal.sl
6.4
KB
-rw-r--r--
cal.slc
4.44
KB
-rw-r--r--
chglog.sl
3.13
KB
-rw-r--r--
chglog.slc
2.62
KB
-rw-r--r--
cmisc.sl
4.91
KB
-rw-r--r--
cmisc.slc
4
KB
-rw-r--r--
cmode.dfa
7.58
KB
-rw-r--r--
cmode.sl
40.06
KB
-rw-r--r--
cmode.slc
27.9
KB
-rw-r--r--
comments.sl
7.99
KB
-rw-r--r--
comments.slc
5.93
KB
-rw-r--r--
compat.sl
1.39
KB
-rw-r--r--
compile.sl
11.44
KB
-rw-r--r--
compile.slc
5.83
KB
-rw-r--r--
compress.sl
3.12
KB
-rw-r--r--
compress.slc
2.73
KB
-rw-r--r--
cpright.hlp
464
B
-rw-r--r--
ctags.sl
9.53
KB
-rw-r--r--
ctags.slc
7.34
KB
-rw-r--r--
cua.hlp
385
B
-rw-r--r--
cua.sl
7.56
KB
-rw-r--r--
cua.slc
3.91
KB
-rw-r--r--
cuamisc.sl
5.7
KB
-rw-r--r--
cuamisc.slc
1.63
KB
-rw-r--r--
dabbrev.sl
13.77
KB
-rw-r--r--
dabbrev.slc
8.05
KB
-rw-r--r--
dcl.sl
4.68
KB
-rw-r--r--
dcl.slc
4.5
KB
-rw-r--r--
defaults.sl
1.07
KB
-rw-r--r--
digraph.sl
3.8
KB
-rw-r--r--
digraph.slc
1.04
KB
-rw-r--r--
dired.sl
17.78
KB
-rw-r--r--
dired.slc
12.69
KB
-rw-r--r--
docbook.sl
38.33
KB
-rw-r--r--
docbook.slc
38.41
KB
-rw-r--r--
dos437.sl
998
B
-rw-r--r--
dos850.sl
1.3
KB
-rw-r--r--
dos852.sl
1.14
KB
-rw-r--r--
edt.hlp
1.6
KB
-rw-r--r--
edt.sl
14.55
KB
-rw-r--r--
edt.slc
7.93
KB
-rw-r--r--
emacs.hlp
227
B
-rw-r--r--
emacs.sl
6.86
KB
-rw-r--r--
emacs.slc
6.31
KB
-rw-r--r--
emacsmsc.sl
3.52
KB
-rw-r--r--
emacsmsc.slc
3.52
KB
-rw-r--r--
emul.sl
87
B
-rw-r--r--
f90.sl
22.75
KB
-rw-r--r--
f90.slc
18.39
KB
-rw-r--r--
ff90.sl
56
B
-rw-r--r--
ff90.slc
82
B
-rw-r--r--
filter.sl
646
B
-rw-r--r--
filter.slc
562
B
-rw-r--r--
folding.sl
13.47
KB
-rw-r--r--
folding.slc
11.13
KB
-rw-r--r--
fortran.sl
10.65
KB
-rw-r--r--
fortran.slc
7.79
KB
-rw-r--r--
generic.hlp
135
B
-rw-r--r--
gpg.sl
4.89
KB
-rw-r--r--
gpg.slc
4.51
KB
-rw-r--r--
help.sl
15.37
KB
-rw-r--r--
help.slc
12
KB
-rw-r--r--
history.sl
5.73
KB
-rw-r--r--
history.slc
2.2
KB
-rw-r--r--
hooks.sl
1.95
KB
-rw-r--r--
hooks.slc
1.74
KB
-rw-r--r--
html.dfa
6.13
KB
-rw-r--r--
html.sl
13.63
KB
-rw-r--r--
html.slc
10.06
KB
-rw-r--r--
ide.hlp
1.25
KB
-rw-r--r--
ide.sl
22.57
KB
-rw-r--r--
ide.slc
20.07
KB
-rw-r--r--
idl.sl
5.58
KB
-rw-r--r--
idl.slc
5.34
KB
-rw-r--r--
info.sl
19.92
KB
-rw-r--r--
info.slc
17.16
KB
-rw-r--r--
isearch.sl
7.7
KB
-rw-r--r--
isearch.slc
5.01
KB
-rw-r--r--
iso-lat2.sl
963
B
-rw-r--r--
iso-lat2.slc
1010
B
-rw-r--r--
iso-lat3.sl
1.3
KB
-rw-r--r--
iso-lat3.slc
994
B
-rw-r--r--
iso-latin.sl
625
B
-rw-r--r--
iso-latin.slc
420
B
-rw-r--r--
iso2xxx.sl
1.77
KB
-rw-r--r--
iso2xxx.slc
1.39
KB
-rw-r--r--
ispell.sl
2.99
KB
-rw-r--r--
ispell.slc
2.26
KB
-rw-r--r--
javamode.dfa
7.59
KB
-rw-r--r--
javamode.sl
3.24
KB
-rw-r--r--
javamode.slc
3.29
KB
-rw-r--r--
jed.hlp
356
B
-rw-r--r--
jed.rc
9.43
KB
-rw-r--r--
jed.sl
3.57
KB
-rw-r--r--
jed.slc
4.01
KB
-rw-r--r--
jedhelp.sl
1.43
KB
-rw-r--r--
jedhelp.slc
1.49
KB
-rw-r--r--
jedusage.sl
967
B
-rw-r--r--
jedusage.slc
1.08
KB
-rw-r--r--
keycode.sl
4.46
KB
-rw-r--r--
keydefs.sl
9.21
KB
-rw-r--r--
keydefs.slc
6.63
KB
-rw-r--r--
krconv.sl
1.86
KB
-rw-r--r--
krconv.slc
1.45
KB
-rw-r--r--
latex.sl
27.01
KB
-rw-r--r--
latex.slc
20.94
KB
-rw-r--r--
latex209.sl
2.24
KB
-rw-r--r--
latex209.slc
1.57
KB
-rw-r--r--
linux.sl
821
B
-rw-r--r--
lisp.sl
1.21
KB
-rw-r--r--
lisp.slc
1.1
KB
-rw-r--r--
ltx-comp.dat
2.01
KB
-rw-r--r--
ltx-math.sl
4.12
KB
-rw-r--r--
ltx-math.slc
3.95
KB
-rw-r--r--
lua.sl
13.05
KB
-rw-r--r--
macro.sl
2.08
KB
-rw-r--r--
macro.slc
1.95
KB
-rw-r--r--
mail.sl
4.82
KB
-rw-r--r--
mail.slc
4.17
KB
-rw-r--r--
mailalias.sl
6.21
KB
-rw-r--r--
mailalias.slc
3.61
KB
-rw-r--r--
mailedit.sl
10.79
KB
-rw-r--r--
mailutils.sl
3.52
KB
-rw-r--r--
makemode.sl
6.83
KB
-rw-r--r--
man.sl
1.8
KB
-rw-r--r--
man.slc
948
B
-rw-r--r--
maple.sl
2.14
KB
-rw-r--r--
maple.slc
1.91
KB
-rw-r--r--
matlab.sl
5.07
KB
-rw-r--r--
matlab.slc
4.07
KB
-rw-r--r--
menu.sl
4.7
KB
-rw-r--r--
menu.slc
3.91
KB
-rw-r--r--
menus.sl
2.31
KB
-rw-r--r--
menus.slc
1.74
KB
-rw-r--r--
mime.sl
1.98
KB
-rw-r--r--
mime.slc
1.75
KB
-rw-r--r--
mimemisc.sl
684
B
-rw-r--r--
mimemisc.slc
733
B
-rw-r--r--
mini.sl
4.54
KB
-rw-r--r--
mini.slc
3.73
KB
-rw-r--r--
minued.sl
8.99
KB
-rw-r--r--
minued.slc
4.37
KB
-rw-r--r--
misc.sl
4.01
KB
-rw-r--r--
misc.slc
2.51
KB
-rw-r--r--
modehook.sl
3.71
KB
-rw-r--r--
modehook.slc
1.64
KB
-rw-r--r--
modeinfo.sl
1.6
KB
-rw-r--r--
modeinfo.slc
1.48
KB
-rw-r--r--
most.sl
3.64
KB
-rw-r--r--
most.slc
3.13
KB
-rw-r--r--
mouse.sl
5.15
KB
-rw-r--r--
mousex.sl
8.33
KB
-rw-r--r--
mousex.slc
4.36
KB
-rw-r--r--
mswmouse.sl
6.85
KB
-rw-r--r--
mutekeys.sl
3.19
KB
-rw-r--r--
mutekeys.slc
1.49
KB
-rw-r--r--
nroff.sl
1.09
KB
-rw-r--r--
nroff.slc
709
B
-rw-r--r--
occur.sl
1.48
KB
-rw-r--r--
occur.slc
1.03
KB
-rw-r--r--
os.sl
4.22
KB
-rw-r--r--
paste.sl
509
B
-rw-r--r--
paste.slc
485
B
-rw-r--r--
perl.sl
33.63
KB
-rw-r--r--
perl.slc
13.77
KB
-rw-r--r--
perlxtra.sl
13.1
KB
-rw-r--r--
perlxtra.slc
5.18
KB
-rw-r--r--
php.sl
83.23
KB
-rw-r--r--
php.slc
54.16
KB
-rw-r--r--
pipe.sl
567
B
-rw-r--r--
pipe.slc
579
B
-rw-r--r--
popups.sl
9.03
KB
-rw-r--r--
popups.slc
8.88
KB
-rw-r--r--
preparse.sl
1.69
KB
-rw-r--r--
pscript.dfa
21.64
KB
-rw-r--r--
pscript.sl
4.79
KB
-rw-r--r--
pscript.slc
4.3
KB
-rw-r--r--
pushmode.sl
1.84
KB
-rw-r--r--
pushmode.slc
1.55
KB
-rw-r--r--
pymode.sl
17.24
KB
-rw-r--r--
pymode.slc
12.9
KB
-rw-r--r--
python.dfa
6.54
KB
-rw-r--r--
rcs.sl
4.27
KB
-rw-r--r--
rcs.slc
2.86
KB
-rw-r--r--
recent.sl
4.53
KB
-rw-r--r--
recent.slc
2.73
KB
-rw-r--r--
recentx.sl
10.13
KB
-rw-r--r--
recentx.slc
6.38
KB
-rw-r--r--
regexp.sl
1.63
KB
-rw-r--r--
regexp.slc
1.54
KB
-rw-r--r--
register.sl
4.11
KB
-rw-r--r--
register.slc
3.1
KB
-rw-r--r--
replace.sl
1.39
KB
-rw-r--r--
replace.slc
1.09
KB
-rw-r--r--
rmail.sl
38.64
KB
-rw-r--r--
rmail.slc
35.99
KB
-rw-r--r--
rot13.sl
497
B
-rw-r--r--
rot13.slc
379
B
-rw-r--r--
runpgm.sl
690
B
-rw-r--r--
sccs.sl
4.33
KB
-rw-r--r--
sccs.slc
2.54
KB
-rw-r--r--
search.sl
2.5
KB
-rw-r--r--
search.slc
2.29
KB
-rw-r--r--
seldisp.sl
806
B
-rw-r--r--
seldisp.slc
617
B
-rw-r--r--
sendmail.sl
7.02
KB
-rw-r--r--
sendmail.slc
5.73
KB
-rw-r--r--
session.sl
5.91
KB
-rw-r--r--
session.slc
3.46
KB
-rw-r--r--
shell.sl
6.26
KB
-rw-r--r--
shell.slc
3.32
KB
-rw-r--r--
shmode.dfa
1.57
KB
-rw-r--r--
shmode.sl
2.33
KB
-rw-r--r--
shmode.slc
1.91
KB
-rw-r--r--
simple.hlp
407
B
-rw-r--r--
site.sl
76.36
KB
-rw-r--r--
site.slc
36.67
KB
-rw-r--r--
slmode.dfa
3.22
KB
-rw-r--r--
slmode.sl
7.1
KB
-rw-r--r--
slmode.slc
5.79
KB
-rw-r--r--
sort.sl
1.21
KB
-rw-r--r--
sort.slc
1.13
KB
-rw-r--r--
sortmisc.sl
751
B
-rw-r--r--
sortmisc.slc
546
B
-rw-r--r--
spicemod.sl
1.06
KB
-rw-r--r--
spicemod.slc
1.03
KB
-rw-r--r--
srchmisc.sl
3.22
KB
-rw-r--r--
srchmisc.slc
2.56
KB
-rw-r--r--
syncproc.sl
3.58
KB
-rw-r--r--
syncproc.slc
2.36
KB
-rw-r--r--
syntax.sl
3.05
KB
-rw-r--r--
syntax.slc
1.47
KB
-rw-r--r--
tabs.sl
1.39
KB
-rw-r--r--
tabs.slc
1.31
KB
-rw-r--r--
tclmode.dfa
4.69
KB
-rw-r--r--
tclmode.sl
10.41
KB
-rw-r--r--
tclmode.slc
6.11
KB
-rw-r--r--
tex.sl
2.39
KB
-rw-r--r--
tex.slc
779
B
-rw-r--r--
texcom.dfa
1.5
KB
-rw-r--r--
texcom.sl
4.75
KB
-rw-r--r--
texcom.slc
4.12
KB
-rw-r--r--
textmode.sl
2.05
KB
-rw-r--r--
textmode.slc
974
B
-rw-r--r--
tiasm.sl
1.16
KB
-rw-r--r--
tiasm.slc
1.11
KB
-rw-r--r--
tmisc.sl
841
B
-rw-r--r--
tmisc.slc
786
B
-rw-r--r--
tmmode.sl
2.01
KB
-rw-r--r--
tmmode.slc
1.65
KB
-rw-r--r--
tmpfile.sl
2.83
KB
-rw-r--r--
tmpfile.slc
1.56
KB
-rw-r--r--
tpascal.dfa
7.65
KB
-rw-r--r--
tpascal.sl
5.77
KB
-rw-r--r--
tpascal.slc
5.51
KB
-rw-r--r--
untab.sl
1021
B
-rw-r--r--
untab.slc
569
B
-rw-r--r--
util.sl
544
B
-rw-r--r--
util.slc
293
B
-rw-r--r--
verilog.sl
1.49
KB
-rw-r--r--
verilog.slc
1.52
KB
-rw-r--r--
vhdlmode.sl
8.45
KB
-rw-r--r--
vhdlmode.slc
5.6
KB
-rw-r--r--
vmshelp.sl
2.25
KB
-rw-r--r--
win1250.sl
1.29
KB
-rw-r--r--
wmark.sl
4.36
KB
-rw-r--r--
wmark.slc
3.61
KB
-rw-r--r--
wmenu.sl
4.72
KB
-rw-r--r--
wmenu.slc
4.86
KB
-rw-r--r--
wordstar.hlp
909
B
-rw-r--r--
wordstar.sl
15.56
KB
-rw-r--r--
wordstar.slc
13.93
KB
-rw-r--r--
xformreg.sl
1.7
KB
-rw-r--r--
xformreg.slc
1.36
KB
-rw-r--r--
yankpop.sl
2.21
KB
-rw-r--r--
yankpop.slc
2.01
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : docbook.sl
% File: docbook.sl -*- SLang -*- % % Author: Guido Gonzato, <ggonza@tin.it> % % Version: 1.0.0. % % Description: this mode is designed to facilitate the editing of % Docbook SGML files. It supports a large subset of Docbook % 3.1, as described in the LDP Author Guide % <http://www.linuxdoc.org/LDP/LDP-Author-Guide/> and % "Docbook: The Definive Guide" <http://www.docbook.org/tdg/> % Complete enough for writing Linux HOWTOs, manuals, and much % more... % For Jed 0.99.13+. % % Installation: if opening a document with .sgml extension doesn't toggle % docbook mode on, then insert these lines in your .jedrc: % % autoload ("docbook_mode", "docbook"); % add_mode_for_extension ("docbook", "sgml"); % % Last updated: 24 May 2001 WRAP_INDENTS = 1; % you really want this custom_variable ("SGML_INDENT", 2); custom_variable ("Sgml_Compile_PS_Cmd", "db2ps"); custom_variable ("Sgml_Compile_Pdf_Cmd", "db2pdf"); custom_variable ("Sgml_Compile_Html_Cmd", "db2html"); custom_variable ("Sgml_View_PS_Cmd", "gv"); custom_variable ("Sgml_View_Pdf_Cmd", "gv"); custom_variable ("Sgml_View_Html_Cmd", "netscape"); private variable NO_PUSH_SPOT = 0; private variable PUSH_SPOT = 1; private variable NO_POP_SPOT = 0; private variable POP_SPOT = 1; % buffer-local variables variable DOC_TYPE = "DOC_TYPE"; % "a" = article, "b" = book variable SECT_TYPE = "SECT_TYPE"; % "#" = sect#, "s" = section % ----- % ifnot (is_defined ("tex_ldots")) % read tex_insert_quote () = evalfile ("texcom"); private define sgml_insert_pair_around_region (left, right) { check_region (1); exchange_point_and_mark (); insert (left); exchange_point_and_mark (); insert (right); pop_spot (); pop_mark_0 (); } define sgml_skip_tag () % ^C^F { go_right_1 (); () = fsearch_char ('<'); } define sgml_bskip_tag () % ^C^B { () = bsearch_char ('<'); } private define sgml_insert_tags (tag1, tag2, do_push_spot, do_pop_spot) { % if a region is defined, insert the tags around it if (markp () ) { sgml_insert_pair_around_region (tag1, tag2); return; } insert (tag1); if (do_push_spot) push_spot (); insert (tag2); if (do_pop_spot) pop_spot (); } define sgml_insert_tag (tag, do_push_spot, do_pop_spot) { variable tag1, tag2; tag1 = sprintf ("<%s>", tag); tag2 = sprintf ("</%s>", tag); sgml_insert_tags (tag1, tag2, do_push_spot, do_pop_spot); } private define sgml_insert_tag_with_newline (tag, do_push_spot, do_pop_spot) { variable tag1, tag2; tag1 = sprintf ("<%s>", tag); tag2 = sprintf ("</%s>\n", tag); sgml_insert_tags (tag1, tag2, do_push_spot, do_pop_spot); } private define sgml_paragraph_separator () { variable cs = CASE_SEARCH; bol_skip_white (); CASE_SEARCH = 0; eolp () or ffind ("<para>") or ffind ("</para>"); CASE_SEARCH = cs; } % let's start % Section stuff define sgml_para (do_push_spot) % ^CP { variable col = what_column () - 1; if (markp () ) { sgml_insert_pair_around_region ("<para>\n", "</para>\n"); return; } insert ("<para>\n"); insert_spaces (col + SGML_INDENT); if (do_push_spot) push_spot (); insert ("\n"); insert_spaces (col); insert ("</para>"); } define sgml_title (tag, do_push_spot) { sgml_insert_tag_with_newline (tag, do_push_spot, NO_POP_SPOT); } private define sgml_section_skel (what_tag, do_push_spot) { variable col = what_column () - 1; vinsert ("<%s>\n", what_tag); insert_spaces (col); sgml_title ("title", do_push_spot); insert ("\n"); insert_spaces (col); sgml_para (NO_PUSH_SPOT); insert ("\n\n"); insert_spaces (col); vinsert ("</%s>", what_tag); if (do_push_spot) pop_spot (); } define sgml_chapter (do_push_spot) { sgml_section_skel ("chapter", do_push_spot); } define sgml_sidebar (do_push_spot) { sgml_section_skel ("sidebar", do_push_spot); } define sgml_appendix (do_push_spot) { sgml_section_skel ("appendix", do_push_spot); } define sgml_epigraph () { variable col = what_column () - 1; insert ("<epigraph>\n"); insert_spaces (col + SGML_INDENT); insert ("<attribution>"); push_spot (); insert ("</attribution>\n"); insert_spaces (col + SGML_INDENT); sgml_para (NO_PUSH_SPOT); insert ("\n"); insert_spaces (col); insert ("</epigraph>\n"); pop_spot (); } define sgml_section () % ^CS { variable col = what_column () - 1; if ("#" == get_blocal_var (SECT_TYPE)) { beep (); error ("`section' not allowed in this environment!"); % !!! what about <section> and <sectX> in Book doctype? return (); } set_blocal_var ("s", SECT_TYPE); sgml_section_skel ("section", PUSH_SPOT); } define sgml_simple_section () { sgml_section_skel ("simplesect", PUSH_SPOT); } define sgml_sect (do_push_spot, level_str) % ^CN { variable level_int; variable ok = 0; if ( ("s" == get_blocal_var (SECT_TYPE) ) and ("a" == get_blocal_var (DOC_TYPE) ) ) { beep (); error ("`sect' not allowed in this environment!"); return (); } set_blocal_var ("#", SECT_TYPE); ifnot (strcmp ("0", level_str) ) while (0 == ok) { level_str = read_mini ("Section level (1..5)?", Null_String, "1"); level_int = level_str [0] - '0'; if ( (level_int > 0) and (level_int < 6) ) ok = 1; ifnot (ok) { beep (); message ("Wrong value! Only 1..5 allowed. "); } } insert (sprintf ("<sect%s id=\"", level_str)); if (do_push_spot) push_spot (); insert ("\">\n"); sgml_title ("title", NO_PUSH_SPOT); insert ("\n"); sgml_para (NO_PUSH_SPOT); insert (sprintf ("\n\n\n</sect%s>", level_str)); if (do_push_spot) pop_spot (); } define sgml_formalpara () { sgml_section_skel ("formalpara", PUSH_SPOT); } % Header stuff define sgml_revision () { variable col = what_column () - 1; insert ("<revision>\n"); insert_spaces (col + SGML_INDENT); insert ("<revnumber>"); push_spot (); % pop_spot () later insert ("</revnumber>\n"); insert_spaces (col + SGML_INDENT); sgml_insert_tag_with_newline ("date", NO_PUSH_SPOT, NO_POP_SPOT); insert_spaces (col + SGML_INDENT); sgml_insert_tag_with_newline ("authorinitial", NO_PUSH_SPOT, NO_POP_SPOT); insert_spaces (col + SGML_INDENT); insert ("<revmark>\n"); insert_spaces (col + SGML_INDENT); insert ("\n"); insert_spaces (col + SGML_INDENT); insert ("</revmark>\n"); insert_spaces (col); insert ("</revision>\n"); } define sgml_revision_history () { variable col = what_column () - 1; insert ("<revhistory>\n"); insert_spaces (col + SGML_INDENT); sgml_revision (); % the spot is pushed insert_spaces (col); insert ("</revhistory>"); pop_spot (); } % Author stuff private define sgml_firstname (do_push_spot, do_pop_spot) { sgml_insert_tag_with_newline ("firstname", do_push_spot, do_pop_spot); } private define sgml_surname (do_push_spot, do_pop_spot) { sgml_insert_tag_with_newline ("surname", do_push_spot, do_pop_spot); } private define sgml_othername (do_push_spot, do_pop_spot) { sgml_insert_tag_with_newline ("othername", do_push_spot, do_pop_spot); } private define sgml_affiliation (do_push_spot, do_pop_spot) { variable col = what_column () - 1; insert ("<affiliation>\n"); insert_spaces (col + SGML_INDENT); sgml_insert_tag_with_newline ("shortaffil", do_push_spot, do_pop_spot); insert_spaces (col + SGML_INDENT); sgml_insert_tag_with_newline ("jobtitle", do_push_spot, do_pop_spot); insert_spaces (col + SGML_INDENT); sgml_insert_tag_with_newline ("orgname", do_push_spot, do_pop_spot); insert_spaces (col + SGML_INDENT); sgml_insert_tag_with_newline ("orgdiv", do_push_spot, do_pop_spot); insert_spaces (col); insert ("</affiliation>\n"); } private define sgml_honorific (do_push_spot, do_pop_spot) { sgml_insert_tag_with_newline ("honorific", do_push_spot, do_pop_spot); } define sgml_author (do_push_spot, do_pop_spot) { variable col = what_column () - 1; insert ("<author>\n"); if (do_push_spot) push_spot (); insert_spaces (col + SGML_INDENT); sgml_honorific (do_push_spot, NO_POP_SPOT); insert_spaces (col + SGML_INDENT); sgml_firstname (do_push_spot, NO_POP_SPOT); insert_spaces (col + SGML_INDENT); sgml_othername (do_push_spot, NO_POP_SPOT); insert_spaces (col + SGML_INDENT); sgml_surname (do_push_spot, NO_POP_SPOT); insert_spaces (col + SGML_INDENT); sgml_affiliation (do_push_spot, NO_POP_SPOT); insert_spaces (col); insert ("</author>\n"); if (do_pop_spot) pop_spot (); } define sgml_template () { variable col, ok, type, is_article = 0; col = what_column () - 1; ok = 0; while (0 == ok) { type = read_mini ("Document type (Article, Book)?", Null_String, "a"); if ( (type [0] == 'a') or (type [0] == 'b') ) ok = 1; ifnot (ok) { beep (); message ("Wrong! 'a' or 'b'! "); } } if (type [0] == 'a') { set_blocal_var ("a", DOC_TYPE); type = "article"; is_article = 1; } else { set_blocal_var ("b", DOC_TYPE); type = "book"; } vinsert ("<!DOCTYPE %s PUBLIC \"-//OASIS//DTD DocBook V3.1//EN\">", type); if (is_article) vinsert ("\n\n<%s lang=\"en\">\n<%s>\n\n", type, "artheader"); else vinsert ("\n\n<%s lang=\"en\">\n<%s>\n\n", type, "bookinfo"); insert_spaces (col + SGML_INDENT); sgml_title ("title", PUSH_SPOT); insert_spaces (col + SGML_INDENT); sgml_insert_tag_with_newline ("subtitle", NO_PUSH_SPOT, NO_POP_SPOT); insert_spaces (col + SGML_INDENT); sgml_author (NO_PUSH_SPOT, NO_POP_SPOT); insert_spaces (col + SGML_INDENT); insert ("<address>\n"); insert_spaces (col + 2 * SGML_INDENT); sgml_insert_tag_with_newline ("email", NO_PUSH_SPOT, NO_POP_SPOT); insert_spaces (col + SGML_INDENT); insert ("</address>\n"); insert_spaces (col + SGML_INDENT); sgml_insert_tag_with_newline ("pubdate", NO_PUSH_SPOT, NO_POP_SPOT); insert ("\n"); insert_spaces (col + SGML_INDENT); insert ("<abstract>\n"); insert_spaces (col + 2 * SGML_INDENT); sgml_para (NO_PUSH_SPOT); insert ("\n"); insert_spaces (col + SGML_INDENT); insert ("</abstract>\n"); if (is_article) { vinsert ("\n</%s>\n\n", "artheader"); insert ("<!-- sections here... -->\n"); } else { vinsert ("\n</%s>\n\n\n", "bookinfo"); insert ("<preface>\n<title></title>\n\n"); sgml_para (NO_PUSH_SPOT); insert ("\n</preface>\n\n"); sgml_chapter (NO_PUSH_SPOT); } vinsert ("\n\n\n</%s>", type); pop_spot (); } define sgml_copyright () { variable col = what_column () - 1; insert_spaces (col); insert ("<copyright>\n"); insert_spaces (col + SGML_INDENT); insert ("<year>"); push_spot (); insert ("</year>\n"); insert_spaces (col + SGML_INDENT); insert ("<holder></holder>\n"); insert_spaces (col); insert ("</copyright>\n"); pop_spot (); } % character styles define sgml_directory () { insert ("<filename id=\"directory\">"); push_spot (); insert ("</filename>"); pop_spot (); } % keys define sgml_keycombo (do_push_spot) { insert ("<keycombo><keycap>"); if (do_push_spot) push_spot (); insert ("</keycap><keycap></keycap></keycombo>"); if (do_push_spot) pop_spot (); } % gui/menus define sgml_menuchoice () { variable col = what_column () - 1; insert ("<menuchoice>\n"); insert_spaces (col + SGML_INDENT); insert ("<shortcut>\n"); insert_spaces (col + 2 * SGML_INDENT); sgml_keycombo (NO_PUSH_SPOT); insert ("\n"); insert_spaces (col + SGML_INDENT); insert ("</shortcut>\n"); insert_spaces (col + SGML_INDENT); insert ("<guimenu>"); push_spot (); insert ("</guimenu>\n"); insert_spaces (col + SGML_INDENT); insert ("<guimenuitem></guimenuitem>\n"); insert_spaces (col); insert ("</menuchoice>\n"); pop_spot (); } % computer-related define sgml_arg_plain (do_push_spot, do_pop_spot) { sgml_insert_tag ("arg", do_push_spot, do_pop_spot); } define sgml_arg (do_push_spot, do_pop_spot) { variable ch, rep, choice, tag1, tag2, sep1, sep2; choice = ""; rep = ""; sep1 = " "; sep2 = " "; flush ("Choice: Req Plain (Enter=nothing) "); ch = tolower (getkey ()); switch (ch) {case 'r': choice = "choice=req"; } {case 'p': choice = "req=plain"; } flush ("Rep: Repeat (Enter=nothing) "); ch = tolower (getkey ()); switch (ch) {case 'r': rep = "rep=repeat"; } ifnot (strlen(choice)) sep1= ""; ifnot (strlen(rep)) sep2= ""; tag1 = sprintf ("<arg%s%s%s%s>", sep1, choice, sep2, rep ); tag2 = "</arg>"; sgml_insert_tags (tag1, tag2, do_push_spot, do_pop_spot); } private define sgml_replaceable (do_push_spot, do_pop_spot) { sgml_insert_tag ("replaceable", do_push_spot, do_pop_spot); } define sgml_group () { variable col = what_column () - 1; insert ("<group>\n"); insert_spaces (col + SGML_INDENT); sgml_arg (PUSH_SPOT, NO_POP_SPOT); insert ("\n"); insert_spaces (col); insert ("</group>\n"); pop_spot (); } define sgml_cmdsynopsis () { variable col = what_column () - 1; insert ("<cmdsynopsis>\n"); insert_spaces (col + SGML_INDENT); insert ("<command>"); push_spot (); insert ("</command>\n"); insert_spaces (col + SGML_INDENT); sgml_arg (NO_PUSH_SPOT); insert ("\n"); insert_spaces (col); insert ("</cmdsynopsis>\n"); pop_spot (); } % environments, sort of define sgml_blockquote () { variable col = what_column () - 1; insert ("<blockquote>\n"); insert_spaces (col); insert ("<attribution>"); push_spot (); insert ("</attribution>\n"); insert_spaces (col + SGML_INDENT); sgml_para (NO_PUSH_SPOT); insert ("\n"); insert_spaces (col); insert ("</blockquote>"); pop_spot (); } define sgml_env (what) { variable col = what_column () - 1; vinsert ("<%s>\n", what); insert_spaces (col); ifnot (strcmp ("example", what)) { sgml_title ("title", PUSH_SPOT); insert_spaces (col + SGML_INDENT); sgml_para (NO_PUSH_SPOT); insert ("\n"); } else { insert_spaces (col + SGML_INDENT); sgml_para (PUSH_SPOT); insert ("\n"); } insert_spaces (col); vinsert ("</%s>\n", what); pop_spot (); } % links define sgml_id () { insert ("id=\""); push_spot (); insert ("\""); } define sgml_anchor () { insert ("<anchor "); sgml_id (); % spot pushed insert (">"); pop_spot (); } define sgml_url () { insert ("<ulink url=\""); push_spot (); insert ("\"><citetitle></citetitle></ulink>"); pop_spot (); } define sgml_xref () { insert ("<xref linkend=\""); push_spot (); insert ("\">"); pop_spot (); } % lists define sgml_listitem (do_push_spot) { variable col = what_column () - 1; insert ("<listitem>\n"); insert_spaces (col + SGML_INDENT); sgml_para (do_push_spot); insert ("\n"); insert_spaces (col); insert ("</listitem>"); } define sgml_itemized_list () { variable col = what_column () - 1; insert ("<itemizedlist>\n"); insert_spaces (col + SGML_INDENT); sgml_listitem (PUSH_SPOT); insert ("\n"); insert_spaces (col); insert ("</itemizedlist>\n"); pop_spot (); } define sgml_ordered_list () { variable col = what_column () - 1; insert ("<orderedlist>\n"); insert_spaces (col + SGML_INDENT); insert ("<listitem>\n"); insert_spaces (col + 2 * SGML_INDENT); insert ("<para>\n"); insert_spaces (col + 2 * SGML_INDENT); push_spot (); insert ("\n"); insert_spaces (col + 2 * SGML_INDENT); insert ("</para>\n"); insert_spaces (col + SGML_INDENT); insert ("</listitem>\n"); insert ("</orderedlist>\n"); pop_spot (); } define sgml_varlistentry () { variable col = what_column () - 1; insert ("<varlistentry>\n"); insert_spaces (col + SGML_INDENT); insert ("<term>"); push_spot (); % we'll do pop_spot () later insert ("</term>\n"); insert_spaces (col + SGML_INDENT); insert ("<listitem>\n"); insert_spaces (col + 2 * SGML_INDENT); sgml_para (NO_PUSH_SPOT); insert ("\n"); insert_spaces (col + SGML_INDENT); insert ("</listitem>\n"); insert_spaces (col); insert ("</varlistentry>\n"); } define sgml_variable_list () { variable col = what_column () - 1; insert ("<variablelist>\n"); insert_spaces (col + SGML_INDENT); sgml_varlistentry (); insert ("</variablelist>\n"); pop_spot (); } define sgml_seglistitem (do_push_spot) { variable col = what_column () - 1; insert ("<seglistitem>\n"); insert_spaces (col + SGML_INDENT); insert ("<seg>"); if (do_push_spot) push_spot (); insert ("</seg><seg></seg>\n"); insert_spaces (col); insert ("</seglistitem>"); } define sgml_segmented_list () { variable col = what_column () - 1; insert ("<segmentedlist>\n"); insert_spaces (col + SGML_INDENT); sgml_title ("title", push_spot); insert_spaces (col + SGML_INDENT); insert ("<segtitle></segtitle>\n"); insert_spaces (col + SGML_INDENT); insert ("<segtitle></segtitle>\n"); insert_spaces (col + SGML_INDENT); sgml_seglistitem (NO_PUSH_SPOT); insert ("\n"); insert_spaces (col); insert ("</segmentedlist>\n"); pop_spot (); } define sgml_step (do_push_spot) { variable col = what_column () - 1; insert ("<step>\n"); insert_spaces (col + SGML_INDENT); sgml_para (do_push_spot); insert ("\n"); insert_spaces (col); insert ("</step>"); if (1 == do_push_spot) pop_spot (); } define sgml_procedure () { variable col = what_column () - 1; insert ("<procedure>\n"); insert_spaces (col + SGML_INDENT); sgml_title ("title", PUSH_SPOT); insert_spaces (col + SGML_INDENT); sgml_step (NO_PUSH_SPOT); insert ("\n"); insert_spaces (col); insert ("</procedure>\n"); pop_spot (); } % tables define sgml_table_row (table_col_int, do_push_spot) { variable i, col = what_column () - 1; insert ("<row>\n"); for (i = 0; i < table_col_int; i++) { insert_spaces (col + SGML_INDENT); insert ("<entry>"); if ( (do_push_spot) and (0 == i) ) push_spot (); insert ("</entry>\n"); } insert_spaces (col); insert ("</row>"); } define sgml_align () { variable ch, align; flush ("Align (Center cHar Justify Left Right)? "); ch = tolower (getkey ()); switch (ch) {case 'c': align = "center"; } {case 'h': align = "char"; } {case 'j': align = "justify"; } {case 'l': align = "left"; } {case 'r': align = "right"; } vinsert ("align=\"%s\"", align); } % static private variable table_columns = 4; define sgml_table (informal_table) { variable col = what_column () - 1; variable i, ch, frame, type_of_table, table_col_str, ok; if (informal_table) type_of_table = "informaltable"; else type_of_table = "table"; flush ("Frame (All, Bottom, None, Sides, Top, tOpbot)? "); ch = tolower (getkey ()); switch (ch) {case 'a': frame = "all"; } {case 'b': frame = "bottom"; } {case 'n': frame = "none"; } {case 's': frame = "sides"; } {case 't': frame = "top"; } {case 'o': frame = "topbot"; } ok = 0; while (0 == ok) { table_col_str = read_mini ("Columns?", Null_String, "4"); table_columns = table_col_str [0] - '0'; if ( (table_columns > 1) and (table_columns < 10) ) ok = 1; ifnot (ok) { beep (); message ("Wrong value! "); } } vinsert ("<%s frame=\"%s\">\n", type_of_table, frame); ifnot (informal_table) sgml_title ("title", PUSH_SPOT); else push_spot (); insert_spaces (col + SGML_INDENT); insert (sprintf ("\n<tgroup cols=\"%s\">\n", table_col_str)); for (i = 0; i < table_columns; i++) { insert_spaces (col + SGML_INDENT); vinsert ("<colspec colname=\"col%s\" align=\"center\">\n", string (i+1) ); } ifnot (informal_table) { insert_spaces (col + SGML_INDENT); insert ("<thead>\n"); insert_spaces (col + SGML_INDENT); sgml_table_row (table_columns, NO_PUSH_SPOT); insert ("\n"); insert_spaces (col + SGML_INDENT); insert ("</thead>\n"); insert_spaces (col + SGML_INDENT); insert ("<tfoot>\n"); insert_spaces (col + SGML_INDENT); insert ("<row>\n"); for (i = 0; i < table_columns; i++) { insert_spaces (col + 2 * SGML_INDENT); insert ("<entry></entry>\n"); } insert_spaces (col + SGML_INDENT); insert ("</row>\n"); insert_spaces (col + SGML_INDENT); insert ("</tfoot>\n"); } insert_spaces (col + SGML_INDENT); insert ("<tbody>\n"); insert_spaces (col + SGML_INDENT); insert ("<row>\n"); for (i = 0; i < table_columns; i++) { insert_spaces (col + 2 * SGML_INDENT); insert ("<entry></entry>\n"); } insert_spaces (col + SGML_INDENT); insert ("</row>\n"); insert_spaces (col + SGML_INDENT); insert ("</tbody>\n"); insert_spaces (col + SGML_INDENT); insert ("</tgroup>\n"); insert_spaces (col); vinsert ("</%s>\n", type_of_table); pop_spot (); } % figures define sgml_figure () { variable i, col = what_column () - 1; insert ("<figure>\n"); insert_spaces (col + SGML_INDENT); insert ("<title>"); push_spot (); insert ("</title>\n"); insert_spaces (col + SGML_INDENT); insert ("<mediaobject>\n"); for (i = 0; i < 2; i++) { insert_spaces (col + 2 * SGML_INDENT); insert ("<imageobject>\n"); insert_spaces (col + 3 * SGML_INDENT); insert ("<imagedata fileref=\"\" format=\"\">\n"); insert_spaces (col + 2 * SGML_INDENT); insert ("</imageobject>\n"); } insert_spaces (col + 2 * SGML_INDENT); insert ("<textobject>\n"); insert_spaces (col + 3 * SGML_INDENT); insert ("<phrase></phrase>\n"); insert_spaces (col + 2 * SGML_INDENT); insert ("</textobject>\n"); insert_spaces (col + SGML_INDENT); insert ("</mediaobject>\n"); insert_spaces (col); insert ("</figure>\n"); pop_spot (); } define insert_sgml_screen () { % this function is redundant, but I can't find a way to pass % Width="80" through menu_append_item sgml_insert_tags ("<screen width=\"80\">\n", "</screen>\n", PUSH_SPOT, NO_POP_SPOT); } define sgml_convert_to_ps () { variable mrk, cmd; mrk = create_user_mark; cmd = sprintf ("%s %s", Sgml_Compile_PS_Cmd, mrk.buffer_name); cmd = read_mini ("Convert command:", Null_String, cmd); compile (cmd); } define sgml_convert_to_pdf () { variable mrk, cmd; mrk = create_user_mark; cmd = sprintf ("%s %s", Sgml_Compile_Pdf_Cmd, mrk.buffer_name); cmd = read_mini ("Convert command:", Null_String, cmd); compile (cmd); } define sgml_convert_to_html () { variable mrk, cmd; mrk = create_user_mark; cmd = sprintf ("%s %s", Sgml_Compile_Html_Cmd, mrk.buffer_name); cmd = read_mini ("Convert command:", Null_String, cmd); compile (cmd); } define sgml_view (type) { variable mrk, cmd, tmp; mrk = create_user_mark; tmp = mrk.buffer_name; (tmp, ) = strreplace (tmp, "sgml", type, -1); switch (type) { case "ps": cmd = sprintf ("%s %s &", Sgml_View_PS_Cmd, tmp); } { case "pdf": cmd = sprintf ("%s %s &", Sgml_View_Pdf_Cmd, tmp); } { case "html": cmd = sprintf ("%s %s &", Sgml_View_Html_Cmd, tmp); } cmd = read_mini ("View with:", Null_String, cmd); #ifdef UNIX () = system (cmd); #else () = run_shell_cmd (cmd); #endif } % let's finish % defining keywords is not necessary, since all the highlighting is % done by the second and third define_syntax (). Rough, but fairly nice. $1 = "docbook"; create_syntax_table ($1); define_syntax ("\"([{<", "\")]}>", '(', $1); define_syntax ('<', '\\', $1); define_syntax ('&', '\\', $1); define_syntax ("0-9A-Za-z>/!", 'w', $1); define_syntax ("<>", '<', $1); define_syntax ("<!-", "-->", '%', $1); % copied from html mode. #ifdef HAS_DFA_SYNTAX % The highlighting copes with comments, "ð" type things, and <argh> type % HTML tags. An unrecognised &..; construct or an incomplete <...> construct % is flagged in delimiter colour. %%% DFA_CACHE_BEGIN %%% private define setup_dfa_callback (name) { dfa_enable_highlight_cache ("docbook.dfa", name); dfa_define_highlight_rule ("<!.*-[ \t]*>", "Qcomment", name); dfa_define_highlight_rule ("^([^\\-]|-+[^>])*-+[ \t]*>", "Qcomment", name); dfa_define_highlight_rule ("<!.*", "comment", name); dfa_define_highlight_rule ("<([^>\"]|\"[^\"]*\")*>", "keyword", name); dfa_define_highlight_rule ("<([^>\"]|\"[^\"]*\")*(\"[^\"]*)?$", "delimiter", name); dfa_define_highlight_rule ("&#[0-9]+;", "keyword1", name); dfa_define_highlight_rule ("&[A-Za-z]+;", "Kdelimiter", name); dfa_define_highlight_rule (".", "normal", name); dfa_build_highlight_table (name); } dfa_set_init_callback (&setup_dfa_callback, "docbook"); %%% DFA_CACHE_END %%% #endif private define init_menu (menu) { % header menu_append_popup (menu, "&Header"); variable m = sprintf ("%s.&Header", menu); menu_append_item (m, "<&ackno>", "sgml_insert_tag (\"ackno\", 1, 1)"); menu_append_item (m, "<a&uthor>", "sgml_author (1, 1)"); menu_append_item (m, "<©right>", "sgml_copyright ()"); menu_append_item (m, "<rev&history>", "sgml_revision_history ()"); menu_append_item (m, "<&revision>", "sgml_revision (); pop_spot ()"); menu_append_item (m, "&Template", "sgml_template ()"); % sections menu_append_popup (menu, "&Section"); m = sprintf ("%s.&Section", menu); menu_append_item (m, "<&appendix>", "sgml_appendix (1)"); menu_append_item (m, "<&chapter>", "sgml_chapter (1)"); menu_append_item (m, "<&epigraph>", "sgml_epigraph ()"); menu_append_item (m, "<&formalpara>", "sgml_formalpara ()"); menu_append_item (m, "<si&mplesection>", "sgml_simple_section ()"); menu_append_item (m, "&numbered section", "sgml_sect (1, \"0\")"); menu_append_item (m, "<§ion>", "sgml_section ()"); menu_append_item (m, "<s&idebar>", "sgml_sidebar (1)"); menu_append_item (m, "<&title>", "sgml_title (\"title\", 1); pop_spot ()"); menu_append_item (m, "<s&ubtitle>", "sgml_title (\"subtitle\", 1); pop_spot ()"); % character menu_append_popup (menu, "&Character"); m = sprintf ("%s.&Character", menu); menu_append_item (m, "<&acronym>", "sgml_insert_tag (\"acronym\", 1, 1)"); menu_append_item (m, "<&citation>", "sgml_insert_tag (\"citation\", 1, 1)"); menu_append_item (m, "<&emphasis>", "sgml_insert_tag (\"emphasis\", 1, 1)"); menu_append_item (m, "<&firstterm>", "sgml_insert_tag (\"firstterm\", 1, 1)"); menu_append_item (m, "<foot¬e>", "sgml_insert_tag (\"footnote\", 1, 1)"); menu_append_item (m, "<&superscript>", "sgml_insert_tag (\"superscript\", 1, 1)"); menu_append_item (m, "<s&ubscript>", "sgml_insert_tag (\"subscript\", 1, 1)"); % computer menu_append_popup (menu, "C&omputer"); m = sprintf ("%s.C&omputer", menu); menu_append_item (m, "<&application>", "sgml_insert_tag (\"application\", 1, 1)"); menu_append_item (m, "<mouse&button>", "sgml_insert_tag (\"mousebutton\", 1, 1)"); menu_append_item (m, "<&command>", "sgml_insert_tag (\"command\", 1, 1)"); menu_append_item (m, "&directory", "sgml_directory ()"); menu_append_item (m, "<&envar>", "sgml_insert_tag (\"envar\", 1, 1)"); menu_append_item (m, "<&filename>", "sgml_insert_tag (\"filename\", 1, 1)"); menu_append_item (m, "<fu&nction>", "sgml_insert_tag (\"function\", 1, 1)"); menu_append_item (m, "<program&listing>", "sgml_insert_tag (\"programlisting\", 1, 1)"); menu_append_item (m, "<computer&output>", "sgml_insert_tag (\"computeroutput\", 1, 1)"); menu_append_item (m, "<cons&tant>", "sgml_insert_tag (\"constant\", 1, 1)"); menu_append_item (m, "<&prompt>", "sgml_insert_tag (\"prompt\", 1, 1)"); menu_append_item (m, "<&screen>", "insert_sgml_screen ()"); menu_append_item (m, "<&userinput>", "sgml_insert_tag (\"userinput\", 1, 1)"); menu_append_item (m, "<&varname>", "sgml_insert_tag (\"varname\", 1, 1)"); % computer: popups menu_append_popup (m, "&Menu"); menu_append_popup (m, "&Keys"); menu_append_popup (m, "CmdS&ynopsis"); % computer/menu m = sprintf ("%s.C&omputer.&Menu", menu); menu_append_item (m, "<&accel>", "sgml_insert_tag (\"accel\", 1, 1)"); menu_append_item (m, "<menu&choice>", "sgml_menuchoice ()"); menu_append_item (m, "<&guimenu>", "sgml_insert_tag (\"guimenu\", 1, 1)"); menu_append_item (m, "<guimenu&item>", "sgml_insert_tag (\"guimenuitem\", 1, 1)"); % computer/keys m = sprintf ("%s.C&omputer.&Keys", menu); menu_append_item (m, "<key&cap>", "sgml_insert_tag (\"keycap\", 1, 1)"); menu_append_item (m, "<key&sym>", "sgml_insert_tag (\"keysym\", 1, 1)"); menu_append_item (m, "<keyc&ode>", "sgml_insert_tag (\"keycode\", 1, 1)"); menu_append_item (m, "<keyco&mbo>", "sgml_keycombo (1)"); % computer/cmdsynopsis m = sprintf ("%s.C&omputer.CmdS&ynopsis", menu); menu_append_item (m, "<&arg>", "sgml_arg (1, 1)"); menu_append_item (m, "<&break>", "insert (\"<sbr>\\n\")"); menu_append_item (m, "<cmd&synopsis>", "sgml_cmdsynopsis ()"); menu_append_item (m, "&plain <arg>", "sgml_arg_plain (1, 1)"); menu_append_item (m, "<&group>", "sgml_group ()"); menu_append_item (m, "<&replaceable>", "sgml_insert_tag (\"replaceable\", 1, 1)"); % environment menu_append_popup (menu, "&Environment"); m = sprintf ("%s.&Environment", menu); menu_append_item (m, "<&blockquote>", "sgml_blockquote ()"); menu_append_item (m, "<&caution>", "sgml_env (\"caution\")"); menu_append_item (m, "<&example>", "sgml_env (\"example\")"); menu_append_item (m, "<&important>", "sgml_env (\"important\")"); menu_append_item (m, "<¬e>", "sgml_env (\"note\")"); menu_append_item (m, "<&tip>", "sgml_env (\"tip\")"); menu_append_item (m, "<&warning>", "sgml_env (\"warning\")"); % links menu_append_popup (menu, "Lin&k"); m = sprintf ("%s.Lin&k", menu); menu_append_item (m, "<&anchor>", "sgml_anchor ()"); menu_append_item (m, "<&email>", "sgml_insert_tag (\"email\")"); menu_append_item (m, "<&id>", "sgml_id (); pop_spot ()"); menu_append_item (m, "<&url>", "sgml_url ()"); menu_append_item (m, "<&xref>", "sgml_xref ()"); % lists menu_append_popup (menu, "&List"); m = sprintf ("%s.&List", menu); menu_append_item (m, "<&itemizedlist>", "sgml_itemized_list ()"); menu_append_item (m, "<&listitem>", "sgml_listitem (1); pop_spot ()"); menu_append_item (m, "<&orderedlist>", "sgml_ordered_list ()"); menu_append_item (m, "<&segmentedlist>", "sgml_segmented_list ()"); menu_append_item (m, "<&variablelist>", "sgml_variable_list ()"); menu_append_item (m, "<varlist&entry>", "sgml_varlistentry (); pop_spot ()"); menu_append_item (m, "<se&glistitem>", "sgml_seglistitem (1); pop_spot ()"); menu_append_item (m, "<&procedure>", "sgml_procedure ()"); menu_append_item (m, "<s&tep>", "sgml_step (1)"); % table menu_append_popup (menu, "&Table"); m = sprintf ("%s.&Table", menu); menu_append_item (m, "<&align>", "sgml_align ()"); menu_append_item (m, "<&informaltable>", "sgml_table (1)"); menu_append_item (m, "<&table>", "sgml_table (0)"); menu_append_item (m, "<&row>", "sgml_table_row (table_columns, 1, 1); pop_spot ()"); % paragraph menu_append_item (menu, "<¶>", "sgml_para (1); pop_spot ()"); % figure menu_append_item (menu, "<&figure>", "sgml_figure ()"); % separator menu_append_separator (menu); % convert to... menu_append_item (menu, "Convert To &PostScript", "sgml_convert_to_ps ()"); menu_append_item (menu, "Convert To P&DF", "sgml_convert_to_pdf ()"); menu_append_item (menu, "Convert To &HTML", "sgml_convert_to_html ()"); menu_append_item (menu, "&View PostScript", "sgml_view (\"ps\")"); menu_append_item (menu, "View PDF", "sgml_view (\"ps\")"); menu_append_item (menu, "V&iew HTML", "sgml_view (\"html\")"); } $1 = "docbook"; ifnot (keymap_p ($1)) make_keymap ($1); % various keymaps definekey_reserved ("sgml_bskip_tag", "^B", $1); definekey_reserved ("sgml_skip_tag", "^F", $1); definekey_reserved ("sgml_para (1); pop_spot ()", "p", $1); definekey_reserved ("sgml_section ()", "ss", $1); definekey_reserved ("sgml_sect (1, \"0\"))", "sn", $1); definekey_reserved ("insert (\"$\")", "$", $1); definekey_reserved ("insert (\"&\")", "&", $1); definekey_reserved ("sgml_comment", ";", $1); definekey_reserved ("insert (\"…\")", ".", $1); definekey_reserved ("insert (\"<\")", "<", $1); definekey_reserved ("insert (\">\")", ">", $1); definekey_reserved ("sgml_convert_to_ps ()", "cp", $1); definekey_reserved ("sgml_convert_to_pdf ()", "cd", $1); definekey_reserved ("sgml_convert_to_html ()", "ch", $1); definekey_reserved ("sgml_convert_to_ps ()", "cp", $1); definekey_reserved ("sgml_view (\"ps\")", "vp", $1); definekey_reserved ("sgml_view (\"pdf\")", "vd", $1); definekey_reserved ("sgml_view (\"html\")", "vh", $1); % template definekey_reserved ("sgml_insert_tag (\"ackno\", 1, 1)", "ha", $1); definekey_reserved ("sgml_author (1, 1)", "hu", $1); definekey_reserved ("sgml_copyright ()", "hc", $1); definekey_reserved ("sgml_revision_history ()", "hh", $1); definekey_reserved ("sgml_revision (); pop_spot ()", "hr", $1); definekey_reserved ("sgml_template ()", "ht", $1); % section definekey_reserved ("sgml_appendix (1)", "sa", $1); definekey_reserved ("sgml_chapter (1)", "sc", $1); definekey_reserved ("sgml_epigraph ()", "se", $1); definekey_reserved ("sgml_formalpara ()", "sf", $1); definekey_reserved ("sgml_simple_section ()", "sm", $1); definekey_reserved ("sgml_sect (1, \"0\")", "sn", $1); definekey_reserved ("sgml_sidebar (1)", "si", $1); definekey_reserved ("sgml_title (\"title\", 1); pop_spot ()", "st", $1); definekey_reserved ("sgml_title (\"subtitle\", 1); pop_spot ()", "su", $1); % character definekey_reserved ("sgml_insert_tag (\"acronym\", 1, 1)", "ca", $1); definekey_reserved ("sgml_insert_tag (\"citation\", 1, 1)", "cc", $1); definekey_reserved ("sgml_insert_tag (\"emphasis\", 1, 1)", "ce", $1); definekey_reserved ("sgml_insert_tag (\"firstterm\", 1, 1)", "cf", $1); definekey_reserved ("sgml_insert_tag (\"footnote\", 1, 1)", "cn", $1); definekey_reserved ("sgml_insert_tag (\"superscript\", 1, 1)", "cs", $1); definekey_reserved ("sgml_insert_tag (\"subscript\", 1, 1)", "cu", $1); % computer definekey_reserved ("sgml_insert_tag (\"application\", 1, 1)", "oa", $1); definekey_reserved ("sgml_insert_tag (\"mousebutton\", 1, 1)", "ob", $1); definekey_reserved ("sgml_insert_tag (\"command\", 1, 1)", "oc", $1); definekey_reserved ("sgml_directory ()", "od", $1); definekey_reserved ("sgml_insert_tag (\"envar\", 1, 1)", "oe", $1); definekey_reserved ("sgml_insert_tag (\"filename\", 1, 1)", "of", $1); definekey_reserved ("sgml_insert_tag (\"function\", 1, 1)", "on", $1); definekey_reserved ("sgml_insert_tag (\"programlisting\", 1, 1)", "ol", $1); definekey_reserved ("sgml_insert_tag (\"computeroutput\", 1, 1)", "oo", $1); definekey_reserved ("sgml_insert_tag (\"constant\", 1, 1)", "ot", $1); definekey_reserved ("sgml_insert_tag (\"prompt\", 1, 1)", "op", $1); definekey_reserved ("insert_sgml_screen ()", "os", $1); definekey_reserved ("sgml_insert_tag (\"userinput\", 1, 1)", "ou", $1); definekey_reserved ("sgml_insert_tag (\"varname\", 1, 1)", "ov", $1); % environment definekey_reserved ("sgml_blockquote ()", "eb", $1); definekey_reserved ("sgml_env (\"caution\")", "ec", $1); definekey_reserved ("sgml_env (\"example\")", "ee", $1); definekey_reserved ("sgml_env (\"important\")", "ei", $1); definekey_reserved ("sgml_env (\"note\")", "en", $1); definekey_reserved ("sgml_env (\"tip\")", "et", $1); definekey_reserved ("sgml_env (\"warning\")", "ew", $1); % links definekey_reserved ("sgml_anchor ()", "ka", $1); definekey_reserved ("sgml_insert_tag (\"email\")", "ke", $1); definekey_reserved ("sgml_id (); pop_spot ()", "ki", $1); definekey_reserved ("sgml_url ()", "ku", $1); definekey_reserved ("sgml_xref ()", "kx", $1); % lists definekey_reserved ("sgml_itemized_list ()", "li", $1); definekey_reserved ("sgml_listitem (1); pop_spot ()", "ll", $1); definekey_reserved ("sgml_ordered_list ()", "lo", $1); definekey_reserved ("sgml_segmented_list ()", "ls", $1); definekey_reserved ("sgml_variable_list ()", "lv", $1); definekey_reserved ("sgml_varlistentry (); pop_spot ()", "le", $1); definekey_reserved ("sgml_seglistitem (1); pop_spot ()", "lg", $1); definekey_reserved ("sgml_procedure ()", "lp", $1); definekey_reserved ("sgml_step (1)", "lt", $1); % table definekey_reserved ("sgml_align ()", "ta", $1); definekey_reserved ("sgml_table (1)", "ti", $1); definekey_reserved ("sgml_table (0)", "tt", $1); definekey_reserved ("sgml_table_row (table_columns, 1, 1); pop_spot ()", "tr", $1); definekey_reserved ("sgml_figure ()", "f", $1); definekey ("tex_insert_quote", "\"", $1); definekey ("tex_insert_quote", "'", $1); %!%+ %\function{docbook_mode} %\synopsis{docbook_mode} %\usage{Void docbook_mode ();} %\description % This mode is designed to facilitate the editing of Docbook 3.1 SGML files. % If a region is defined (i.e., if a mark is set), many SGML tags will % insert around the region; e.g. '<emphasis>' and '</emphasis>'. Tags are % inserted either using the Mode menu, or with a key combination resembling % the menu entry, e.g. ^Cce inserts <emphasis> (M&ode/&Character/<&emphasis>). % Functions that affect this mode include (Emacs mode assumed - IDE mode % uses ^Z instead of ^C): %#v+ % sgml_bskip_tag ^C^B % sgml_skip_tag ^C^F % sgml_para ^CP % sgml_section ^CS % sgml_sect ^CN % insert $ ^C$ % insert & ^C& % insert … ^C. % insert < ^C< % insert > ^C> %#v- % Variables affecting this mode include: %#v+ % Variable Default value % % SGML_INDENT 2 % Sgml_Compile_PS_Cmd "db2ps" % Sgml_Compile_Pdf_Cmd "db2pdf" % Sgml_Compile_Html_Cmd "db2html" % Sgml_View_PS_Cmd "gv" % Sgml_View_Pdf_Cmd "gv" % Sgml_View_Html_Cmd "netscape" %#v- % To change the value of a variable, define that variable in .jedrc % before loading docbook.sl. For example: %#v+ % variable SGML_INDENT = 3; %#v- % Hooks: \var{sgml_mode_hook} %!%- define docbook_mode () { variable mode = "docbook"; set_mode (mode, 1); % wrap mode use_keymap (mode); set_syntax_flags (mode, 8); use_syntax_table (mode); set_buffer_hook ("par_sep", &sgml_paragraph_separator); ifnot (blocal_var_exists (DOC_TYPE)) define_blocal_var (DOC_TYPE, ""); ifnot (blocal_var_exists (SECT_TYPE)) define_blocal_var (SECT_TYPE, ""); push_spot (); % is the document type already defined? bob (); variable cs = CASE_SEARCH; CASE_SEARCH = 0; if (fsearch ("<book")) set_blocal_var ("b", DOC_TYPE); else if (fsearch ("<article")) set_blocal_var ("a", DOC_TYPE); else set_blocal_var ("*", DOC_TYPE); bob (); if (fsearch ("<section")) set_blocal_var ("s", SECT_TYPE); else if (fsearch ("<sect1")) set_blocal_var ("#", SECT_TYPE); else set_blocal_var ("*", SECT_TYPE); CASE_SEARCH = cs; pop_spot (); mode_set_mode_info (mode, "init_mode_menu", &init_menu); run_mode_hooks ("docbook_mode_hook"); } % --- End of file docbook.sl ---
Close