aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/lexer.tes
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-05-25 22:02:31 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-05-25 22:02:31 +0200
commitbae8cd712c167522a95a093296453a54dde4a524 (patch)
tree1523fcf738c9dbd0b6d96222ccd693faa2938060 /lib/lexer.tes
parent83f18d2578288fe71fca409e4f03434346b0d5b7 (diff)
downloadsciteco-bae8cd712c167522a95a093296453a54dde4a524.tar.gz
extended <EN> command and used it to optimize "lexer.test..." macros
* EN may now be used for matching file names (similar to fnmatch(3)). This is used to check the current buffers file extension in the lexer configuration macros instead of using expensive Q-Register manipulations. This halves the overall startup time - it is now acceptable even with the current amount of lexer configurations. * EN may now be used for checking file types. session.tes has been simplified. * BREAKS macro portability (EN now has 2 string arguments). * The Globber class has been extended to allow filtering of glob results by file type.
Diffstat (limited to 'lib/lexer.tes')
-rw-r--r--lib/lexer.tes13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/lexer.tes b/lib/lexer.tes
index bf6b475..309c752 100644
--- a/lib/lexer.tes
+++ b/lib/lexer.tes
@@ -7,20 +7,17 @@
[* EQ.h :SQ_ ]*
}
-! Match Q-Reg "_" against end of current doc's file name !
-@[lexer.checkname]{
- [* EQ* ZJ I H:SQ_ ]*
-}
-
@[lexer.auto]{
! Set up brace lightning !
:M[color.bracelight],34M[color.set]
:M[color.error],35M[color.set]
+ [_
}
! Automatically mung all the lexers and add them to "lexer.auto" !
[*
- EQ.[lexers] ENQ[$SCITECOPATH]/lexers/*.tes J
+ EQ.[lexers]
+ [_ 1ENQ[$SCITECOPATH]/lexers/*.tes ]_ J
<:L;R
0X.[filename] 4R .U.p <-A-^^/"= 1; ':R;> .,Q.pX.[name]
EMQ.[filename]
@@ -31,4 +28,6 @@
]*
! append "end" label to "lexer.auto" !
-:[lexer.auto]!end!
+:@[lexer.auto]{
+ !end! ]_
+}