editors

changeset 17:566f40279eb8

* Highlights the word TODO (case insensitive) in Euphoria comments
* Euphoria mode allows use of it's indentation setup to HTML based modes
such as eTML
* eTML attempts to make use of the indentation system in Euphoria while in
EuScript but it's failing to indent anything right now
* eTML mode now highlights tag names in an eTag file {{{tag_name}}}
author Jeremy Cowgar <jeremy@cowgar.com>
date Tue Nov 02 07:57:57 2010 +0000 (2010-11-02)
parents 1fad0698d80e
children bfbbdcdc9036
files microemacs/hketml.emf microemacs/hkeuphoria.emf
line diff
     1.1 --- a/microemacs/hketml.emf	Tue Nov 02 06:42:09 2010 +0000
     1.2 +++ b/microemacs/hketml.emf	Tue Nov 02 07:57:57 2010 +0000
     1.3 @@ -4,6 +4,7 @@
     1.4  ; See the file me.emf for copying and conditions
     1.5  ;
     1.6  ; Created:    Sun Sep 6 2009
     1.7 +; Modified:   Tue Nov 2 2010
     1.8  ; Synopsis:   Euphoria Text Mark Up Language
     1.9  ; Authors:    Jeremy Cowgar
    1.10  ;
    1.11 @@ -28,21 +29,30 @@
    1.12  !if &not &exist fhook-euphoria
    1.13      !force exec-file "hkeuphoria"
    1.14  !endif
    1.15 +
    1.16  !force execute-file "htmlcore" "etml" 
    1.17  
    1.18  ; add the <% %> euphoria support
    1.19  !if &and &sin "h" .fhook-etml.setup &band .hilight.flags 0x02 
    1.20 -    ;hilight .hilight.etmltag 4 "=\\{[^ \t\n<>]*<%" "\\?>[^ \t\n>]*" "%>"  .scheme.string
    1.21 -    ;hilight .hilight.etmltag 4 "=\\{\"[^\"\n<]*<%" "\\?>[^\"]*\"" "%>"  .scheme.string
    1.22 -    !if &exist .hilight.euphoria
    1.23 +    !if &exist .hilight.euscript
    1.24          hilight .hilight.etml     0x80 "<%" .hilight.euscript .scheme.prepro
    1.25          hilight .hilight.etmltag  0x80 "<%" .hilight.euscript .scheme.prepro
    1.26          hilight .hilight.euscript 0x80 "%>" 0 .scheme.prepro
    1.27 -        hilight .hilight.etml     0x80 "<%" .hilight.euscript .scheme.prepro
    1.28 -        hilight .hilight.etmltag  0x80 "<%" .hilight.euscript .scheme.prepro
    1.29 -        hilight .hilight.euscript 0x80 "%>" 0 .scheme.prepro
    1.30 +        hilight .hilight.etml     4 "{{{" "}}}" "" .scheme.error
    1.31 +    !endif
    1.32 +!endif
    1.33 +!if &sin "d" .fhook-etml.setup
    1.34 +    !if &exist .indent.euscript
    1.35 +        indent .hilight.etmltag t "<%" .indent.euscript
    1.36 +        indent .hilight.etmltag t "[\t ]*end if$" .hilight.euscript
    1.37 +        indent .hilight.etmltag t "[\t ]*end function$" .hilight.euscript
    1.38 +        indent .hilight.etmltag t "[\t ]*end sub$" .hilight.euscript
    1.39 +        indent .hilight.etmltag t "%>" .hilight.etml
    1.40 +        
    1.41 +        indent .hilight.etml x "^<%" 0 .indent.euscript
    1.42 +        indent .hilight.etml x ".<%" t .indent.euscript
    1.43 +        indent .indent.euscript w "%>" -t 0
    1.44      !endif
    1.45  !endif
    1.46  
    1.47  buffer-init-fhook "etml"
    1.48 -
     2.1 --- a/microemacs/hkeuphoria.emf	Tue Nov 02 06:42:09 2010 +0000
     2.2 +++ b/microemacs/hkeuphoria.emf	Tue Nov 02 07:57:57 2010 +0000
     2.3 @@ -32,10 +32,12 @@
     2.4      set-variable .hilight.euphoria &pinc .hilight.next 1
     2.5  !endif
     2.6  !if &and &sin "h" .fhook-euphoria.setup &band .hilight.flags 0x02
     2.7 -    0 hilight .hilight.euphoria 2 75 ;$global-scheme
     2.8 +    0 hilight .hilight.euphoria 2 75 $global-scheme
     2.9  
    2.10      hilight .hilight.euphoria  2 "^#!/"                  .scheme.header
    2.11      hilight .hilight.euphoria  2 "--"                    .scheme.comment
    2.12 +    hilight .hilight.euphoria  2 "--\\s*[Tt][Oo][Dd][Oo]".scheme.error
    2.13 +
    2.14      hilight .hilight.euphoria 20 "/\\*" "*/" ""          .scheme.comment
    2.15      hilight .hilight.euphoria  2 "\"[^\"]*$"             .scheme.error
    2.16      hilight .hilight.euphoria  4 "\"" "\"" "\\"          .scheme.string
    2.17 @@ -189,10 +191,8 @@
    2.18      ; Expressions at the end of a line - try with these
    2.19      indent .hilight.euphoria c "[-+=*/<>&]$" t
    2.20  
    2.21 -    ;indent .hilight.euphoria b "{" "}"
    2.22      indent .hilight.euphoria n "{" t
    2.23      indent .hilight.euphoria o "}" -t
    2.24 -    ;indent .hilight.euphoria b "(" ")"
    2.25      indent .hilight.euphoria n "(" t
    2.26      indent .hilight.euphoria o ")" -t
    2.27  
    2.28 @@ -200,6 +200,11 @@
    2.29      indent .hilight.euphoria i "--"
    2.30      indent .hilight.euphoria e "/*" "*/" ""
    2.31      indent .hilight.euphoria e "\"" "\"" "\\"
    2.32 +    indent .hilight.euphoria e "\"\"\"" "\"\"\"" ""
    2.33 +    indent .hilight.euphoria e "`" "`" ""
    2.34 +
    2.35 +    ; let html based files use the euphoria indent for any ETML scripts
    2.36 +    set-variable .indent.euscript .hilight.euphoria
    2.37  !endif
    2.38  
    2.39  buffer-init-fhook "euphoria"

SCM Home | OpenEuphoria.org Home