Variable: m2-mode-hook
m2-mode-hook is a variable defined in modula2.el.gz.
Value
nil
Documentation
Hook run after entering Modula-2 mode.
No problems result if this variable is not bound.
add-hook automatically binds it. (This is true for all hook variables.)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/modula2.el.gz
;;;###autoload
(define-derived-mode m2-mode prog-mode "Modula-2"
"This is a mode intended to support program development in Modula-2.
All control constructs of Modula-2 can be reached by typing C-c
followed by the first character of the construct.
\\<m2-mode-map>
\\[m2-begin] begin \\[m2-case] case
\\[m2-definition] definition \\[m2-else] else
\\[m2-for] for \\[m2-header] header
\\[m2-if] if \\[m2-module] module
\\[m2-loop] loop \\[m2-or] or
\\[m2-procedure] procedure Control-c Control-w with
\\[m2-record] record \\[m2-stdio] stdio
\\[m2-type] type \\[m2-until] until
\\[m2-var] var \\[m2-while] while
\\[m2-export] export \\[m2-import] import
\\[m2-begin-comment] begin-comment \\[m2-end-comment] end-comment
\\[suspend-emacs] suspend Emacs \\[m2-toggle] toggle
\\[m2-compile] compile \\[m2-next-error] next-error
\\[m2-link] link
`m2-indent' controls the number of spaces for each indentation.
`m2-compile-command' holds the command to compile a Modula-2 program.
`m2-link-command' holds the command to link a Modula-2 program."
(setq-local paragraph-start (concat "$\\|" page-delimiter))
(setq-local paragraph-separate paragraph-start)
(setq-local paragraph-ignore-fill-prefix t)
(setq-local comment-start "(* ")
(setq-local comment-end " *)")
(setq-local comment-start-skip "\\(?:(\\*+\\|//+\\) *")
(setq-local parse-sexp-ignore-comments t)
(setq-local font-lock-defaults
'((m3-font-lock-keywords
m3-font-lock-keywords-1 m3-font-lock-keywords-2)
nil nil ((?_ . "w") (?. . "w") (?< . ". 1") (?> . ". 4")) nil
))
(smie-setup m2-smie-grammar #'m2-smie-rules
:forward-token #'m2-smie-forward-token
:backward-token #'m2-smie-backward-token))