aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2014-11-22 23:39:56 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2014-11-22 23:39:56 +0100
commit9e4af856e3bd93571f384c4b8a03d9a079dce1dc (patch)
tree71a35d93ecc2dc61a173b174c90c931aa84b2a4f /lib
parent14cc71e053a7eddb86264049c2fc8b133870a6e6 (diff)
downloadsciteco-9e4af856e3bd93571f384c4b8a03d9a079dce1dc.tar.gz
updated lexer and session libraries using new EU, [* and ]* commands
Diffstat (limited to 'lib')
-rw-r--r--lib/lexer.tes31
-rw-r--r--lib/session.tes13
2 files changed, 21 insertions, 23 deletions
diff --git a/lib/lexer.tes b/lib/lexer.tes
index 0a4622c..bf6b475 100644
--- a/lib/lexer.tes
+++ b/lib/lexer.tes
@@ -4,13 +4,12 @@
@[lexer.checkheader]{
.h
0,0,1ESPOSITIONFROMLINE:X.h
- EQ.h :SQ_ Q*EB
+ [* EQ.h :SQ_ ]*
}
! Match Q-Reg "_" against end of current doc's file name !
@[lexer.checkname]{
- EQ* ZJ I H:SQ_
- Q*EB
+ [* EQ* ZJ I H:SQ_ ]*
}
@[lexer.auto]{
@@ -19,19 +18,17 @@
:M[color.error],35M[color.set]
}
-! Automatically mung all the lexers and them to "lexer.auto" !
-Q*U.#cd EQ.[lexers]
-ENQ[$SCITECOPATH]/lexers/*.tes J
-<:L;R
- 0X.[filename] .-4U.p -S/ .,Q.pX.[name]
- EMQ.[filename]
- EQ[lexer.auto] ZJ
- @I{
- :M[lexer.test.Q.[name]]"S :M[lexer.set.Q.[name]] Oend '
- }
- EQ.[lexers]
-L>
-Q.#cdEB
+! Automatically mung all the lexers and add them to "lexer.auto" !
+[*
+ EQ.[lexers] ENQ[$SCITECOPATH]/lexers/*.tes J
+ <:L;R
+ 0X.[filename] 4R .U.p <-A-^^/"= 1; ':R;> .,Q.pX.[name]
+ EMQ.[filename]
+ :@EU[lexer.auto]{
+ :M[lexer.test.Q.[name]]"S :M[lexer.set.Q.[name]] Oend '
+ }
+ L>
+]*
-! append an "end" label !
+! append "end" label to "lexer.auto" !
:[lexer.auto]!end!
diff --git a/lib/session.tes b/lib/session.tes
index 0c3ef0a..63e4cfc 100644
--- a/lib/session.tes
+++ b/lib/session.tes
@@ -2,25 +2,26 @@
! Path of the session profile.
Change this to save/load a custom profile !
-[* EQ[session.path] IQ[$HOME]/.teco_session ]*
+EU[session.path]Q[$HOME]/.teco_session
+! Save current session to the file specified by "session.path" !
@[session.save]{
Q*U.[curbuf]
EJ<
%.bEB ESGETFIRSTVISIBLELINEU.[fvline] ESGETXOFFSETU.[xoff] .U.[dot]
- EQ.[session]
- @I{EBQ* \.[fvline]ESSETFIRSTVISIBLELINE \.[xoff]ESSETXOFFSET \.[dot]:J^M}
+ :@EU.[session]{EBQ* \.[fvline]ESSETFIRSTVISIBLELINE \.[xoff]ESSETXOFFSET \.[dot]:J^M}
EQ* Z"= -1U.u '
>
- EQ.[session]
- Q.u"F @I{EB -EF^M} '
- @I{\.[curbuf]EB^M}
+ ! We always start with an unnamed file in the ring, so we may have to remove it: !
+ Q.u"F :@EU.[session]{EB -EF^M} '
+ :@EU.[session]{\.[curbuf]EB^M}
EBQ[session.path]
HK G.[session] EW EF
Q.[curbuf]EB
}
+! Load session specified by "session.path" !
@[session.load]{
EJ<-EF>
EQ.x ENQ[session.path]