editors

changeset 20:be2c0145db9e

Added Euphoria utility menu along with a function/menu entry to test the syntax of the current file.
author Jeremy Cowgar <jeremy@cowgar.com>
date Tue Nov 02 17:33:25 2010 +0000 (2010-11-02)
parents 8b6558dc0fa5
children 612066ca4071
files microemacs/hkeuphoria.emf
line diff
     1.1 --- a/microemacs/hkeuphoria.emf	Tue Nov 02 17:01:19 2010 +0000
     1.2 +++ b/microemacs/hkeuphoria.emf	Tue Nov 02 17:33:25 2010 +0000
     1.3 @@ -20,6 +20,12 @@
     1.4  set-variable .fhook-euphoria.comment-1 "|/*| */|*| * | * |fr|"
     1.5  set-variable .fhook-euphoria.indent-width 4
     1.6  
     1.7 +set-variable .fhook-euphoria.command-flag  "|th|th|"
     1.8 +set-variable .fhook-euphoria.command-name  "||euphoria-test|"
     1.9 +set-variable .fhook-euphoria.command-nbind "|||"
    1.10 +set-variable .fhook-euphoria.command-kbind "|||"
    1.11 +set-variable .fhook-euphoria.command-desc  "||Syntax Check|"
    1.12 +
    1.13  ; Setup collapse
    1.14  set-variable .fhook-euphoria.collapse-open "^\\s*\\(override\\|global\\|public\\|export\\)?\\s*\\(function\\|procedure\\|type\\)\\s+\\(\\w+\\)"
    1.15  set-variable .fhook-euphoria.collapse-close "^\\s*end\\s+\\(function\\|procedure\\|type\\)"
    1.16 @@ -256,4 +262,33 @@
    1.17      set-variable .indent.euscript .hilight.euphoria
    1.18  !endif
    1.19  
    1.20 +define-macro euphoria-test
    1.21 +    set-variable #l0 $buffer-bname
    1.22 +    !force 0 find-buffer "*eusyntest*"
    1.23 +    !if $status
    1.24 +        find-buffer #l0
    1.25 +        popup-window  "*eusyntest*"
    1.26 +        !if &bmod "pipe"
    1.27 +            !return
    1.28 +        !endif
    1.29 +        screen-update
    1.30 +    !endif
    1.31 +    ;!if &not &band @# 2
    1.32 +    ;    set-variable #l0 @ml01 "eui -test - script file"
    1.33 +    !if &seq $buffer-fname ""
    1.34 +        ml-write "[Current buffer has no file name]"
    1.35 +        !abort
    1.36 +    !else
    1.37 +        set-variable #l0 $buffer-fname
    1.38 +    !endif
    1.39 +    !if &band $system 0x100
    1.40 +        12 ipipe-shell-command &spr "eui -test %s %s" #l0 "*eusyntest*"
    1.41 +    !else
    1.42 +        0 ipipe-shell-command &spr "eui -test %s" #l0 "*eusyntest*"
    1.43 +    !endif
    1.44 +    popup-window "*eusyntest*"
    1.45 +    fhook-ipipe
    1.46 +    global-bind-key eusyntest-add-breakpoint "f9"
    1.47 +!emacro
    1.48 +
    1.49  buffer-init-fhook "euphoria"

SCM Home | OpenEuphoria.org Home