GNU Emacs support

CM Modula-3 comes with a mode for editing Modula-3 programs under gnuemacs. The work on the mode is in progress, here we present some documentation on the current snapshot. Here is a list of the key things this mode provides:

To have the Modula-3 mode automatically invoked when visiting a Modula-3 source file, you should put in your .emacs:

    (autoload 'modula-3-mode "modula3")
    (setq auto-mode-alist 
         (append '(("\\.ig$" . modula-3-mode)
                   ("\\.mg$" . modula-3-mode)
                   ("\\.i3$" . modula-3-mode)
                   ("\\.m3$" . modula-3-mode))
                   auto-mode-alist))    

It is also convenient to have the lines:

    (setq completion-ignored-extensions
       (append '(".mo" ".mx" ".mc" ".io" ".ix") completion-ignored-extensions))

so that you don't get the files with those extensions offered as possible completions.

Your system administrator may have inserted these lines in the default macro files for your system.

Tags

There is also a program to build tags file for Modula-3 programs: m3tags; see the manpage for the details. When the system is installed, a tag file for the public interfaces is built. To access it, you need in your .emacs (or in the system initialization file) the line:

    (visit-tags-table "LIB_USE/FTAGS")

where LIB_USE is the place where the Modula-3 libraries have been installed.