home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / mlepm.zip / mlepm.ipf < prev    next >
Text File  |  1995-09-19  |  60KB  |  1,591 lines

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