BSD 4_4 development
[unix-history] / usr / src / contrib / emacs-18.57 / lisp / modula2.elc
(defvar m2-mode-syntax-table nil "\
Syntax table in use in Modula-2-mode buffers.")
(defvar m2-compile-command "m2c" "\
Command to compile Modula-2 programs")
(defvar m2-link-command "m2l" "\
Command to link Modula-2 programs")
(defvar m2-link-name nil "\
Name of the executable.")
(if m2-mode-syntax-table nil (let ((table (make-syntax-table))) (modify-syntax-entry 92 "\\" table) (modify-syntax-entry 40 ". 1" table) (modify-syntax-entry 41 ". 4" table) (modify-syntax-entry 42 ". 23" table) (modify-syntax-entry 43 "." table) (modify-syntax-entry 45 "." table) (modify-syntax-entry 61 "." table) (modify-syntax-entry 37 "." table) (modify-syntax-entry 60 "." table) (modify-syntax-entry 62 "." table) (modify-syntax-entry 39 "\"" table) (setq m2-mode-syntax-table table)))
(defvar m2-mode-map nil "\
Keymap used in Modula-2 mode.")
(if m2-mode-map nil (let ((map (make-sparse-keymap))) (define-key map " " (quote m2-tab)) (define-key map "\ 3b" (quote m2-begin)) (define-key map "\ 3c" (quote m2-case)) (define-key map "\ 3d" (quote m2-definition)) (define-key map "\ 3e" (quote m2-else)) (define-key map "\ 3f" (quote m2-for)) (define-key map "\ 3h" (quote m2-header)) (define-key map "\ 3i" (quote m2-if)) (define-key map "\ 3m" (quote m2-module)) (define-key map "\ 3l" (quote m2-loop)) (define-key map "\ 3o" (quote m2-or)) (define-key map "\ 3p" (quote m2-procedure)) (define-key map "\ 3\17" (quote m2-with)) (define-key map "\ 3r" (quote m2-record)) (define-key map "\ 3s" (quote m2-stdio)) (define-key map "\ 3t" (quote m2-type)) (define-key map "\ 3u" (quote m2-until)) (define-key map "\ 3v" (quote m2-var)) (define-key map "\ 3w" (quote m2-while)) (define-key map "\ 3x" (quote m2-export)) (define-key map "\ 3y" (quote m2-import)) (define-key map "\ 3{" (quote m2-begin-comment)) (define-key map "\ 3}" (quote m2-end-comment)) (define-key map "\ 3\1a" (quote suspend-emacs)) (define-key map "\ 3\16" (quote m2-visit)) (define-key map "\ 3\14" (quote m2-toggle)) (define-key map "\ 3\f" (quote m2-link)) (define-key map "\ 3\ 3" (quote m2-compile)) (setq m2-mode-map map)))
(defvar m2-indent 5 "\
*This variable gives the indentation in Modula-2-Mode")
(defun modula-2-mode nil "\
This is a mode intended to support program development in Modula-2.
All control constructs of Modula-2 can be reached by typing
Control-C followed by the first character of the construct.
\\{m2-mode-map}
Control-c b begin Control-c c case
Control-c d definition Control-c e else
Control-c f for Control-c h header
Control-c i if Control-c m module
Control-c l loop Control-c o or
Control-c p procedure Control-c Control-w with
Control-c r record Control-c s stdio
Control-c t type Control-c u until
Control-c v var Control-c w while
Control-c x export Control-c y import
Control-c { begin-comment Control-c } end-comment
Control-c Control-z suspend-emacs Control-c Control-t toggle
Control-c Control-c compile Control-x ` next-error
Control-c Control-l 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." (interactive) (byte-code "Ñ\88Ò \88Ó\b!\88Ô\89\11\88Õ\89\12\88ÖÃ!\88×\89\13\88ÖÄ!\88Ø\89\14\88Ù !\88ÖÆ!\88Ú\ e\aP\89\16\ 6\88ÖÈ!\88\ e\ 6\89\16\b\88ÖÉ!\88Ê\89\16 \88ÖË!\88Ê\89\16\v\88ÖÌ!\88Û\89\16\f\88ÖÍ!\88Ü\89\16 \88ÖÃ!\88×\89\13\88ÖÎ!\88Ý\89\16\ e\88ÖÏ!\88Þ\89\16\ f\88ÖÐ!\88Ê\89\16\10\88ßà!\87" [m2-mode-map major-mode mode-name comment-column end-comment-column m2-mode-syntax-table paragraph-start page-delimiter paragraph-separate paragraph-ignore-fill-prefix t require-final-newline comment-start comment-end comment-start-skip comment-indent-hook parse-sexp-ignore-comments nil kill-all-local-variables use-local-map modula-2-mode "Modula-2" make-local-variable 41 75 set-syntax-table "^$\\|" "(* " " *)" "/\\*+ *" c-comment-indent run-hooks m2-mode-hook] 17))
(defun m2-newline nil "\
Insert a newline and indent following line like previous line." (interactive) (byte-code "Á\88Â \18Ã \88\bj)\87" [hpos nil current-indentation newline] 3))
(defun m2-tab nil "\
Indent to next tab stop." (interactive) (byte-code "Á\88ÂÃÄ \b\"T\b\"j\87" [m2-indent nil * / current-indentation] 5))
(defun m2-begin nil "\
Insert a BEGIN keyword and indent for the next line." (interactive) (byte-code "À\88Ác\88Â \88Ã \87" [nil "BEGIN" m2-newline m2-tab] 3))
(defun m2-case nil "\
Build skeleton CASE statment, prompting for the <expression>." (interactive) (byte-code "À\88ÁÂÃÄ!Å#\88Æ \88Æ \88Çc\88ÈÉ!\88Ê \87" [nil insert "CASE " read-string ": " " OF" m2-newline "END (* case *);" end-of-line 0 m2-tab] 7))
(defun m2-definition nil "\
Build skeleton DEFINITION MODULE, prompting for the <module name>." (interactive) (byte-code "Á\88Âc\88ÃÄ!\18Å\bÆ\bÇ$)\88ÈÉ!\87" [name nil "DEFINITION MODULE " read-string "Name: " insert ";
END " ".
" previous-line 3] 6))
(defun m2-else nil "\
Insert ELSE keyword and indent for next line." (interactive) (byte-code "Á\88Â \88Ã\bÁ\"\88Äc\88Â \88Å \87" [m2-indent nil m2-newline backward-delete-char-untabify "ELSE" m2-tab] 5))
(defun m2-for nil "\
Build skeleton FOR loop statment, prompting for the loop parameters." (interactive) (byte-code "Á\88ÂÃÄÅ!ÆÄÇ!$\88ÄÈ!\18É\bÊ\"?\85\1d