home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / mlepm.zip / mlepm.INF (.txt) < prev    next >
OS/2 Help File  |  1995-09-19  |  50KB  |  1,755 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Preface ΓòÉΓòÉΓòÉ
  3.  
  4.  (c) Martin Lafaix 1994, 1995. 
  5.  
  6.  This manual describes the features of MLEPM.  It is intended for the user who 
  7.  is new to MLEPM.  However, it is not meant to be a tutorial; it is assumed 
  8.  that the user has had some experience with EPM.  The information on how to use 
  9.  the package, therefore, is presented here in a reference or summary manner. 
  10.  Tables and lists summarize key functions and commands.  If you cannot find 
  11.  what you are looking for, refer to the index for cross referencing. 
  12.  
  13.  MLEPM is a set of macros.  Although a discussion of superficial tailoring is 
  14.  presented herein, the macro language (the E language) which allows the EPM's 
  15.  programmability is not discussed in this manual at all.  For information on 
  16.  the E language, users should refer to The EPM Editor Technical Reference. 
  17.  
  18.  Note:  EPM will be used as an abbreviation for the Enhanced Editor throughout 
  19.  this document. 
  20.  
  21.  
  22. ΓòÉΓòÉΓòÉ 1.1. Related Manuals ΓòÉΓòÉΓòÉ
  23.  
  24.  The following manual contains information related to the E editor: 
  25.  
  26.  o The Enhanced Editor User's Guide 
  27.  o The EPM Editor Technical Reference Manual 
  28.  o Rexx Information in OS/2 2.0 Information 
  29.  
  30.  
  31. ΓòÉΓòÉΓòÉ 1.2. Special Notice ΓòÉΓòÉΓòÉ
  32.  
  33. The term OS/2 is a trademark of the IBM Corporation. 
  34.  
  35. MLEPM is (c) Martin Lafaix 1994, 1995. 
  36.  
  37. Author: Martin Lafaix 
  38. Address: 
  39.  
  40.    16, rue de Dijon
  41.    06000 Nice
  42.    France
  43.  
  44.    email: lafaix@alto.unice.fr
  45.  
  46.  
  47. ΓòÉΓòÉΓòÉ 2. Release Notes ΓòÉΓòÉΓòÉ
  48.  
  49. This is the fourth public release of MLEPM (v0.034.000). 
  50.  
  51. It's a beta version. 
  52.  
  53. It contains the following improvements since v0.033.000: 
  54.  
  55.  o mpopupmenu revisited (for EPM v5.60+); 
  56.  o bug fix in MATCHKEY; 
  57.  o An enhanced HTML mode (can be used with EBOOKIE); 
  58.  o .userstring no longer used to store file language; 
  59.  o On-the-fly highlighting was broken with EPM v5.51a. 
  60.  
  61.  v0.033.000 added the following: 
  62.  
  63.  o Full EPM 6 support; 
  64.  o User-defined highlighting rules in C/C++ mode are now used; 
  65.  o Autosave mode works again when editing files with on-the-fly highlighting 
  66.    (see mautosave); 
  67.  o A new mmarkarea function, used to select area bounded by delimiters 
  68.    (strings, ...); 
  69.  o In C/C++ mode, Alt+1 over a #include directive loads the corresponding file. 
  70.  
  71.  
  72. ΓòÉΓòÉΓòÉ 3. Getting Started ΓòÉΓòÉΓòÉ
  73.  
  74. The following sections describe the basics of MLEPM: prerequisites, 
  75. installation and FAQ. 
  76.  
  77.  
  78. ΓòÉΓòÉΓòÉ 3.1. Prerequisite ΓòÉΓòÉΓòÉ
  79.  
  80. The included .EX files have been compiled for EPM v5.51a and EPM v6.00c.  EPM 
  81. v5.51a is the version included with Warp.  If you have an earlier version of 
  82. EPM, you may have to recompile the macros with the corresponding ETPM compiler, 
  83. but I highly recommend you to grab EPM v5.51a from, say, 
  84. software.watson.ibm.com:/pub/os2/ews (do not use the one in /pub/os2/os2fixes, 
  85. it's an older version!). 
  86.  
  87. If you have a newer version (such as v5.60 or v6), you may have to recompile 
  88. the macros with the corresponding ETPM compiler.  It will allowed you to use 
  89. Extended GREP, and things like that.  MLEPM has been tested with both EPM 
  90. v5.51a and EPM v6.00c.  Please use the EPM v5.60+ specific profile file 
  91. (profile.600), as it is tailored for theses versions. 
  92.  
  93.  
  94. ΓòÉΓòÉΓòÉ 3.2. Installation ΓòÉΓòÉΓòÉ
  95.  
  96.   1. Unpack this package. 
  97.  
  98.   2. Depending on you editor's version, either unpack ex.551 or ex.600 (or, if 
  99.      you're using a different version, use the MAKEMACS.CMD script to rebuild 
  100.      the macros for your editor -- ETPM is required for this step). 
  101.  
  102.   3. Copy all .ex files somewhere along your EPMPATH. 
  103.  
  104.   4. Put MPOPUP.EXE somewhere along your PATH.  Start MPOPUP.EXE (and put a 
  105.      Program Object referring to it in your startup folder) 
  106.  
  107.   5. Load epm and edit the styles.smp file.  Customize the included styles (via 
  108.      the "Style" dialog, Ctrl+Y), if needed. 
  109.  
  110.      [This step IS important!] 
  111.  
  112.   6. Enable the profile support, if not already done: 
  113.  
  114.      Bring up the "command" dialog (Ctrl+I), Enter the following command: 
  115.      PROFILE ON. Save your options (Options/Save options) 
  116.  
  117.   7. Merge profile.551 or profile.600 with your profile.erx (if you were not 
  118.      using a profile.erx, just rename profile.nnn to profile.erx, and put it 
  119.      somewhere along your EPMPATH). 
  120.  
  121.   8. Exit EPM, and restart it.  Try loading a new C file, and play with it... 
  122.  
  123.  That's all! 
  124.  
  125.  
  126. ΓòÉΓòÉΓòÉ 3.3. Common Q&A ΓòÉΓòÉΓòÉ
  127.  
  128. This section contains commonly asked questions on MLEPM. 
  129.  
  130.  What is MLEPM? 
  131.  
  132.            MLEPM provides hooks, popup menus, [auto]highlighting and "modes" 
  133.            for EPM. 
  134.  
  135.  Why MLEPM? 
  136.  
  137.            Well, that's a good question.  MLEPM is a set of macros I started to 
  138.            develop more than two years ago.  I did it to make EPM suits my 
  139.            needs/preferences.  Before using EPM, I was (and still am :-) used 
  140.            to Emacs.  But then, there was no correct implementation of Emacs 
  141.            for OS/2.  So, I decided to use EPM, and hence MLEPM... 
  142.  
  143.            Note:  MLEPM does NOT try to emulate Emacs look and feel/behavior 
  144.  
  145.  Is MLEPM loaded? 
  146.  
  147.            Use the mversion function.  If you get an error, well, MLEPM is not 
  148.            loaded.  Check in the message box (Option/Messages...): if it 
  149.            contains "Link :  file not found" messages, MLEPM's .EX files are 
  150.            probably not somewhere along your EPMPATH. 
  151.            If the message box contains "Link completed, module #...", are you 
  152.            sure you're loading all required .EX? 
  153.            If the message box does not contains one of the previous statement, 
  154.            it look like you're not loading MLEPM.  Is the profile support 
  155.            enabled? And, if yes, does a profile.erx exists somewhere along your 
  156.            EPMPATH?  And, if yes, is there any incorrect profile.erx earlier in 
  157.            the EPMPATH? 
  158.  
  159.  I'm loading an existing C file, and it's not highlighted! 
  160.  
  161.            MLEPM does not automatically highlights preexisting files.  Use the 
  162.            mhilite function (you just have to do that ONCE PER file). 
  163.  
  164.  It does not highlights my C/... file on the fly! 
  165.  
  166.            Is MPOPUP.EXE up and running?  If yes (that is, there's a MLPOPUP 
  167.            entry in the task list), is autohighlighting enabled? (Call the 
  168.            mautohilite command  --  if it says "AUTOHILITE : OFF", then enable 
  169.            it.) 
  170.  
  171.  Loading an highlighted file is slower than before! 
  172.  
  173.            Yes, indeed.  It takes a few seconds to rebuild highlightings from 
  174.            Extended Attributes. 
  175.  
  176.  MLEPM does not highlight keywords, constants, ... in my files! 
  177.  
  178.            It does not do that by default, mainly because I don't like it :-) 
  179.            Another thing to take in consideration: the more item you highlight, 
  180.            the longer it will take to highlight/load/save your files.  And, due 
  181.            to an EPM limitation, attributes can't exceed 64KB when saved. 
  182.  
  183.  I edited one of my files with another editor, and it looks like highlighting 
  184.  is out-of-synch for this file now... 
  185.  
  186.            Use the mrehilite function to re-synchonize highlighting. 
  187.  
  188.  I'm using EPM v5.60 or v6.  Is MLEPM of any use for me? 
  189.  
  190.            Yes, absolutely, MLEPM works great with EPM v5.60+.  Be sure to use 
  191.            the specific profile file, profile.600. 
  192.  
  193.            When used with such a version, MLEPM brings you improved editing 
  194.            modes, hooks, more powerful highlighting schemes (but it's 
  195.            definitely slower than native EPM v6 highlighting), and much more. 
  196.  
  197.            There's a major difference in the way MLEPM and EPM v6 handle 
  198.            highlighting.  EPM v6 is great for highlighting keywords and 
  199.            line-oriented files, and it is fast (less than 3 seconds to 
  200.            highlight stdctrl.e).  But it's not very powerful: multi-lines 
  201.            comments are not highlighted, and you can only use keywords (or a 
  202.            starting and an ending delimiter, if they are on the same line) -- 
  203.            you cannot use regular expressions.  On the opposite, MLEPM is 
  204.            slower (1 minute to highlight the same file -- but you just have to 
  205.            do it once), but multi-lines comments are handled just fine, and all 
  206.            functions definitions can be highlighted -- you can use regular 
  207.            expressions (and even the 'extended' regular expressions, introduced 
  208.            with EPM v5.60). 
  209.  
  210.            There's one feature of MLEPM which is completely superseded by EPM 
  211.            v6 : Popup menus.  They works fine, but EPM's implementation is 
  212.            simply better. 
  213.  
  214.  
  215. ΓòÉΓòÉΓòÉ 4. Basic Packages ΓòÉΓòÉΓòÉ
  216.  
  217. MLEPM is composed of three main package, MLHOOK, MLHILITE and MLTOOLS.  There's 
  218. a minor package, too: MATCHKEY. 
  219.  
  220.  
  221. ΓòÉΓòÉΓòÉ 4.1. MATCHKEY ΓòÉΓòÉΓòÉ
  222.  
  223.  This package mimics the Emacs parent matching.  Opening tokens ("(", "[" and 
  224.  "{") insert the matching one, too. 
  225.  
  226.  By "mimics", I mean, when you press a closing token key, it will temporarily 
  227.  highlight the matching token. 
  228.  
  229.  To use it, put MATCHKEY.EX somewhere along your EPMPATH, and insert the 
  230.  following statement in your profile.erx (you can issue the command via the 
  231.  "command" dialog (Ctrl+I), if you just want to try it): 
  232.  
  233.         link MATCHKEY
  234.  
  235.  Don't use it if you don't like it! :-) 
  236.  
  237.  This package is totally independent.  It's an adaptation of the original 
  238.  MATCHKEY, included in the EPM package. 
  239.  
  240.  
  241. ΓòÉΓòÉΓòÉ 4.2. MLHILITE ΓòÉΓòÉΓòÉ
  242.  
  243.  Preliminary notes 
  244.  
  245.  This package is designed to be used as an external module.  Put MLHILITE.EX 
  246.  somewhere along your EPMPATH, and insert the following statement in your 
  247.  profile.erx (you can issue the command, if you just want to try it): 
  248.  
  249.           link MLHILITE
  250.  
  251.  Autohighlighting requires MLHOOK to be loaded and MPOPUP.EXE to be up and 
  252.  running. 
  253.  
  254.  This package provides functions which allows you highlight/unhighlight a whole 
  255.  file, or only parts of it.  It also allows you to specify rules used to 
  256.  highlight a given language. 
  257.  
  258.  It provides the following functions: 
  259.  
  260.  o mautohilite 
  261.  o mhilite 
  262.  o mhiliteadd 
  263.  o mhiliteclr 
  264.  o mhilitedef 
  265.  o mpackhilite 
  266.  o mrehilite 
  267.  o munhilite 
  268.  o munhilitemark 
  269.  
  270.  And, it defines those two hook-functions: 
  271.  
  272.  o hilite_mode_hook 
  273.  o hilite_modify_hook 
  274.  
  275.  
  276. ΓòÉΓòÉΓòÉ 4.3. MLHOOK ΓòÉΓòÉΓòÉ
  277.  
  278.  Preliminary notes 
  279.  
  280.  This package is designed to be used as an external module.  Put MLHOOK.EX 
  281.  somewhere along your EPMPATH, and insert the following statement in your 
  282.  profile.erx (you can issue the command, if you just want to try it): 
  283.  
  284.           link MLHOOK
  285.  
  286.  This package provides hooks for main events; namely: 
  287.  
  288.  o fake_autosave 
  289.  o load_hook 
  290.  o modify_hook 
  291.  o save_hook 
  292.  o select_hook 
  293.  
  294.  And it defines the following functions, which allows you to use/define hooks: 
  295.  
  296.  o maddhook 
  297.  o mautosave 
  298.  o mcallhook 
  299.  o minitializehook 
  300.  o mrevcallhook 
  301.  o msethook 
  302.  o mversion 
  303.  
  304.  A hook is a place you can attach functions to.  It's generally associated with 
  305.  a specific event. 
  306.  
  307.  It allows you to do a special action whenever the event occurs. For example, 
  308.  if you want to adapt the menu bar to the current file, you can add a function 
  309.  on the select_hook hook. 
  310.  
  311.  
  312. ΓòÉΓòÉΓòÉ 4.4. MLTOOLS ΓòÉΓòÉΓòÉ
  313.  
  314.  Preliminary notes 
  315.  
  316.  This package is designed to be used as an external module.  Put MLTOOLS.EX 
  317.  somewhere along your EPMPATH, and insert the following statement in your 
  318.  profile.erx (you can issue the command, if you just want to try it): 
  319.  
  320.           link MLTOOLS
  321.  
  322.  This package mainly works on attributed (aka highlighted) files, so it's 
  323.  recommended that you use it with a highlighting-package (as MLHILITE).  If you 
  324.  want to use the mode hook, you have to link MLHOOK, too. 
  325.  
  326.  Popup menus require the MPOPUP.EXE program to be running. 
  327.  
  328.  It provides the following functions: 
  329.  
  330.  o mautoindent 
  331.  o mdebug 
  332.  o mfind 
  333.  o mfindfunction 
  334.  o mgo 
  335.  o mindentline 
  336.  o mloadattributes 
  337.  o mmarkarea 
  338.  o mnext 
  339.  o mnextfunction 
  340.  o mpopupmenu 
  341.  o mquicksave 
  342.  o msaveattributes 
  343.  o msetfilemode 
  344.  o msetstatusline 
  345.  o newtop 
  346.  
  347.  And, it defines this hook-function: 
  348.  
  349.  o show_mode_hook 
  350.  
  351.  Popup Menus 
  352.  
  353.  The popup menu feature is version-dependant.  If you are currently using EPM 
  354.  v5.51a (or earlier), it is not easily customizable, but it nonetheless allows 
  355.  you to use popup menus, and that's quite nice :-) 
  356.  
  357.  If you're using EPM v5.60 or higher, then, you can define mode-dependant 
  358.  and/or smart popup menus.  See mpopupmenu for more details. 
  359.  
  360.  If you're using EPM v5.51a, MLEPM defines five different popup menus: 
  361.  
  362.   1. The "char mark" popup; 
  363.   2. The "non-char mark" popup; 
  364.   3. The "outside mark" popup; 
  365.   4. The "no mark" popup; 
  366.   5. And the "EPM" popup. 
  367.  
  368.  The first popup is displayed when clicking inside a "char" mark. It contains 
  369.  the following options: 
  370.  
  371.   Unmark               Alt+U
  372.   Delete mark          Alt+D
  373.   Fill mark
  374.   Reflow mark
  375.   Uppercase selection  Ctrl+F3
  376.   Lowercase selection  Ctrl+F4
  377.   Sort
  378.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  379.   Copy                 Ctrl+Ins
  380.   Cut                  Shift+Del
  381.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  382.   Style...             Ctrl+Y
  383.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  384.   Proof
  385.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  386.   Print mark...
  387.  
  388.  The second popup is displayed when clicking inside a "non-char" mark, that is, 
  389.  a "block" or "line" mark.  It contains the following options: 
  390.  
  391.   Unmark               Alt+U
  392.   Delete mark          Alt+D
  393.   Fill mark
  394.   Reflow mark
  395.   Uppercase selection  Ctrl+F3
  396.   Lowercase selection  Ctrl+F4
  397.   Sort
  398.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  399.   Shift left 1         Ctrl+F7
  400.   Shift left 2
  401.   Shift left 3
  402.   Shift right 1        Ctrl+F8
  403.   Shift right 2
  404.   Shift right 3
  405.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  406.   Copy                 Ctrl+Ins
  407.   Cut                  Shift+Del
  408.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  409.   Style...             Ctrl+Y
  410.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  411.   Proof
  412.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  413.   Print mark...
  414.  
  415.  The third popup is displayed when clicking outside a mark.  That is, a mark 
  416.  exists, but you are "outside".  It contains the following options: 
  417.  
  418.   Copy mark
  419.   Move mark    Alt+M
  420.   Overlay mark
  421.   Adjust mark  Alt+A
  422.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  423.   Unmark       Alt+U
  424.  
  425.  This fourth popup is displayed when there's no mark in the current ring.  It 
  426.  contains the following options: 
  427.  
  428.   Mark word        Alt+W
  429.   Mark identifier  Ctrl+W
  430.   Find identifier
  431.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  432.   Uppercase word   Ctrl+F1
  433.   Lowercase word   Ctrl+F2
  434.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  435.   Center line      Shift+F5
  436.   Scroll to top
  437.  
  438.  The fifth (and last) popup is usually associated with the third mouse button 
  439.  (if any), and contains the following "generic" options: 
  440.  
  441.   Paste                 Shift+Ins
  442.   ~Import text file...
  443.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  444.   ~Save                 F2
  445.   ~Rename...            F7
  446.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  447.   ~Make
  448.   ~Build all
  449.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  450.   ~Print file...
  451.   Search...             Ctrl+S
  452.  
  453.  Note:  The "Make" and "Build all" options are not yet completed. 
  454.  
  455.  If you want to modify these popup menus, you'll have to edit mpopup.rc, and to 
  456.  rebuild MPOPUP's resources.  If you want to add an option, you may have to 
  457.  define a corresponding "accelerator", via the buildacceltable function. 
  458.  (Please, do not use accelerators values in range 9200..9299, as they may by 
  459.  used in upcoming versions of MLEPM.) 
  460.  
  461.  Highlighting-Related Functions 
  462.  
  463.  mfind, mfindfunction, mgo, mloadattributes, mnext, mnextfunction and 
  464.  msaveattributes. 
  465.  
  466.  Miscellaneous 
  467.  
  468.  mautoindent, mdebug, mindentline, mquicksave, mmarkarea msetfilemode, 
  469.  msetstatusline, newtop and show_mode_hook. 
  470.  
  471.  
  472. ΓòÉΓòÉΓòÉ 5. Editing Modes ΓòÉΓòÉΓòÉ
  473.  
  474.  MLEPM includes many editing modes, and you can easily add your own. 
  475.  
  476.  o cmode 
  477.  o emode 
  478.  o htmlmode 
  479.  o listmode 
  480.  o pmode 
  481.  o rcmode 
  482.  o rexxmode 
  483.  
  484.  
  485. ΓòÉΓòÉΓòÉ 5.1. The C/C++ Mode ΓòÉΓòÉΓòÉ
  486.  
  487. This mode could be used while editing C or C++ files.  It provides 
  488. autoindentation, autohighlighting, and autoexpansion.  It defines the following 
  489. functions: 
  490.  
  491.  o C_mode 
  492.  o c_load_hook 
  493.  o mhilite_C_mark 
  494.  o mcindentstyle 
  495.  o indent_C_line 
  496.  
  497.  It redefines the following key: 
  498.  
  499.  o Alt+1 
  500.  
  501.  Turning autoexpansion off (EXPAND OFF) does not turn autohighlighting off, but 
  502.  you'll lose the benefits of autoindentation. The standard EPM auto-expansion 
  503.  may appears annoying at first, but you can now tailor it with mcindentstyle, 
  504.  and it's easy to become 'addicted'... 
  505.  
  506.  By default, CMODE recognize the following extensions: 
  507.  
  508.         C H PH IH SQC CPP HPP CXX XH XPH XIH
  509.  
  510.  If you want to use CMODE while editing a file with another extension, you can 
  511.  use the C_mode function.  It will switch the current editing mode to be CMODE. 
  512.  
  513.  The Alt+1 combination allows you to edit a file specified in a #include 
  514.  directive: 
  515.  
  516.      #include "foo.h"
  517.      #include <os2.h>
  518.  
  519.  Pressing Alt+1 on the first line will search foo.h in the current directory, 
  520.  while pressing Alt+1 over the second will search os2.h along the INCLUDE 
  521.  environment variable. 
  522.  
  523.  
  524. ΓòÉΓòÉΓòÉ 5.2. The E Mode ΓòÉΓòÉΓòÉ
  525.  
  526. This mode could be used while editing E files.  It provides autoindentation and 
  527. autoexpansion.  It defines the following functions: 
  528.  
  529.  o E_mode 
  530.  o e_load_hook 
  531.  o indent_E_line 
  532.  
  533.  This editing mode does not specifies specific highlighting hints. If you want 
  534.  to use autohighlighting in E files, you'll have to use, for example, the 
  535.  MLHILITE package. 
  536.  
  537.  Turning autoexpansion off (EXPAND OFF) does turn autoindentation off, too. 
  538.  
  539.  By default, EMODE recognize the 'E' extension only.  If you want to use EMODE 
  540.  while editing a file with another extension, you can use the E_mode function. 
  541.  It will switch the current editing mode to be EMODE. 
  542.  
  543.  
  544. ΓòÉΓòÉΓòÉ 5.3. HTML Mode ΓòÉΓòÉΓòÉ
  545.  
  546. Not completed yet 
  547.  
  548. This mode adds HTML-specific functions.  It can be used in conjunction with 
  549. EBOOKIE (it's in fact recommended). 
  550.  
  551. It provides the following functions: 
  552.  
  553.  o HTML_mode 
  554.  o html_load_hook 
  555.  o html_style 
  556.  o html_tabify 
  557.  o mpopup_HTML_menu 
  558.  
  559.  This mode defines a contextual menu, which allows easy access to its 
  560.  functions. 
  561.  
  562.  By default, HTMLMODE recognize both 'HTM' and 'HTML' extensions.  If you want 
  563.  to use HTMLMODE while editing a file with another extension, you can use the 
  564.  HTML_mode function.  It will switch the current editing mode to be HTMLMODE. 
  565.  
  566.  There's currently only two function, html_style and html_tabify. 
  567.  
  568.  html_style is used to surround the current mark with a beginning an ending 
  569.  delimiter, derived from its parameter.  For example, 
  570.  
  571.     html_style STRONG
  572.  
  573.  adds <STRONG> and </STRONG> around the current mark (or it simply inserts it 
  574.  if there's no mark in the current file). 
  575.  
  576.  html_tabify converts a coma- and semicolon-delimited list into a HTML table. 
  577.  For example, if you have: 
  578.  
  579.   title1, title2, title3;
  580.   item11, ,item13;
  581.   item21;
  582.   ,item32
  583.  
  584.  It will be translated in: 
  585.  
  586.   <table border>
  587.   <tr><td>title1</td> <td>title2</td> <td>title3</td></tr>
  588.   <tr><td>item11</td> <td></td>       <td>item13</td></tr>
  589.   <tr><td>item21</td></tr>
  590.   <tr><td></td>       <td>item32</td></tr>
  591.   </table>
  592.  
  593.  [',' is the column delimiter and ';' is the row delimiter.] 
  594.  
  595.  
  596. ΓòÉΓòÉΓòÉ 5.4. The List Mode ΓòÉΓòÉΓòÉ
  597.  
  598. This mode could be used while browsing 'list' file (that is, files like 
  599. 00index.txt...).  It allows you to easily select one or more line.  It can 
  600. compute the total required size, and things like that... 
  601.  
  602. It redefines the following three keys: 
  603.  
  604.  Key       Definition 
  605.  Space     Toggle the current line state (selected or not).  It also updates 
  606.            the status line. 
  607.  U         Unselect all lines.  It also updates the status line. 
  608.  L         Popups a list containing all selected lines. 
  609.  
  610.  It defines the following two functions: 
  611.  
  612.  o List_mode 
  613.  o list_load_hook 
  614.  
  615.  By default, LISTMODE recognize the 'LIST' and '00INDEX.TXT' extensions.  If 
  616.  you want to use the LISTMODE while editing a file with another extension, you 
  617.  can use the List_mode function. It will switch editing mode to be LISTMODE. 
  618.  
  619.  LISTMODE modifies the status line to be: 
  620.  
  621.         Line %l of %s   nnn Items selected  [xxx bytes] List mode   %m
  622.  
  623.  This mode is not totally completed yet.  Namely, the item count and size is 
  624.  lost between sessions.  And, the size is the sum of the first number in all 
  625.  selected lines.  It would be great to allow it to be customizable. 
  626.  
  627.  
  628. ΓòÉΓòÉΓòÉ 5.5. The Pascal Mode ΓòÉΓòÉΓòÉ
  629.  
  630. This mode could be used while editing Pascal files.  It provides 
  631. autoindentation and autoexpansion.  It defines the following functions: 
  632.  
  633.  o Pascal_mode 
  634.  o p_load_hook 
  635.  
  636.  This editing mode does not specifies specific highlighting hints. If you want 
  637.  to use autohighlighting in Pascal files, you'll have to use, for example, the 
  638.  MLHILITE package. 
  639.  
  640.  Turning autoexpansion off (EXPAND OFF) does turn autoindentation off, too. 
  641.  
  642.  By default, PMODE recognize the 'PAS' and 'PASCAL' extension only. If you want 
  643.  to use PMODE while editing a file with another extension, you can use the 
  644.  Pascal_mode function.  It will switch the current editing mode to be PMODE. 
  645.  
  646.  
  647. ΓòÉΓòÉΓòÉ 5.6. The RC Mode ΓòÉΓòÉΓòÉ
  648.  
  649. This mode could be used while editing RC (i.e., resource script) file.  It 
  650. provides autoindentation, autoexpansion and optionally auto-capitalization of 
  651. keywords.  It defines the following functions: 
  652.  
  653.  o RC_mode 
  654.  o rc_load_hook 
  655.  o indent_RC_line 
  656.  
  657.  This editing mode does not specifies specific highlighting hints. If you want 
  658.  to use autohighlighting in resources files, you'll have to use, for example, 
  659.  the MLHILITE package. 
  660.  
  661.  Turning autoexpansion off (EXPAND OFF) does turn autoindentation off, too. 
  662.  
  663.  By default, RCMODE recognize the 'RC' and 'DLG' extension only.  If you want 
  664.  to use RCMODE while editing a file with another extension, you can use the 
  665.  RC_mode function.  It will switch the current editing mode to be RCMODE. 
  666.  
  667.  
  668. ΓòÉΓòÉΓòÉ 5.7. The REXX Mode ΓòÉΓòÉΓòÉ
  669.  
  670. This mode could be used while editing REXX scripts (i.e., command files).  It 
  671. provides autoindentation and autoexpansion. It defines the following functions: 
  672.  
  673.  o REXX_mode 
  674.  o rexx_load_hook 
  675.  o indent_REXX_line 
  676.  
  677.  This editing mode does not specify specific highlighting hints. If you want to 
  678.  use autohighlighting in resources files, you'll have to use, for example, the 
  679.  MLHILITE package. 
  680.  
  681.  Turning autoexpansion off (EXPAND OFF) does turn autoindentation off, too. 
  682.  
  683.  By default, REXXMODE recognize the following extensions: 
  684.  
  685.         BAT CMD EXC EXEC ERX XEDIT
  686.  
  687.  If you want to use REXXMODE while editing a file with another extension, you 
  688.  can use the REXX_mode function.  It will switch the current editing mode to be 
  689.  REXXMODE. 
  690.  
  691.  
  692. ΓòÉΓòÉΓòÉ 6. MLEPM Commands ΓòÉΓòÉΓòÉ
  693.  
  694. All functions names are prefixed with an "m", in order to prevent name-clash 
  695. with future (possible) EPM functions.  (We can't expect them to share the same 
  696. definition, can we? :-) 
  697.  
  698. Whenever a function has the string "hilite" in it, this string can be replaced 
  699. with "highlight".  And if a part of a function name is enclosed in 
  700. square-brackets, this part is optional.  So, the function 
  701.  
  702.         mhilite[file]
  703.  
  704. stands for 
  705.  
  706.         mhilite, mhighlight, mhilitefile and mhighlightfile
  707.  
  708. MLEPM adds the following commands: 
  709.  
  710. fake_autosave 
  711. hilite_load_hook 
  712. hilite_modify_hook 
  713. load_hook 
  714. maddhook 
  715. mautohilite 
  716. mautoindent 
  717. mautosave 
  718. mcallhook 
  719. mcindentstyle 
  720. mdebug 
  721. mfind 
  722. mfindfunction 
  723. mgo 
  724. mhilite[file] 
  725. mhiliteadd 
  726. mhiliteclr 
  727. mhilitedef 
  728. mindentline 
  729. minitializehook 
  730. mloadattributes 
  731. mmarkarea 
  732. mnext 
  733. mnextfunction 
  734. modify_hook 
  735. mpackhilite 
  736. mpopupmenu 
  737. mquicksave 
  738. mrehilite[file] 
  739. mrevcallhook 
  740. msaveattributes 
  741. msetfilemode 
  742. msethook 
  743. msetstatusline 
  744. munhilite[file] 
  745. munhilitemark 
  746. mversion 
  747. nextop 
  748. save_hook 
  749. select_hook 
  750. show_mode_hook 
  751.  
  752.  
  753. ΓòÉΓòÉΓòÉ 6.1. fake_autosave ΓòÉΓòÉΓòÉ
  754.  
  755. Syntax 
  756.  
  757.  fake_autosave 
  758.  
  759. This hook is used to replace EPM default autosave feature.  You have to use it 
  760. if you want to use on-the-fly highlighting with EPM v5.60+ (with EPM v5.51a, 
  761. you only have to use it if you want autosave with autohighlighting). 
  762.  
  763.         maddhook 'modify_hook 'fake_autosave
  764.  
  765. Package: MLHOOK 
  766.  
  767.  
  768. ΓòÉΓòÉΓòÉ 6.2. hilite_load_hook ΓòÉΓòÉΓòÉ
  769.  
  770. Syntax 
  771.  
  772.  hilite_load_hook 
  773.  
  774. This hook is used to find out a file's language.  Add this hook on load_hook: 
  775.  
  776.         maddhook load_hook hilite_load_hook
  777.  
  778. Package: MLHILITE 
  779.  
  780.  
  781. ΓòÉΓòÉΓòÉ 6.3. hilite_modify_hook ΓòÉΓòÉΓòÉ
  782.  
  783. Syntax 
  784.  
  785.  hilite_modify_hook 
  786.  
  787. This hook enables autohighlighting.  Add this hook on modify_hook: 
  788.  
  789.         maddhook modify_hook hilite_modify_hook
  790.  
  791. Package: MLHILITE 
  792.  
  793.  
  794. ΓòÉΓòÉΓòÉ 6.4. load_hook ΓòÉΓòÉΓòÉ
  795.  
  796. Syntax 
  797.  
  798.  load_hook 
  799.  
  800. This hook is called whenever a new file is loaded (or renamed). 
  801.  
  802. Package: MLHOOK 
  803.  
  804.  
  805. ΓòÉΓòÉΓòÉ 6.5. maddhook ΓòÉΓòÉΓòÉ
  806.  
  807. Syntax 
  808.  
  809.  maddhook hook function 
  810.  
  811. This function adds the function function to the hook function list.  Be 
  812. careful, hooks are case-sensitive. 
  813.  
  814. Example: 
  815.  
  816.         maddhook load_hook default_load
  817.  
  818. This example adds the default_load function to the load_hook function list. 
  819. The default_load function will be called whenever the load_hook will be called 
  820. (that is, whenever a file is loaded or named). 
  821.  
  822. Package: MLHOOK 
  823.  
  824.  
  825. ΓòÉΓòÉΓòÉ 6.6. mautohilite ΓòÉΓòÉΓòÉ
  826.  
  827. Syntax 
  828.  
  829.  mautohilite 
  830.  
  831. This command actives or deactivates autohighlighting.  The following parameters 
  832. are allowed:  on, off, 0, 1 or nothing. 
  833.  
  834. Examples: 
  835.  
  836.         mautohilite
  837.         mautohilite on
  838.  
  839. The first example shows the current state.  The second sets autohighlighting 
  840. mode on. 
  841.  
  842. Package: MLHILITE 
  843.  
  844.  
  845. ΓòÉΓòÉΓòÉ 6.7. mautoindent ΓòÉΓòÉΓòÉ
  846.  
  847. Syntax 
  848.  
  849.  mautoindent [|on|off] 
  850.  
  851. This command sets the indentation mode (on by default).  If no parameters are 
  852. given, it shows the current indentation state. Autoindentation is 
  853. mode-dependant. 
  854.  
  855. Package: MLTOOLS 
  856.  
  857.  
  858. ΓòÉΓòÉΓòÉ 6.8. mautosave ΓòÉΓòÉΓòÉ
  859.  
  860. Syntax 
  861.  
  862.  mautosave [#### | ON | OFF | ? | DIR] 
  863.  
  864. Use MAUTOSAVE to display or set the autosave values.  The parameters are: 
  865.  
  866.  [none]    Displays the current values on the message line, and places an 
  867.            MAUTOSAVE command in the command window where you can change it. 
  868.  ####      Sets the current autosave count to the specified number. 
  869.  ON        Sets the current autosave count to the default value. 
  870.  OFF       Sets the current autosave count to 0, turning off autosaves. 
  871.  ?         Displays the current values in a window, with a button you can 
  872.            select to list all files in the autosave directory. 
  873.  DIR       Lists all files in the autosave directory. 
  874.  
  875.  The autosave values displayed are the autosave count (after this many changes 
  876.  are made to the file, an automatic save is done to a temporary file) and the 
  877.  autosave file name (the file which is saved whenever the autosave count is 
  878.  reached).  The default autosave count is set through the Configure window. 
  879.  The autosave path is also set in the Configure window; the autosave file name 
  880.  is constructed from the autosave path, the current file name, and a unique 
  881.  3-digit extension. 
  882.  
  883.  You must issue this command from the Command window. 
  884.  
  885.  Note:  Use this function in place of EPM's autosave when dealing with 
  886.  automatically highlighted files. 
  887.  
  888.  Package:  MLHOOK 
  889.  
  890.  
  891. ΓòÉΓòÉΓòÉ 6.9. mcallhook ΓòÉΓòÉΓòÉ
  892.  
  893. Syntax 
  894.  
  895.  mcallhook hook 
  896.  
  897. This function calls every functions of the hook function list, in the 
  898. first-inserted, first-executed order.  You can use this function with your own 
  899. hooks.  This function is used for "entry" hooks. 
  900.  
  901. Package: MLHOOK 
  902.  
  903.  
  904. ΓòÉΓòÉΓòÉ 6.10. mcindentstyle ΓòÉΓòÉΓòÉ
  905.  
  906. Syntax 
  907.  
  908.  mcindentstyle n 
  909.  
  910. This command modifies the C-code indentation style.  Three styles are actually 
  911. recognized (-1 is the default): 
  912.  
  913.         1        int dummy(int a)        3        int dummy(int a)
  914.                  {                                {
  915.                    int b;                           int b;
  916.  
  917.                    if(a)                            if(a)
  918.                      {                              {
  919.                      b=a;                             b=a;
  920.                      }                              }
  921.                    else                             else
  922.                      b=a+1;                           b=a+1;
  923.                  }                                }
  924.  
  925.         2        int dummy(int a)
  926.                  {
  927.                    int b;
  928.  
  929.                    if(a) {
  930.                      b=a;
  931.                    }
  932.                    else
  933.                      b=a+1;
  934.                  }
  935.  
  936. If n is negative, braces will not be automatically added. 
  937.  
  938. Example: 
  939.  
  940.         mcindentstyle 2
  941.  
  942. The second indent style will be used (it does not "reflow" the previously 
  943. entered code.) 
  944.  
  945. Package: CMODE 
  946.  
  947.  
  948. ΓòÉΓòÉΓòÉ 6.11. mdebug ΓòÉΓòÉΓòÉ
  949.  
  950. Syntax 
  951.  
  952.  mdebug 
  953.  
  954. This function puts all MLEPM-related debug information in a temporary file 
  955. (.mlepm). 
  956.  
  957. Package: MLTOOLS 
  958.  
  959.  
  960. ΓòÉΓòÉΓòÉ 6.12. mfind ΓòÉΓòÉΓòÉ
  961.  
  962. Syntax 
  963.  
  964.  mfind start_fid dest_fid style 
  965.  
  966. This function copies the first line of items of style style , from start_fid to 
  967. dest_fid. 
  968.  
  969. Package: MLTOOLS 
  970.  
  971.  
  972. ΓòÉΓòÉΓòÉ 6.13. mfindfunction ΓòÉΓòÉΓòÉ
  973.  
  974. Syntax 
  975.  
  976.  mfindfunction 
  977.  
  978. This function pops up a listbox containing all functions defined in current 
  979. file, with option to jump to a specific function.  A function is something 
  980. which has the "Function" style.  If a function spans on more than one line, 
  981. only the first line is shown in the listbox. 
  982.  
  983. Package: MLTOOLS 
  984.  
  985.  
  986. ΓòÉΓòÉΓòÉ 6.14. mgo ΓòÉΓòÉΓòÉ
  987.  
  988. Syntax 
  989.  
  990.  mgo style string 
  991.  
  992. This function locates the specified string with the given style in current 
  993. file.  If the string is found, the cursor is moved.  Otherwise, nothing occurs. 
  994. string should be the beginning of the desired style.  mgo finds the first 
  995. matching string. 
  996.  
  997. Package: MLTOOLS 
  998.  
  999.  
  1000. ΓòÉΓòÉΓòÉ 6.15. mhilite[file] ΓòÉΓòÉΓòÉ
  1001.  
  1002. Syntax 
  1003.  
  1004.  mhilite[file] 
  1005.  
  1006. This command highlights the current file.  If the file's language has a 
  1007. specific highlight function, this function is used.  Otherwise, language's 
  1008. rules are used.  A specific highlight function is a function whose name follows 
  1009. the format: 
  1010.  
  1011.         'mhilite_'language'_mark'
  1012.  
  1013. Note:  The CMode package defines such a function, mlhilite_C_mark. 
  1014.  
  1015. Package: MLHILITE 
  1016.  
  1017.  
  1018. ΓòÉΓòÉΓòÉ 6.16. mhiliteadd ΓòÉΓòÉΓòÉ
  1019.  
  1020. Syntax 
  1021.  
  1022.  mhiliteadd language level style expr 
  1023.  
  1024. This command defines a new language rule.  If language has not be previously 
  1025. defined, an error occurs.  level is an integer (in range 1..4) which defines 
  1026. the "priority" of the rule.  Level 1 is the highest priority.  (See example 
  1027. below for more explanations on levels.)  style is any style defined in the 
  1028. "Style..." dialog box (reachable via the Edit menu).  Specifying an unknown 
  1029. style name is not an error -- but no style will be assigned to the matching 
  1030. expressions in files.  (Styles ARE case-sensitive.)  expr is a string which 
  1031. specifies the matching expressions. Its format is: 
  1032.  
  1033.         <delim>expr1<delim>[expr2<delim>]
  1034.  
  1035. where <delim> is any character, and expr1 a regular expression.  (If present, 
  1036. expr2 is a regexp, too.)  A matching expression is defined by expr1, or, if 
  1037. expr2 is present, included between expr1 and expr2. 
  1038.  
  1039. Examples: 
  1040.  
  1041.         mhiliteadd REXX 1 Commentaire _/\*_\*/_
  1042.         mhiliteadd REXX 4 Function ~^[a-zA-Z_][a-zA-Z0-9_]*:~
  1043.  
  1044. The first line defines a rule which matches a REXX comment.  The language is 
  1045. REXX, the level is 1, the style name is "Commentaire", and the expression is 
  1046. composed of a "_" delimiter, a first expression, "/\*" and a second one, "\*/". 
  1047. The first expression matches the REXX opening comment, and the second matches 
  1048. the closing comment token. Note the "\" character in front of "*", as both 
  1049. expressions are regular expressions. 
  1050.  
  1051. The second line defines a REXX label, that is, something which starts on column 
  1052. 1, composed of letters, digits or underscores, and immediately followed by ":". 
  1053. Note that the REXX label rule level is 4, too.  This means that, if a text 
  1054. matching the rule (A) is found inside a region of text which has already been 
  1055. matched by a rule (B) of a higher level, the rule (A) will not be applied on 
  1056. this matching occurrence.  While I realize it's not that clear :), let me try 
  1057. an example.  Suppose we have the following REXX fragment: 
  1058.  
  1059.         /* bla bla bla
  1060.         foo: ggffggf
  1061.         bar: 940401
  1062.         */
  1063.         baz:
  1064.  
  1065. The first rule matches the comment ("/* bla ...  */"), and the second matches 
  1066. "baz:".  It does not match "foo:" nor "bar:", as theses two expressions are in 
  1067. a region of text which as been recognized by our first rule (of a higher 
  1068. level). 
  1069.  
  1070. So, here is the golden rule on levels: 
  1071.  
  1072. "A rule of a level l does not apply to an expression if this expression is 
  1073. enclosed in an expression matched by a rule of a level m <= l." 
  1074.  
  1075. Note the "<="; It means that the rules' order is important in a given level. 
  1076. Rules are tried in a first-defined/first-tried order. 
  1077.  
  1078. Package: MLHILITE 
  1079.  
  1080.  
  1081. ΓòÉΓòÉΓòÉ 6.17. mhiliteclr ΓòÉΓòÉΓòÉ
  1082.  
  1083. Syntax 
  1084.  
  1085.  mhiliteclr language [level] 
  1086.  
  1087. This command erases rules defined for a specified language.  If language has 
  1088. not been previously defined, an error occurs. If level is given, only rules of 
  1089. level level will be removed; otherwise, ALL rules will be removed. 
  1090.  
  1091. Example: 
  1092.  
  1093.         mhiliteclr REXX 4
  1094.  
  1095. It will remove the "REXX label" rule (assuming we were using the previously 
  1096. defined samples statements.) 
  1097.  
  1098. Package: MLHILITE 
  1099.  
  1100.  
  1101. ΓòÉΓòÉΓòÉ 6.18. mhilitedef ΓòÉΓòÉΓòÉ
  1102.  
  1103. Syntax 
  1104.  
  1105.  mhilitedef language extensions 
  1106.  
  1107. This command defines a new language, or redefines an existing one. A file whose 
  1108. extension matches one in extensions will be handled with the rules defined for 
  1109. language.  If an extension is part of more than one language, the last defined 
  1110. language will win the race.  Extensions are case-insensitive. 
  1111.  
  1112. Example: 
  1113.  
  1114.         mhilitedef REXX CMD ERX
  1115.  
  1116. It defines the REXX language.  Files ending with ".cmd" or ".erx" will be 
  1117. recognized as "REXX" files. 
  1118.  
  1119. Package: MLHILITE 
  1120.  
  1121.  
  1122. ΓòÉΓòÉΓòÉ 6.19. mindentline ΓòÉΓòÉΓòÉ
  1123.  
  1124. Syntax 
  1125.  
  1126.  mindentline 
  1127.  
  1128. This function indents the current line.  It's mode dependant.  It can be 
  1129. assigned to a key; put the following in your profile if you want to assign it 
  1130. to the tab key: 
  1131.  
  1132.         buildaccel '*' 0 9 1236 mindentline
  1133.         activateaccel
  1134.  
  1135. Package: MLTOOLS 
  1136.  
  1137.  
  1138. ΓòÉΓòÉΓòÉ 6.20. minitializehook ΓòÉΓòÉΓòÉ
  1139.  
  1140. Syntax 
  1141.  
  1142.  minitializehook 
  1143.  
  1144. This function forces the load_hook to be executed.  It's required by the silly 
  1145. EPM profile.erx handling, as, when calling epm, command-line specified files 
  1146. are loaded before profile.erx is executed. 
  1147.  
  1148. Package: MLHOOK 
  1149.  
  1150.  
  1151. ΓòÉΓòÉΓòÉ 6.21. mloadattributes ΓòÉΓòÉΓòÉ
  1152.  
  1153. Syntax 
  1154.  
  1155.  mloadattributes [Not yet completed] 
  1156.  
  1157. This function loads current file attributes from its EAs.  It supports the new 
  1158. (compact) attribute format.  It can read attributes from an old EPM file, 
  1159. though... 
  1160.  
  1161. Package: MLTOOLS 
  1162.  
  1163.  
  1164. ΓòÉΓòÉΓòÉ 6.22. mmarkarea ΓòÉΓòÉΓòÉ
  1165.  
  1166. Syntax 
  1167.  
  1168.  mmarkarea [mouse] 
  1169.  
  1170. This function marks the current area/token.  If mouse is 1, then it uses 
  1171. current mouse position.  Otherwise, it uses current cursor position. 
  1172.  
  1173. If the current position is over a "balanceable" symbol, then the so delimited 
  1174. area is marked.  A balanceable symbol is one of: 
  1175.  
  1176.         ()[]{}'"
  1177.  
  1178. Otherwise, it acts like marktoken. 
  1179.  
  1180. Note:  This function is bound to Ctrl+W by default. 
  1181.  
  1182. Package: MLTOOLS 
  1183.  
  1184.  
  1185. ΓòÉΓòÉΓòÉ 6.23. mnext ΓòÉΓòÉΓòÉ
  1186.  
  1187. Syntax 
  1188.  
  1189.  mnext style [P] 
  1190.  
  1191. This function locates the next (or previous, if P is specified) item of style 
  1192. style.  If such an item is found, the cursor is moved.  Otherwise, nothing 
  1193. occurs. 
  1194.  
  1195. Package: MLTOOLS 
  1196.  
  1197.  
  1198. ΓòÉΓòÉΓòÉ 6.24. mnextfunction ΓòÉΓòÉΓòÉ
  1199.  
  1200. Syntax 
  1201.  
  1202.  mnextfunction [P] 
  1203.  
  1204. This function locates the next (or previous, if P is specified) function 
  1205. header.  If such a function is found, the cursor is moved. Otherwise, nothing 
  1206. occurs.  This function can be assigned to a key, allowing you quick movements 
  1207. in your files.  Put the following in your profile.erx if you want to assign 
  1208. "mnextfunction P" to Alt+up_arrow and "mnextfunction" to Alt+down_arrow: 
  1209.  
  1210.         buildaccel '*' 34 24 1234 mnextfunction
  1211.         buildaccel '*' 34 22 1235 mnextfunction P
  1212.         activateaccel
  1213.  
  1214. [34 stands for AF_VIRTUALKEY+AF_ALT, 24 is the down_arrow keycode, and 22 is 
  1215. the up_arrow keycode.  1234 and 1235 can be any numbers, but they have to be 
  1216. unique. 
  1217.  
  1218. Package: MLTOOLS 
  1219.  
  1220.  
  1221. ΓòÉΓòÉΓòÉ 6.25. modify_hook ΓòÉΓòÉΓòÉ
  1222.  
  1223. Syntax 
  1224.  
  1225.  modify_hook 
  1226.  
  1227. This hook is called whenever a file is modified. 
  1228.  
  1229. Package: MLHOOK 
  1230.  
  1231.  
  1232. ΓòÉΓòÉΓòÉ 6.26. mpackhilite ΓòÉΓòÉΓòÉ
  1233.  
  1234. Syntax 
  1235.  
  1236.  mpackhilite [Not yet completed] 
  1237.  
  1238. This command packs highlight-attributes, in order to save space and time while 
  1239. saving attributes. 
  1240.  
  1241. Package: MLHILITE 
  1242.  
  1243.  
  1244. ΓòÉΓòÉΓòÉ 6.27. mpopupmenu ΓòÉΓòÉΓòÉ
  1245.  
  1246. Syntax 
  1247.  
  1248.  mpopupmenu [menu] 
  1249.  
  1250. Due to a bug in EPM v6.00c, you cannot assign a user-defined action to MB2.  In 
  1251. fact, if you do a single clic with mouse button 2, EPM's default popup menu is 
  1252. always displayed.  If you want the user-defined action to take place, use a 
  1253. modifier (like Shift, Ctrl or Alt) or press the button a bit longer.  (This may 
  1254. have been corrected in newer version, I don't know.) 
  1255.  
  1256. This function popups a menu.  The popped up menu depends on the cursor location 
  1257. and the current editing mode. 
  1258.  
  1259. If the current editing mode defines a 
  1260.  
  1261.         'mpopup_'language'_menu'
  1262.  
  1263. function, then it is called and the corresponding popup menu is displayed.  If 
  1264. no such function has been defined, a default menu is used (who actually depends 
  1265. on the cursor position and selection state). 
  1266.  
  1267. Depending on your EPM version, the definition of mode dependant menu varies: 
  1268.  
  1269.  o If you're using EPM v5.51a (or earlier), you'll have to edit mpopup.rc, add 
  1270.    a new popup menu and rebuild MPOPUP's resources.  If you want to add an 
  1271.    option, you may have to define a corresponding "accelerator", via the 
  1272.    buildacceltable function.  (Please, do not use accelerators values in range 
  1273.    9200..9299, as they may by used in upcoming versions of MLEPM.) 
  1274.  
  1275.    The function must then call the mpopup function, with the menu ID as its 
  1276.    unique parameter.  For example: 
  1277.  
  1278.       defc mpopup_C_menu
  1279.       compile if EVERSION < 5.60
  1280.          'MH_gotoposition'
  1281.          call mpopup(1234)
  1282.       compile else
  1283.          -- ...
  1284.       compile endif
  1285.  
  1286.  o If you're using EPM v5.60 (or higher), then simply define a popup menu and 
  1287.    show it: 
  1288.  
  1289.       defc mpopup_C_menu
  1290.       compile if EVERSION < 5.60
  1291.          -- ...
  1292.       compile else
  1293.          universal activemenu, previouslyactivemenu
  1294.  
  1295.          if previouslyactivemenu = '' then
  1296.             previouslyactivemenu = activemenu
  1297.          endif
  1298.          menuname = 'popup1'
  1299.          activemenu = menuname
  1300.  
  1301.          deletemenu menuname, 0, 0, 0
  1302.          buildsubmenu  menuname, 80, '', '', 0 , 0
  1303.          'MH_gotoposition'
  1304.          ch = substr(textline(.line), .col, 1)
  1305.          gray_if_space = 16384*(ch=' ')
  1306.          buildmenuitem menuname, 80, 8000, 'Mark word'\9'Alt+W',      'MARKWORD', 0, mpfrom2short(HP_POPUP_MARKWORD, gray_if_space)
  1307.          buildmenuitem menuname, 80, 8001, 'Mark token'\9'CtrL+W',    'MARKTOKEN', 0, mpfrom2short(HP_POPUP_MARKTOKEN, gray_if_space)
  1308.          showmenu menuname,1
  1309.       compile endif
  1310.  
  1311.  If the menu parameter is used, it is passed to the mode-dependant function. 
  1312.  It allows you to use 3-buttons mouse, for example, with different menus for 
  1313.  each button. 
  1314.  
  1315.  Package: MLTOOLS 
  1316.  
  1317.  
  1318. ΓòÉΓòÉΓòÉ 6.28. mquicksave ΓòÉΓòÉΓòÉ
  1319.  
  1320. Syntax 
  1321.  
  1322.  mquicksave [|on|off] 
  1323.  
  1324. This command sets the quicksave mode (on by default).  When in quicksave mode, 
  1325. using the F2 key saves the file, but not its attributes. 
  1326.  
  1327. This is much faster than the standard save, so it can be use for intermediate 
  1328. saves (say, before compiling...). 
  1329.  
  1330. Note:  It does NOT reset the .modify counter -- this gives you the opportunity 
  1331. to save the file with its attributes later. 
  1332.  
  1333. Package: MLTOOLS 
  1334.  
  1335.  
  1336. ΓòÉΓòÉΓòÉ 6.29. mrehilite[file] ΓòÉΓòÉΓòÉ
  1337.  
  1338. Syntax 
  1339.  
  1340.  mrehilite[file] 
  1341.  
  1342. This command first unhighlights the file, and then rehighlights it.  It's just 
  1343. the same as issuing munhilite followed by mhilite. 
  1344.  
  1345. Package: MLHILITE 
  1346.  
  1347.  
  1348. ΓòÉΓòÉΓòÉ 6.30. mrevcallhook ΓòÉΓòÉΓòÉ
  1349.  
  1350. Syntax 
  1351.  
  1352.  mrevcallhook hook 
  1353.  
  1354. This function calls every functions of the hook function list, in the 
  1355. last-inserted, first-executed order.  You can use this function with your own 
  1356. hooks.  This function is used for "exit" hooks. 
  1357.  
  1358. Package: MLHOOK 
  1359.  
  1360.  
  1361. ΓòÉΓòÉΓòÉ 6.31. msaveattributes ΓòÉΓòÉΓòÉ
  1362.  
  1363. Syntax 
  1364.  
  1365.  msaveattributes [Not yet completed] 
  1366.  
  1367. This function save the current file attributes in its EAs.  They are saved in 
  1368. the new (compact) attribute format. 
  1369.  
  1370. Package: MLTOOLS 
  1371.  
  1372.  
  1373. ΓòÉΓòÉΓòÉ 6.32. msetfilemode ΓòÉΓòÉΓòÉ
  1374.  
  1375. Syntax 
  1376.  
  1377.  msetfilemode filemode 
  1378.  
  1379. This function sets the current file mode.  It can be any string (but a short 
  1380. one is recommended, though...).  The filemode will be shown on the statusline 
  1381. if this statusline contains "%t". 
  1382.  
  1383. Example: 
  1384.  
  1385.         msetfilemode 'C++ mode'
  1386.  
  1387. The current file mode will now be "C++ mode".  This string will appears in the 
  1388. statusline if it contains "%t".  (The show_mode_hook has to be in effect.) 
  1389.  
  1390. Package: MLTOOLS 
  1391.  
  1392.  
  1393. ΓòÉΓòÉΓòÉ 6.33. msethook ΓòÉΓòÉΓòÉ
  1394.  
  1395. Syntax 
  1396.  
  1397.  msethook hook function 
  1398.  
  1399. This function clears the hook function list, and sets function as the only 
  1400. member of the hook function list. Use this function with great care. 
  1401.  
  1402. Package: MLHOOK 
  1403.  
  1404.  
  1405. ΓòÉΓòÉΓòÉ 6.34. msetstatusline ΓòÉΓòÉΓòÉ
  1406.  
  1407. Syntax 
  1408.  
  1409.  msetstatusline newstatusline 
  1410.  
  1411. This function replaces the old setstatusline.  Same usage, same effects (it 
  1412. just remembers the actual statusline value). 
  1413.  
  1414. Package: MLTOOLS 
  1415.  
  1416.  
  1417. ΓòÉΓòÉΓòÉ 6.35. munhilite[file] ΓòÉΓòÉΓòÉ
  1418.  
  1419. Syntax 
  1420.  
  1421.  munhilite[file] 
  1422.  
  1423. This command unhighlights the current file.  That is, all attributes are 
  1424. removed from the file. 
  1425.  
  1426. Note:  It removes bookmarks, too. 
  1427.  
  1428. Package: MLHILITE 
  1429.  
  1430.  
  1431. ΓòÉΓòÉΓòÉ 6.36. munhilitemark ΓòÉΓòÉΓòÉ
  1432.  
  1433. Syntax 
  1434.  
  1435.  munhilitemark 
  1436.  
  1437. This command unhighlights the current mark.  That is, all attributes are 
  1438. removed from the mark. 
  1439.  
  1440. Package: MLHILITE 
  1441.  
  1442.  
  1443. ΓòÉΓòÉΓòÉ 6.37. mversion ΓòÉΓòÉΓòÉ
  1444.  
  1445. Syntax 
  1446.  
  1447.  mversion 
  1448.  
  1449. This command displays current MLEPM version. 
  1450.  
  1451. Package: MLHOOK 
  1452.  
  1453.  
  1454. ΓòÉΓòÉΓòÉ 6.38. nextop ΓòÉΓòÉΓòÉ
  1455.  
  1456. Syntax 
  1457.  
  1458.  newtop 
  1459.  
  1460. This function makes the current line the top-line.  It's used by a popupmenu 
  1461. option (Scroll to top). 
  1462.  
  1463. Package: MLTOOLS 
  1464.  
  1465.  
  1466. ΓòÉΓòÉΓòÉ 6.39. save_hook ΓòÉΓòÉΓòÉ
  1467.  
  1468. Syntax 
  1469.  
  1470.  save_hook [not yet implemented] 
  1471.  
  1472. Package: MLHOOK 
  1473.  
  1474.  
  1475. ΓòÉΓòÉΓòÉ 6.40. select_hook ΓòÉΓòÉΓòÉ
  1476.  
  1477. Syntax 
  1478.  
  1479.  select_hook 
  1480.  
  1481. This hook is called whenever a file is selected (that is, when a file becomes 
  1482. active). 
  1483.  
  1484. Package: MLHOOK 
  1485.  
  1486.  
  1487. ΓòÉΓòÉΓòÉ 6.41. show_mode_hook ΓòÉΓòÉΓòÉ
  1488.  
  1489. Syntax 
  1490.  
  1491.  show_mode_hook 
  1492.  
  1493. This hook is used to display the file mode in the statusline.  If you want to 
  1494. have the current file mode displayed in the status line, put the following in 
  1495. your profile.erx: 
  1496.  
  1497.         maddhook 'select_hook 'show_mode_hook
  1498.  
  1499. and define a new statusline, which contains '%t': 
  1500.  
  1501.         msetstatusline 'Line %l of %s  Column %c   %f   %i     %m %t'
  1502.  
  1503. If no file mode is defined, 'Text mode' will appear. 
  1504.  
  1505. [Using hooks requires a hook-package, eg MLHOOK, to be linked.] 
  1506.  
  1507. Package: MLTOOLS 
  1508.  
  1509.  
  1510. ΓòÉΓòÉΓòÉ 7. Changing the Default Configuration ΓòÉΓòÉΓòÉ
  1511.  
  1512. [Not yet completed...] 
  1513.  
  1514. If you want to change the default configuration, the first place to look at is 
  1515. your profile.erx file.  In it, you can [re]define many things, including all 
  1516. highlighting rules, key bindings, etc.  In fact, all functions described herein 
  1517. can be called from your profile. 
  1518.  
  1519. If you want to change some settings for a specific file (like the default tab 
  1520. width or margins, you can use the standard ADD_EA function to specify EPM.TABS 
  1521. and EPM.MARGINS values). 
  1522.  
  1523. But it's true you cannot always customize an editing mode the way you like 
  1524. (say, if you want a different indentation scheme, or ...). To do that, you have 
  1525. to edit the corresponding editing mode. 
  1526.  
  1527.  
  1528. ΓòÉΓòÉΓòÉ 8. Creating New Editing Modes ΓòÉΓòÉΓòÉ
  1529.  
  1530. [Not yet completed...] 
  1531.  
  1532. Editing modes are .EX files, loaded from profile.erx, so you have to have a 
  1533. minimum E knowledge, and, most importantly, an E compiler (ETPM). 
  1534.  
  1535. The easiest way to create a new editing mode is to copy and adapt an already 
  1536. existing editing mode (be lazy :-). 
  1537.  
  1538. MLEPM includes some editing modes, for mainstream languages: 
  1539.  
  1540. emode.e
  1541. pmode.e
  1542. rcmode.e
  1543. rexxmode.e
  1544. cmode.e
  1545. listmode.e
  1546.  
  1547. The first four modes are very simple to understand.  The fifth, CMODE, is more 
  1548. complex, as it defines an "highlighting hint", to help the highlighting process 
  1549. (it is used to highlight function headers, which are hard to find with regular 
  1550. expressions).  The last mode, LISTMODE, is somewhat different, in that it's not 
  1551. really an editing mode -- it's here to gives you ideas of what can be done. 
  1552.  
  1553. Editing modes basics 
  1554.  
  1555. The first question is "What's that, and what can be done?". The answer is that 
  1556. it's generally a key map and possibly a set of functions.  It can do many 
  1557. things, but it most commonly provides syntax expansion and automatic 
  1558. indentation.  It can also be used to define mode-dependant menus, or ... 
  1559.  
  1560. ... 
  1561.  
  1562.  
  1563. ΓòÉΓòÉΓòÉ 9. Key Definitions Summary ΓòÉΓòÉΓòÉ
  1564.  
  1565. MLEPM does not redefines many keys.  Anyway, here are the "Standard" keys 
  1566. [re]defined by MLTOOLS, profile.erx, C_Mode and MATCHKEY, respectively: 
  1567.  
  1568.  Key                 Definition 
  1569.  F2                  mquicksave 
  1570.                      This key allows you to quickly save a file, if mquicksave 
  1571.                      is enabled.  If not, the usual behavior occurs. 
  1572.  Ctrl+W              mmarkarea 
  1573.                      This key allows you to quickly mark a delimited 
  1574.                      token/area. 
  1575.  Alt+UpArrow         mnextfunction P 
  1576.                      This key allows you to go to the previous function header. 
  1577.                      If such a header does not exists, nothing occurs. 
  1578.  Alt+DownArrow       mnextfunction 
  1579.                      This key allows you to go to the next function header.  If 
  1580.                      such a header does not exists, nothing occurs. 
  1581.  Alt+1               This key allows you to edit the file named on current 
  1582.                      line.  When editing a C/C++ file, it understands the 
  1583.                      "#include" directive.  That is, if the current line is 
  1584.                      "#include <os2.h>" it will search os.h along the INCLUDE 
  1585.                      path, and if the current line is "#include "os2.h"", os2.h 
  1586.                      will be searched in the current directory. 
  1587.  (                   "()" 
  1588.  [                   "[]" 
  1589.  {                   "{}" 
  1590.                      This key is also redefined by CMODE. 
  1591.  ), ], }             These keys temporarily highlight the corresponding 
  1592.                      matching token. If the matching token is out of display, 
  1593.                      the containing line will be shown in the message area. 
  1594.                      And, if there's no matching token, "Matching token not 
  1595.                      found" is displayed instead. 
  1596.  
  1597.  
  1598. ΓòÉΓòÉΓòÉ 10. A Sample PROFILE.ERX ΓòÉΓòÉΓòÉ
  1599.  
  1600. This section describes a sample PROFILE.ERX.  Each section of the file is 
  1601. followed by an explanation.  (Refer to your version-dependant version, 
  1602. PROFILE.551 or PROFILE.600, for version-specific hints.) 
  1603.  
  1604. /* profile.erx                                               950918 */
  1605. /*                                                                  */
  1606. /* This file is executed whenever you start EPM                     */
  1607.  
  1608. /* defining useful constants                                        */
  1609. MYPATH = ''
  1610. MYACCEL = 9300
  1611.  
  1612. If, for any reason, you don't want to put MLEPM's .EX files somewhere along 
  1613. your EPMPATH, you can set MYPATH to the directory they reside in (don't forget 
  1614. the ending backslash, as in "d:\src\epm\emacros\"). 
  1615.  
  1616. MYACCEL is used below, when defining accelerators.  9300 is a good value, as it 
  1617. does not interfere with EPM's predefined values. 
  1618.  
  1619. /* Linking additional EPM modules                                   */
  1620. link MYPATH'MATCHKEY'
  1621. link MYPATH'MLHOOK'
  1622. link MYPATH'MLTOOLS'
  1623. link MYPATH'MLHILITE'
  1624. link MYPATH'CMODE'
  1625. link MYPATH'EMODE'
  1626. link MYPATH'REXXMODE'
  1627. link MYPATH'RCMODE'
  1628. /* link MYPATH'PMODE'  -- commented out as I don't use Pascal...    */
  1629. link bkeys
  1630.  
  1631. In the previous section, we link all needed files.  If you don't need a 
  1632. specific mode, just comment-out or remove the corresponding line.  bkeys is 
  1633. EBOOKIE, a great editing mode for "tagged" files (such as IPF).  It's available 
  1634. from software.watson.ibm.com in /pub/os2/epm/EBOOKE.ZIP. 
  1635.  
  1636. We don't have to link standard .EX (such as EPM.EX and EXTRA.EX); they're 
  1637. already loaded. 
  1638.  
  1639. /* C/C++ and highlighting Mode hook                                 */
  1640. msethook 'modify_hook 'hilite_modify_hook
  1641. maddhook 'load_hook   'hilite_load_hook
  1642. maddhook 'load_hook   'c_load_hook
  1643. maddhook 'load_hook   'e_load_hook
  1644. maddhook 'load_hook   'rexx_load_hook
  1645. maddhook 'load_hook   'rc_load_hook
  1646.  
  1647. The first hook enables on-the-fly highlighting (remember, MLPOPUP should be 
  1648. running for this to work).  The second hook enables generic mode recognition. 
  1649. The next four hooks enable specific mode recognition. 
  1650.  
  1651. /* I like mode in status line                 (here )              */
  1652. msetstatusline 'Line %l of %s  Column %c   %f   %i  %t     %m'
  1653. maddhook 'select_hook 'show_mode_hook
  1654.  
  1655. This section redefines the status line, and add mode name in it. You have to 
  1656. redefines the status line with the msetstatusline function if you want to 
  1657. display the mode name.  Do not use the setstatusline function. 
  1658.  
  1659. /* Defining global keys                                             */
  1660. buildaccel '*' 34 24 MYACCEL+1 mnextfunction
  1661. buildaccel '*' 34 22 MYACCEL+2 mnextfunction P
  1662. buildaccel '*' 34 23 MYACCEL-1 ml_hilite_line
  1663. activateaccel
  1664.  
  1665. The first two lines define nice shortcut keys (namely, Alt+UpArrow and 
  1666. Alt+DownArrow, which allows you to go to the preceding and following function, 
  1667. respectively). 
  1668.  
  1669. The third line is required if you want to use on-the-fly highlighting.  If you 
  1670. have redefined MYACCEL in the first section of this PROFILE, use 9299 instead 
  1671. of MYACCEL-1.  If you use another value, on-the-fly highlighting will NOT work. 
  1672.  
  1673. /* Adding a 'Headers...' item in the Search menu for mfindfunction  */
  1674. buildmenuitem 'default 3 2997 \0 4 0 mfindfunction'
  1675. buildmenuitem 'default 3 2998 Headings... 0 0 mfindfunction'
  1676. showmenu default
  1677.  
  1678. The first line adds a separator at the end of the "Search" menu. The second 
  1679. line adds a "Headings..." item next to it.  This item is associated with the 
  1680. mfindfunction function.  The last line activates the newly defined menu. 
  1681.  
  1682. /* Defining mouse bindings (popup menus)                            */
  1683. register_mouse 1 2 CLICK 0 mpopupmenu 0
  1684. register_mouse 1 3 CLICK 0 mpopupmenu 10
  1685.  
  1686. The first line defines the MB2 popup menu.  If you don't have a 3-key mouse, 
  1687. remove the second line, or change it so that it will assign the MB3 popup menu 
  1688. to, say, Shift+MB2, or whatever you like. (To do that, change the value which 
  1689. follows CLICK: it is 0 for no Shift, or the sum of any combination of 1 for the 
  1690. Shift key, 2 for the Ctrl key, and 4 for the Alt key.) 
  1691.  
  1692. /* Highlighting schemes                                             */
  1693.  
  1694. The following sections define highlighted sequences.  Feel free to tailor them, 
  1695. but keep in mind that more than five regexps can induce a long highlighting 
  1696. time... 
  1697.  
  1698. [Please note that the following examples are for EPM v5.51a only. EPM v5.60 and 
  1699. higher use extended regular expressions, so you have to backslash parents, 
  1700. etc.] 
  1701.  
  1702. /* C, C++ */
  1703. mhilitedef C 'C H PH IH SQC CPP HPP CXX XH XPH XIH'
  1704. mhiliteadd C 1 'Commentaire' '_/\*_\*/_'
  1705. mhiliteadd C 1 'Commentaire' '_//.*_'
  1706. mhiliteadd C 4 'Case' '_^[ \t]*case .*_'
  1707. mhiliteadd C 4 'Directive' '_#[ \t]*[^d].*_'
  1708.  
  1709. /* Standard ML */
  1710. mhilitedef ML 'SML'
  1711. mhiliteadd ML 1 'Commentaire' '_(\*_\*)_'
  1712.  
  1713. /* E macros */
  1714. mhilitedef E 'E'
  1715. mhiliteadd E 1 'Commentaire' '_/\*_\*/_'
  1716. mhiliteadd E 1 'Commentaire' '_--.*_'
  1717. mhiliteadd E 1 'Commentaire' '_^;.*_'
  1718. mhiliteadd E 4 'Function' '_^def.*_'
  1719. mhiliteadd E 4 'Directive' '_^[ \t]*compile.*_'
  1720.  
  1721. /* Rexx macros */
  1722. mhilitedef REXX 'CMD ERX'
  1723. mhiliteadd REXX 1 'Commentaire' '_/\*_\*/_'
  1724. mhiliteadd REXX 4 'Case' '_when.*then_'
  1725. mhiliteadd REXX 4 'Function' '~^[a-zA-Z_][a-zA-Z0-9_]*:~'
  1726.  
  1727. /* Scheme */
  1728. mhilitedef SCHEME 'SCM'
  1729. mhiliteadd SCHEME 1 'Commentaire' '_;.*_'
  1730. mhiliteadd SCHEME 4 'Function' '_(define (.*_'
  1731.  
  1732. /* IDL (SOM, ...) */
  1733. mhilitedef OIDL 'IDL CSC SC PSC CS2'
  1734. mhiliteadd OIDL 1 'Commentaire' '_/\*_\*/_'
  1735. mhiliteadd OIDL 1 'Commentaire' '_//.*_'
  1736. mhiliteadd OIDL 1 'Commentaire' '_--.*_'
  1737. mhiliteadd OIDL 1 'Commentaire' '_# .*_'
  1738. mhiliteadd OIDL 4 'Case' '~^[a-zA-Z].*:~'
  1739.  
  1740. /* DOS (SYS BAT) */
  1741. mhilitedef DOS 'SYS BAT'
  1742. mhiliteadd DOS 1 'Commentaire' '_^REM.*_'
  1743.  
  1744. /* IPF (IPF, IPP) */
  1745. mhilitedef IPF 'IPF IPP'
  1746. mhiliteadd IPF 1 'Commentaire' '_^\.\*.*_'
  1747. mhiliteadd IPF 4 'Function' '_^:h[0-3].*_'
  1748.  
  1749. /* Take ride of the silly (imho) EPM profile handling               */
  1750. minitializehook
  1751.  
  1752. 'sayerror Profile processed'
  1753.  
  1754. The minitializehook  statement is REQUIRED.  I mean it!  Do not remove it, or 
  1755. else MLEPM would not recognize pre-loaded files.