/* profile.erx                                               940427 */
/*                                                                  */
/* This file is executed whenever you start EPM                     */

/* defining useful constants                                        */
MYACCEL = 9300

/* Linking additional EPM modules                                   */
link 'MATCHKEY'
link 'MLHOOK'
link 'MLTOOLS'
link 'MLHILITE'
link 'CMODE'
link 'EMODE'
link 'REXXMODE'
link 'RCMODE'
/* link MYPATH'PMODE'  -- commented out as I don't use Pascal...    */
/* link bkeys          -- uncomment this line if you use ebookie    */

/* Initializing Modes and hiliting hook                             */
msethook 'modify_hook 'hilite_modify_hook
maddhook 'load_hook   'hilite_load_hook
maddhook 'load_hook   'c_load_hook
maddhook 'load_hook   'e_load_hook
maddhook 'load_hook   'rexx_load_hook
maddhook 'load_hook   'rc_load_hook

/* I like mode in status line                 (here )              */
msetstatusline 'Line %l of %s  Column %c   %f   %i  %t     %m'
maddhook 'select_hook 'show_mode_hook

/* Defining global keys                                             */
buildaccel '*' 34 24 MYACCEL+1 mnextfunction    /* Alt+Down         */
buildaccel '*' 34 22 MYACCEL+2 mnextfunction P  /* Alt+Up           */
/* Do not modify the 9299 constant below!                           */
buildaccel '*' 34 23 9299 ml_hilite_line
activateaccel

/* Defining mouse bindings (popup menus)                            */
register_mouse 1 2 CLICK 0 mpopupmenu 0
register_mouse 1 3 CLICK 0 mpopupmenu 10

/* Hiliting schemes                                                 */

/* C, C++ */
mhilitedef C 'C H PH IH SQC CPP HPP CXX XH XPH XIH'
mhiliteadd C 1 'Commentaire' '_/\*_\*/_'
mhiliteadd C 1 'Commentaire' '_//.*_'
mhiliteadd C 4 'Case' '_^[ \t]*case .*_'
mhiliteadd C 4 'Directive' '_#[ \t]*[^d].*_'

/* Standard ML */
mhilitedef ML 'SML'
mhiliteadd ML 1 'Commentaire' '_(\*_\*)_'

/* E macros */
mhilitedef E 'E'
mhiliteadd E 1 'Commentaire' '_/\*_\*/_'
mhiliteadd E 1 'Commentaire' '_--.*_'
mhiliteadd E 1 'Commentaire' '_^;.*_'
mhiliteadd E 4 'Function' '_^def.*_'
mhiliteadd E 4 'Directive' '_^[ \t]*compile.*_'

/* Rexx macros */
mhilitedef REXX 'CMD ERX'
mhiliteadd REXX 1 'Commentaire' '_/\*_\*/_'
mhiliteadd REXX 4 'Case' '_when.*then_'  
mhiliteadd REXX 4 'Function' '~^[a-zA-Z_][a-zA-Z0-9_]*:~'

/* Scheme */
mhilitedef SCHEME 'SCM'
mhiliteadd SCHEME 1 'Commentaire' '_;.*_'
mhiliteadd SCHEME 4 'Function' '_(define (.*_'

/* IDL (SOM, ...) */
mhilitedef OIDL 'IDL CSC SC PSC CS2'
mhiliteadd OIDL 1 'Commentaire' '_/\*_\*/_'
mhiliteadd OIDL 1 'Commentaire' '_//.*_'
mhiliteadd OIDL 1 'Commentaire' '_--.*_'
mhiliteadd OIDL 1 'Commentaire' '_# .*_'
mhiliteadd OIDL 4 'Case' '~^[a-zA-Z].*:~'

/* DOS (SYS BAT) */
mhilitedef DOS 'SYS BAT'
mhiliteadd DOS 1 'Commentaire' '_^REM.*_'

/* Take ride of the silly (imho) EPM profile handling               */
minitializehook
