editors

changeset 19:8b6558dc0fa5

* EuDOC highlighting is now optional
* Item browser now gives more descriptive names to override, global,
public and local functions, procedures and types.
* Euphoria code is now properly auto indented inside of etml tags
in etml files.
author Jeremy Cowgar <jeremy@cowgar.com>
date Tue Nov 02 17:01:19 2010 +0000 (2010-11-02)
parents bfbbdcdc9036
children be2c0145db9e
files microemacs/hketml.emf microemacs/hkeuphoria.emf
line diff
     1.1 --- a/microemacs/hketml.emf	Tue Nov 02 15:57:38 2010 +0000
     1.2 +++ b/microemacs/hketml.emf	Tue Nov 02 17:01:19 2010 +0000
     1.3 @@ -44,13 +44,9 @@
     1.4  !if &sin "d" .fhook-etml.setup
     1.5      !if &exist .indent.euscript
     1.6          indent .hilight.etmltag t "<%" .indent.euscript
     1.7 -        indent .hilight.etmltag t "[\t ]*end if$" .hilight.euscript
     1.8 -        indent .hilight.etmltag t "[\t ]*end function$" .hilight.euscript
     1.9 -        indent .hilight.etmltag t "[\t ]*end sub$" .hilight.euscript
    1.10          indent .hilight.etmltag t "%>" .hilight.etml
    1.11          
    1.12 -        indent .hilight.etml x "^<%" 0 .indent.euscript
    1.13 -        indent .hilight.etml x ".<%" t .indent.euscript
    1.14 +        indent .hilight.etml x "<%" t .indent.euscript
    1.15          indent .indent.euscript w "%>" -t 0
    1.16      !endif
    1.17  !endif
     2.1 --- a/microemacs/hkeuphoria.emf	Tue Nov 02 15:57:38 2010 +0000
     2.2 +++ b/microemacs/hkeuphoria.emf	Tue Nov 02 17:01:19 2010 +0000
     2.3 @@ -25,8 +25,48 @@
     2.4  set-variable .fhook-euphoria.collapse-close "^\\s*end\\s+\\(function\\|procedure\\|type\\)"
     2.5  
     2.6  ; Setup item-list
     2.7 -set-variable .fhook-euphoria.item-list-s1 "^\\s*\\(override\\|global\\|public\\|export\\)?\\s*\\(function\\|procedure\\|type\\)\\s+\\(\\w+\\)"
     2.8 -set-variable .fhook-euphoria.item-list-r1 "\\1 \\2 \ecB\\3\ecA"
     2.9 +
    2.10 +; Override Proc/Func/Type
    2.11 +set-variable .fhook-euphoria.item-list-s1 "^\\s*override\\s+procedure\\s+\\(\\w+\\)"
    2.12 +set-variable .fhook-euphoria.item-list-r1 "OvrProc \ecB\\1\ecA"
    2.13 +set-variable .fhook-euphoria.item-list-s2 "^\\s*override\\s+function\\s+\\(\\w+\\)"
    2.14 +set-variable .fhook-euphoria.item-list-r2 "OvrFunc \ecB\\1\ecA"
    2.15 +
    2.16 +; Global Proc/Func/Type
    2.17 +set-variable .fhook-euphoria.item-list-s3 "^\\s*global\\s+procedure\\s+\\(\\w+\\)"
    2.18 +set-variable .fhook-euphoria.item-list-r3 "GlbProc \ecB\\1\ecA"
    2.19 +set-variable .fhook-euphoria.item-list-s4 "^\\s*global\\s+function\\s+\\(\\w+\\)"
    2.20 +set-variable .fhook-euphoria.item-list-r4 "GlbFunc \ecB\\1\ecA"
    2.21 +set-variable .fhook-euphoria.item-list-s5 "^\\s*global\\s+type\\s+\\(\\w+\\)"
    2.22 +set-variable .fhook-euphoria.item-list-r5 "GlbType \ecB\\1\ecA"
    2.23 +
    2.24 +; Public Proc/Func/Type
    2.25 +set-variable .fhook-euphoria.item-list-s6 "^\\s*public\\s+procedure\\s+\\(\\w+\\)"
    2.26 +set-variable .fhook-euphoria.item-list-r6 "PubProc \ecB\\1\ecA"
    2.27 +set-variable .fhook-euphoria.item-list-s7 "^\\s*public\\s+function\\s+\\(\\w+\\)"
    2.28 +set-variable .fhook-euphoria.item-list-r7 "PubFunc \ecB\\1\ecA"
    2.29 +set-variable .fhook-euphoria.item-list-s8 "^\\s*public\\s+type\\s+\\(\\w+\\)"
    2.30 +set-variable .fhook-euphoria.item-list-r8 "PubType \ecB\\1\ecA"
    2.31 +
    2.32 +; Export Proc/Func/Type
    2.33 +set-variable .fhook-euphoria.item-list-s9 "^\\s*export\\s+procedure\\s+\\(\\w+\\)"
    2.34 +set-variable .fhook-euphoria.item-list-r9 "ExpProc \ecB\\1\ecA"
    2.35 +set-variable .fhook-euphoria.item-list-s10 "^\\s*export\\s+function\\s+\\(\\w+\\)"
    2.36 +set-variable .fhook-euphoria.item-list-r10 "ExpFunc \ecB\\1\ecA"
    2.37 +set-variable .fhook-euphoria.item-list-s11 "^\\s*export\\s+type\\s+\\(\\w+\\)"
    2.38 +set-variable .fhook-euphoria.item-list-r11 "ExpType \ecB\\1\ecA"
    2.39 +
    2.40 +; Local Proc/Func/Type
    2.41 +set-variable .fhook-euphoria.item-list-s12 "^\\s*procedure\\s+\\(\\w+\\)"
    2.42 +set-variable .fhook-euphoria.item-list-r12 "LclProc \ecB\\1\ecA"
    2.43 +set-variable .fhook-euphoria.item-list-s13 "^\\s*function\\s+\\(\\w+\\)"
    2.44 +set-variable .fhook-euphoria.item-list-r13 "LclFunc \ecB\\1\ecA"
    2.45 +set-variable .fhook-euphoria.item-list-s14 "^\\s*type\\s+\\(\\w+\\)"
    2.46 +set-variable .fhook-euphoria.item-list-r14 "LclType \ecB\\1\ecA"
    2.47 +
    2.48 +; Setup flags
    2.49 +set-variable .fhook-euphoria.setup-flags   "|l|v|"
    2.50 +set-variable .fhook-euphoria.setup-labels  "|EuDoc highlighting|Highlight bad strings|"
    2.51  
    2.52  !if &not &exist .hilight.euphoria
    2.53      set-variable .hilight.euphoria &pinc .hilight.next 1
    2.54 @@ -39,7 +79,6 @@
    2.55      hilight .hilight.euphoria  2 "--\\s*[Tt][Oo][Dd][Oo]".scheme.error
    2.56  
    2.57      hilight .hilight.euphoria 20 "/\\*" "*/" ""          .scheme.comment
    2.58 -    hilight .hilight.euphoria  2 "\"[^\"]*$"             .scheme.error
    2.59      hilight .hilight.euphoria  4 "\"" "\"" "\\"          .scheme.string
    2.60      hilight .hilight.euphoria  4 "'" "'" "\\"            .scheme.string
    2.61      hilight .hilight.euphoria  4 "`" "`" ""              .scheme.string
    2.62 @@ -47,6 +86,10 @@
    2.63      hilight .hilight.euphoria  4 "u\"" "\"" ""           .scheme.string
    2.64      hilight .hilight.euphoria  4 "U\"" "\"" ""           .scheme.string
    2.65      hilight .hilight.euphoria  4 "x\"" "\"" ""           .scheme.string
    2.66 +    
    2.67 +    !if &sin "v" .fhook-euphoria.setup
    2.68 +        hilight .hilight.euphoria  2 "\"[^\"]*$"             .scheme.error
    2.69 +    !endif
    2.70  
    2.71      hilight .hilight.euphoria 1 "export"                 .scheme.keyword
    2.72      hilight .hilight.euphoria 1 "public"                 .scheme.keyword
    2.73 @@ -125,26 +168,28 @@
    2.74      ; Allow Euphoria to be embedded in other languages
    2.75      set-variable .hilight.euscript .hilight.euphoria
    2.76      
    2.77 -    ; Highlight comments for eudoc
    2.78 -    !if &not .hilight.eudoc
    2.79 -        set-variable .hilight.eudoc &pinc .hilight.next 1
    2.80 +    !if &sin "l" .fhook-euphoria.setup
    2.81 +        ; Highlight comments for eudoc
    2.82 +        !if &not .hilight.eudoc
    2.83 +            set-variable .hilight.eudoc &pinc .hilight.next 1
    2.84 +        !endif
    2.85 +        
    2.86 +        ; Add a hook into the normal Euphoria highlighting. We jump
    2.87 +        ; into eudoc when we see an opening "--**".
    2.88 +        hilight .hilight.euphoria 0x80 "--\\*\\*\\*\\*$" .hilight.eudoc   .scheme.comment
    2.89 +        hilight .hilight.euphoria 0x80 "--\\*\\*$" .hilight.eudoc   .scheme.comment
    2.90 +        
    2.91 +        ; eudoc hilighting starts here
    2.92 +        0 hilight .hilight.eudoc 2 50                              .scheme.comment
    2.93 +        hilight .hilight.eudoc 2 "[A-Za-z0-9 ]+:$"                 .scheme.function
    2.94 +        hilight .hilight.eudoc 1 "\\[\\[:[^]]+\\]\\]"              .scheme.link
    2.95 +        hilight .hilight.eudoc 2 "-- =+ .*$"                       .scheme.keyword
    2.96 +        hilight .hilight.eudoc 0x44 "\\*\\*" "**" "\\*\\*" "**" "" .scheme.string
    2.97 +        hilight .hilight.eudoc 0x44 "//" "//" "//" "//" ""         .scheme.string
    2.98 +        hilight .hilight.eudoc 0x44 "\\#\\#" "##" "\\#\\#" "##" "" .scheme.string
    2.99 +        hilight .hilight.eudoc 0x44 "{{{" "{{{" "}}}" "}}}" ""     .scheme.string
   2.100 +        hilight .hilight.eudoc 0x80 "^[^-]" .hilight.euphoria      .scheme.comment
   2.101      !endif
   2.102 -    
   2.103 -    ; Add a hook into the normal Euphoria highlighting. We jump
   2.104 -    ; into eudoc when we see an opening "--**".
   2.105 -    hilight .hilight.euphoria 0x80 "--\\*\\*\\*\\*$" .hilight.eudoc   .scheme.comment
   2.106 -    hilight .hilight.euphoria 0x80 "--\\*\\*$" .hilight.eudoc   .scheme.comment
   2.107 -    
   2.108 -    ; eudoc hilighting starts here
   2.109 -    0 hilight .hilight.eudoc 2 50                              .scheme.comment
   2.110 -    hilight .hilight.eudoc 2 "[A-Za-z0-9 ]+:$"                 .scheme.function
   2.111 -    hilight .hilight.eudoc 1 "\\[\\[:[^]]+\\]\\]"              .scheme.link
   2.112 -    hilight .hilight.eudoc 2 "-- =+ .*$"                       .scheme.keyword
   2.113 -    hilight .hilight.eudoc 0x44 "\\*\\*" "**" "\\*\\*" "**" "" .scheme.string
   2.114 -    hilight .hilight.eudoc 0x44 "//" "//" "//" "//" ""         .scheme.string
   2.115 -    hilight .hilight.eudoc 0x44 "\\#\\#" "##" "\\#\\#" "##" "" .scheme.string
   2.116 -    hilight .hilight.eudoc 0x44 "{{{" "{{{" "}}}" "}}}" ""     .scheme.string
   2.117 -    hilight .hilight.eudoc 0x80 "^[^-]" .hilight.euphoria      .scheme.comment
   2.118  !endif
   2.119  
   2.120  !if &sin "d" .fhook-euphoria.setup
   2.121 @@ -202,7 +247,7 @@
   2.122  
   2.123      ; ignores
   2.124      indent .hilight.euphoria i "--"
   2.125 -    indent .hilight.euphoria e "/*" "*/" ""
   2.126 +    indent .hilight.euphoria e "/\\*" "\\*/" ""
   2.127      indent .hilight.euphoria e "\"" "\"" "\\"
   2.128      indent .hilight.euphoria e "\"\"\"" "\"\"\"" ""
   2.129      indent .hilight.euphoria e "`" "`" ""

SCM Home | OpenEuphoria.org Home