home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / m2emacs.zip / modula2_el.doc next >
Lisp/Scheme  |  1998-07-18  |  3KB  |  80 lines

  1. Modula2.el is a Modula-2 editing support package
  2.  
  3.  
  4. Authors: Michael Schmidt <michael@pbinfo.UUCP> 
  5.          Tom Perrine     <Perrin@LOGICON.ARPA>
  6.          Egor Ziryanov   <ego@iis.nsk.su>
  7.  
  8. The authors distributed this without a copyright notice
  9. back in 1988, so it is in the public domain.  The original included
  10. the following credit:
  11.  
  12. Author Mick Jordan
  13. amended Peter Robinson
  14.  
  15.  
  16. Commentary:
  17.  
  18. A major mode for editing Modula-2 code.  It provides convenient abbrevs
  19. for Modula-2 keywords, knows about the standard layout rules, makes syntax
  20. highlighting, fine indentation and supports a native compile command.
  21.  
  22.  
  23. How to install it into ~/.emacs:
  24.  
  25. (or (assoc "\\.ob2$" auto-mode-alist)                                     
  26.     (setq auto-mode-alist (cons '("\\.ob2$" . modula-2-mode)
  27.                 auto-mode-alist)))                           
  28.  
  29. (or (assoc "\\.mod$" auto-mode-alist)                                     
  30.     (setq auto-mode-alist (cons '("\\.mod$" . modula-2-mode)
  31.                 auto-mode-alist)))
  32.  
  33. (or (assoc "\\.def$" auto-mode-alist)                                     
  34.     (setq auto-mode-alist (cons '("\\.def$" . modula-2-mode)
  35.                 auto-mode-alist)))                           
  36.  
  37. To automaticaly fontify, syncroneously Modula-2 file loading you
  38. have to add following into ~/.emacs
  39.  
  40. (defun m2-mode-fontify-hook () "set Modula2 font lock and fontify buffer"
  41.   (interactive)
  42.   (font-lock-mode)
  43.   (font-lock-fontify-buffer)
  44.   (define-key m2-mode-map [delete] 'delete-char)
  45.   (define-key m2-mode-map [return] 'newline-and-indent))
  46.  
  47. (add-hook 'm2-mode-hook  'm2-mode-fontify-hook)
  48.  
  49.  
  50. Keymap used in Modula-2 mode:
  51.  
  52. Ctrl-C b - Insert a BEGIN keyword and indent for the next line.
  53. Ctrl-C c - Build skeleton CASE statment, prompting for the <expression>.
  54. Ctrl-C d - Build skeleton DEFINITION MODULE, prompting for the <module name>.
  55. Ctrl-C e - Insert ELSE keyword and indent for next line.
  56. Ctrl-C f - Build skeleton FOR loop statment, prompting for the loop parameters.
  57. Ctrl-C h - Insert a comment block containing the module title, author, etc.
  58. Ctrl-C i - Insert skeleton IF statment, prompting for <boolean-expression>.
  59. Ctrl-C l - Build skeleton LOOP (with END).
  60. Ctrl-C m - Build skeleton IMPLEMENTATION MODULE, prompting for <module-name>.
  61. Ctrl-C o - Insert OR operand and indent line.
  62. Ctrl-C p - Build skeleton PROCEDURE, prompting <arguments> and <result-type>.
  63. Ctrl-C r - Build skeleton RECORD (with END), prompting <record-name>.
  64. Ctrl-C t - Insert TYPE statement and indent for next line.
  65. Ctrl-C u - Build skeleton REPEAT - UNTIL, prompting <boolean-experession>.
  66. Ctrl-C v - Insert VAR statement and indent for next line.
  67. Ctrl-C w - Build skeleton WHILE (with END), prompting <boolean-experession>.
  68. Ctrl-C x - Insert EXPORT QUALIFIED statements.
  69. Ctrl-C y - Insert FROM IMPORT skeleton, prompting <module-name>.
  70. Ctrl-C { - Insert the beginning of the comments.
  71. Ctrl-C } - Insert the ending of the comments.
  72. Ctrl-C Ctrl-W - Build skeleton WITH (with END), prompting <record-type>.
  73. Ctrl-C Ctrl-Z - Suspend emacs (bail out to shell) under X no sense.
  74. Ctrl-C Ctrl-V - Make a visit to prompting module using redirections (require
  75.                 m2whereis program for redirection search).
  76. Ctrl-C Ctrl-T - Toggle between .mod and .def files for the module.
  77. Ctrl-C Ctrl-B - Build a project by prompting name.
  78. Ctrl-C Ctrl-C - Compile a module.
  79.  
  80.