;;; compiled by eric@geech.gnu.ai.mit.edu on Mon Mar 22 13:41:03 1993
;;; from file /gd/gnu/emacs/19.0/lisp/modula2.el
;;; emacs version 19.0.506.
;;; bytecomp version FSF 2.08
;;; optimization is on.

(defvar m2-mode-syntax-table nil "\
Syntax table in use in Modula-2 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.")
(byte-code "L  \n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n)" [m2-mode-syntax-table make-syntax-table table modify-syntax-entry 92 "\\" 40 ". 1" 41 ". 4" 42 ". 23" 43 "." 45 61 37 60 62 39 "\""] 4)
(defvar m2-mode-map nil "\
Keymap used in Modula-2 mode.")
(byte-code "  \n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n)" [m2-mode-map make-sparse-keymap map define-key "	" m2-tab "b" m2-begin "c" m2-case "d" m2-definition "e" m2-else "f" m2-for "h" m2-header "i" m2-if "m" m2-module "l" m2-loop "o" m2-or "p" m2-procedure "" m2-with "r" m2-record "s" m2-stdio "t" m2-type "u" m2-until "v" m2-var "w" m2-while "x" m2-export "y" m2-import "{" m2-begin-comment "}" m2-end-comment "\n" m2-newline "" suspend-emacs "" m2-visit "" m2-toggle "" m2-link "" m2-compile] 4)
(defvar m2-indent 5 "\
*This variable gives the indentation in Modula-2-Mode")
(fset 'modula-2-mode #[nil " \n!!!\n!!P!!!!!!!!!!" [kill-all-local-variables use-local-map m2-mode-map modula-2-mode major-mode "Modula-2" mode-name make-local-variable comment-column 41 end-comment-column 75 set-syntax-table 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-function c-comment-indent parse-sexp-ignore-comments run-hooks m2-mode-hook] 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." nil])
(fset 'm2-newline #[nil "  	j)" [current-indentation hpos newline] 1 "\
Insert a newline and indent following line like previous line." nil])
(fset 'm2-tab #[nil " \"T\"j" [* / current-indentation m2-indent] 4 "\
Indent to next tab stop." nil])
(fset 'm2-begin #[nil "c  " ["BEGIN" m2-newline m2-tab] 1 "\
Insert a BEGIN keyword and indent for the next line." nil])
(fset 'm2-case #[nil "!c\ncc  c\ncc)! " [read-string "Case-Expression: " name "CASE " " OF" m2-newline "END (* case " " *);" end-of-line 0 m2-tab] 2 "\
Build skeleton CASE statment, prompting for the <expression>." nil])
(fset 'm2-definition #[nil "c!cccc)!" ["DEFINITION MODULE " read-string "Name: " name ";\n\n\n\nEND " ".\n" previous-line 3] 3 "\
Build skeleton DEFINITION MODULE, prompting for the <module name>." nil])
(fset 'm2-else #[nil " \n\"c  " [m2-newline backward-delete-char-untabify m2-indent nil "ELSE" m2-tab] 3 "\
Insert ELSE keyword and indent for next line." nil])
(fset 'm2-for #[nil "c!Écc!c!\"* ccc  ccccc+! " ["FOR " read-string "Loop Initialiser: " nil by limit name " TO " "Limit: " "Step: " string-equal "" " BY " " DO" m2-newline "END (* for " " to " " *);" end-of-line 0 m2-tab] 4 "\
Build skeleton FOR loop statment, prompting for the loop parameters." nil])
(fset 'm2-header #[nil "c!cc cc c  %cc" ["(*\n    Title: 	" read-string "Title: " "\n    Created:	" current-time-string "\n    Author: 	" user-full-name concat "\n		<" user-login-name "@" system-name ">\n" "*)\n\n"] 6 "\
Insert a comment block containing the module title, author, etc." nil])
(fset 'm2-if #[nil "c!cc  ccc)! " ["IF " read-string "<boolean-expression>: " thecondition " THEN" m2-newline "END (* if " " *);" end-of-line 0 m2-tab] 3 "\
Insert skeleton IF statment, prompting for <boolean-expression>." nil])
(fset 'm2-loop #[nil "c  c! " ["LOOP" m2-newline "END (* loop *);" end-of-line 0 m2-tab] 2 "\
Build skeleton LOOP (with END)." nil])
(fset 'm2-module #[nil "c!cccc!       ccc)   " ["IMPLEMENTATION MODULE " read-string "Name: " name ";\n\n\n\nEND " ".\n" previous-line 3 m2-header m2-type newline m2-var m2-begin m2-begin-comment " Module " " Initialisation Code " m2-end-comment m2-tab] 3 "\
Build skeleton IMPLEMENTATION MODULE, prompting for <module-name>." nil])
(byte-code "MMMMMMMMMMMMMMMMM" [m2-or #[nil " \n!c  " [m2-newline backward-delete-char-untabify m2-indent "|" m2-tab] 2 nil nil] m2-procedure #[nil "c!cc!cc!\"( ccc c  ccc! *" ["PROCEDURE " read-string "Name: " nil args name " (" "Arguments: " ")" "Result Type: " string-equal "" " : " ";" m2-newline "BEGIN" "END " end-of-line 0 m2-tab] 4 nil nil] m2-with #[nil "c!cc  ccc)! " ["WITH " read-string "Record-Type: " name " DO" m2-newline "END (* with " " *);" end-of-line 0 m2-tab] 3 nil nil] m2-record #[nil "c  c! " ["RECORD" m2-newline "END (* record *);" end-of-line 0 m2-tab] 2 nil nil] m2-stdio #[nil "c" ["\nFROM TextIO IMPORT \n   WriteCHAR, ReadCHAR, WriteINTEGER, ReadINTEGER,\n   WriteCARDINAL, ReadCARDINAL, WriteBOOLEAN, ReadBOOLEAN,\n   WriteREAL, ReadREAL, WriteBITSET, ReadBITSET,\n   WriteBasedCARDINAL, ReadBasedCARDINAL, WriteChars, ReadChars,\n   WriteString, ReadString, WhiteSpace, EndOfLine;\n\nFROM SysStreams IMPORT sysIn, sysOut, sysErr;\n\n"] 1 nil nil] m2-type #[nil "c  " ["TYPE" m2-newline m2-tab] 1 nil nil] m2-until #[nil "c  c!cc! " ["REPEAT" m2-newline "UNTIL " read-string "<boolean-expression>: " ";" end-of-line 0 m2-tab] 2 nil nil] m2-var #[nil " c  " [m2-newline "VAR" m2-tab] 1 nil nil] m2-while #[nil "c!cc  ccc)! " ["WHILE " read-string "<boolean-expression>: " name " DO" m2-newline "END (* while " " *);" end-of-line 0 m2-tab] 3 nil nil] m2-export #[nil "c" ["EXPORT QUALIFIED "] 1 nil nil] m2-import #[nil "c!cc" ["FROM " read-string "Module: " " IMPORT "] 2 nil nil] m2-begin-comment #[nil "n	 	\"c" [indent-to comment-column 0 "(*  "] 3 nil nil] m2-end-comment #[nil "n jc" [end-comment-column "*)"] 1 nil nil] m2-compile #[nil " 	Q!" [buffer-name modulename compile m2-compile-command " "] 4 nil nil] m2-link #[nil " \n \nQ!	\"Q!" [buffer-name modulename m2-link-name compile m2-link-command " " read-string "Name of executable: "] 6 nil nil] execute-monitor-command #[(command) "	!\"	ȉP&*" [shell-file-name shell equal file-name-nondirectory "csh" csh call-process nil t "-cf" "exec " command] 8] m2-visit #[nil "!!	P!ebˏ͏/ \n/ 	\")D !\nK \n!)K \nK \n!+" [nil modulename modfile deffile read-string "Module name: " switch-to-buffer "*Command Execution*" execute-monitor-command "m2whereis " (byte-code "!!!\"" [re-search-forward "\\(.*\\.def\\) *$" buffer-substring match-beginning 1 match-end deffile] 4) ((search-failed)) (byte-code "!!!\"" [re-search-forward "\\(.*\\.mod\\) *$" buffer-substring match-beginning 1 match-end modfile] 4) ((search-failed)) error "I can find neither definition nor implementation of %s" find-file] 3 nil nil]] 2)
(fset 'm2-toggle #[nil " O\"  OP! O\"*  OP! O\"?  OP! O\"S  OP!" [string-equal buffer-name -4 nil ".def" find-file-other-window 0 ".mod" -3 ".mi" ".md"] 4 "\
Toggle between .mod and .def files for the module." nil])
