;ELC   
;;; Compiled by rms@psilocin.gnu.org on Sun Mar  8 19:07:03 1998
;;; from file /gd/gnu/emacs/lisp/progmodes/modula2.el
;;; in Emacs version 20.2.89.6
;;; with bytecomp version 2.38
;;; with all optimizations.
;;; This file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`modula2.el' was compiled for Emacs 19.29 or later"))


(custom-declare-group 'modula2 nil "Major mode for editing Modula-2 code." :prefix "m2-" :group 'languages)
#@42 Syntax table in use in Modula-2 buffers.
(defvar m2-mode-syntax-table nil (#$ . 647))
#@39 Command to compile Modula-2 programs.
(custom-declare-variable 'm2-compile-command '"m2c" '(#$ . 739) :type 'string :group 'modula2)
#@36 Command to link Modula-2 programs.
(custom-declare-variable 'm2-link-command '"m2l" '(#$ . 878) :type 'string :group 'modula2)
#@34 Name of the Modula-2 executable.
(custom-declare-variable 'm2-link-name 'nil '(#$ . 1011) :type '(choice (const nil) string) :group 'modula2)
#@57 *Column for aligning the end of a comment, in Modula-2.
(custom-declare-variable 'm2-end-comment-column '75 '(#$ . -1159) :type 'integer :group 'modula2)
(byte-code "\204L \302 \303\304\305	#\210\303\306\307	#\210\303\310\311	#\210\303\312\313	#\210\303\314\315	#\210\303\316\315	#\210\303\317\315	#\210\303\320\315	#\210\303\321\315	#\210\303\322\315	#\210\303\323\324	#\210	)\302\207" [m2-mode-syntax-table table make-syntax-table modify-syntax-entry 92 "\\" 40 ". 1" 41 ". 4" 42 ". 23" 43 "." 45 61 37 60 62 39 "\""] 4)
#@31 Keymap used in Modula-2 mode.
(defvar m2-mode-map nil (#$ . 1691))
(byte-code "\204\270 \302 \303	\304\305#\210\303	\306\307#\210\303	\310\311#\210\303	\312\313#\210\303	\314\315#\210\303	\316\317#\210\303	\320\321#\210\303	\322\323#\210\303	\324\325#\210\303	\326\327#\210\303	\330\331#\210\303	\332\333#\210\303	\334\335#\210\303	\336\337#\210\303	\340\341#\210\303	\342\343#\210\303	\344\345#\210\303	\346\347#\210\303	\350\351#\210\303	\352\353#\210\303	\354\355#\210\303	\356\357#\210\303	\360\361#\210\303	\362\363#\210\303	\364\365#\210\303	\366\367#\210\303	\370\371#\210\303	\372\373#\210\303	\374\375#\210	)\302\207" [m2-mode-map map make-sparse-keymap 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 "\f" m2-link "" m2-compile] 4)
#@56 *This variable gives the indentation in Modula-2-Mode.
(custom-declare-variable 'm2-indent '5 '(#$ . -2804) :type 'integer :group 'modula2)
#@1074 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.
(defalias 'modula-2-mode #[nil "\306 \210\307!\210\310\311\312\303!\210\313\312\314!\210\315\f!\210\312\316!\210\317P\312\320!\210\312\321!\210\322\312\323!\210\322\312\324!\210\325\312\326!\210\327\312\303!\210\313\312\330!\210\331\312\332!\210\333\312\334!\210\322\312\335!\210\336\337\340!\207" [m2-mode-map major-mode mode-name comment-column m2-mode-syntax-table page-delimiter kill-all-local-variables use-local-map modula-2-mode "Modula-2" make-local-variable 41 m2-end-comment-column set-syntax-table paragraph-start "$\\|" 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 font-lock-defaults ((m3-font-lock-keywords m3-font-lock-keywords-1 m3-font-lock-keywords-2) nil nil ((95 . "w") (46 . "w") (60 . ". 1") (62 . ". 4")) nil) run-hooks m2-mode-hook] 2 (#$ . 2952) nil])
#@48 Subdued level highlighting for Modula-3 modes.
(defconst m3-font-lock-keywords-1 '(("\\<\\(INTERFACE\\|MODULE\\|PROCEDURE\\)\\>[ 	]*\\(\\sw+\\)?" (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)) ("\\<\\(EXPORTS\\|FROM\\|IMPORT\\)\\>" (1 font-lock-keyword-face) (font-lock-match-c-style-declaration-item-and-skip-to-next nil (goto-char (match-end 0)) (1 font-lock-constant-face))) ("<\\*[ 	]*\\(\\sw+\\)" 1 font-lock-warning-face prepend)) (#$ . 4997))
#@46 Gaudy level highlighting for Modula-3 modes.
(defconst m3-font-lock-keywords-2 (append m3-font-lock-keywords-1 '("\\<\\(A\\(N[DY]\\|S\\)\\|B\\(EGIN\\|RANDED\\|Y\\)\\|C\\(ASE\\|ONST\\)\\|D\\(IV\\|O\\)\\|E\\(LS\\(E\\|IF\\)\\|VAL\\|X\\(CEPT\\|IT\\)\\)\\|F\\(INALLY\\|OR\\)\\|GENERIC\\|I[FN]\\|LO\\(CK\\|OP\\)\\|M\\(ETHODS\\|OD\\)\\|NOT\\|O\\(BJECT\\|VERRIDES\\|[FR]\\)\\|RE\\(ADONLY\\|CORD\\|F\\|PEAT\\|TURN\\|VEAL\\)\\|T\\(HEN\\|O\\|RY\\|YPE\\(CASE\\)?\\)\\|UN\\(SAFE\\|T\\(IL\\|RACED\\)\\)\\|VA\\(LUE\\|R\\)\\|W\\(HILE\\|ITH\\)\\)\\>" ("\\<\\(A\\(BS\\|DR\\(SIZE\\)?\\)\\|B\\(ITSIZE\\|YTESIZE\\)\\|CEILING\\|D\\(EC\\|ISPOSE\\)\\|F\\(IRST\\|LOOR\\)\\|I\\(NC\\|STYPE\\)\\|L\\(AST\\|OOPHOLE\\)\\|M\\(AX\\|IN\\)\\|N\\(ARROW\\|EW\\|UMBER\\)\\|ORD\\|ROUND\\|SUBARRAY\\|T\\(RUNC\\|YPECODE\\)\\|VAL\\)\\>" . font-lock-builtin-face) ("\\<\\(A\\(DDRESS\\|RRAY\\)\\|B\\(ITS\\|OOLEAN\\)\\|C\\(ARDINAL\\|HAR\\)\\|EXTENDED\\|FLOAT\\|INTEGER\\|LONGREAL\\|MUTEX\\|R\\(E\\(AL\\|FANY\\)\\|OOT\\)\\|SET\\|TEXT\\)\\>" . font-lock-type-face) ("\\<\\(END\\|EXCEPTION\\|RAISES?\\)\\>[ 	{]*" (1 font-lock-keyword-face) (font-lock-match-c-style-declaration-item-and-skip-to-next nil (goto-char (match-end 0)) (1 font-lock-function-name-face))) ("\\<\\(FALSE\\|NIL\\|NULL\\|TRUE\\)\\>" . font-lock-constant-face))) (#$ . 5473))
#@53 Default expressions to highlight in Modula-3 modes.
(defvar m3-font-lock-keywords m3-font-lock-keywords-1 (#$ . 6779))
#@48 Subdued level highlighting for Modula-2 modes.
(defconst m2-font-lock-keywords-1 m3-font-lock-keywords-1 (#$ . 6904))
#@46 Gaudy level highlighting for Modula-2 modes.
(defconst m2-font-lock-keywords-2 m3-font-lock-keywords-2 (#$ . 7028))
#@53 Default expressions to highlight in Modula-2 modes.
(defvar m2-font-lock-keywords m2-font-lock-keywords-1 (#$ . 7150))
#@64 Insert a newline and indent following line like previous line.
(defalias 'm2-newline #[nil "\301 \302 \210j)\207" [hpos current-indentation newline] 1 (#$ . 7275) nil])
#@26 Indent to next tab stop.
(defalias 'm2-tab #[nil "\301 \245T_j\207" [m2-indent current-indentation] 2 (#$ . 7452) nil])
#@54 Insert a BEGIN keyword and indent for the next line.
(defalias 'm2-begin #[nil "\300c\210\301 \210\302 \207" ["BEGIN" m2-newline m2-tab] 1 (#$ . 7580) nil])
#@64 Build skeleton CASE statement, prompting for the <expression>.
(defalias 'm2-case #[nil "\301\302!\303\304\261\210\305 \210\305 \210\306\307\261\210)\310\210\311 \207" [name read-string "Case-Expression: " "CASE " " OF" m2-newline "END (* case " " *);" 0 m2-tab] 3 (#$ . 7743) nil])
#@68 Build skeleton DEFINITION MODULE, prompting for the <module name>.
(defalias 'm2-definition #[nil "\301c\210\302\303!\211\304\305\261\210)\306\307!\207" [name "DEFINITION MODULE " read-string "Name: " ";\n\n\n\nEND " ".\n" previous-line 3] 5 (#$ . 8038) nil])
#@47 Insert ELSE keyword and indent for next line.
(defalias 'm2-else #[nil "\301 \210\302\303\"\210\304c\210\301 \210\305 \207" [m2-indent m2-newline backward-delete-char-untabify nil "ELSE" m2-tab] 3 (#$ . 8307) nil])
#@71 Build skeleton FOR loop statement, prompting for the loop parameters.
(defalias 'm2-for #[nil "\303c\210\304\305!\306\211\211\307\261\210\304\310!\211c\210\304\311!\211\312\230\204& \313\261\210\314c\210\315 \210\315 \210\316\n\317	\320\261\210+\321\210\322 \207" [by limit name "FOR " read-string "Loop Initialiser: " nil " TO " "Limit: " "Step: " "" " BY " " DO" m2-newline "END (* for " " to " " *);" 0 m2-tab] 6 (#$ . 8529) nil])
#@66 Insert a comment block containing the module title, author, etc.
(defalias 'm2-header #[nil "\300c\210\301\302!c\210\303c\210\304 c\210\305c\210\306 c\210\307\310 \311\312 \313\260c\210\314c\207" ["(*\n    Title: 	" read-string "Title: " "\n    Created:	" current-time-string "\n    Author: 	" user-full-name "\n		<" user-login-name "@" system-name ">\n" "*)\n\n"] 5 (#$ . 8979) nil])
#@67 Insert skeleton IF statement, prompting for <boolean-expression>.
(defalias 'm2-if #[nil "\301c\210\302\303!\211\304\261\210\305 \210\305 \210\306\307\261\210)\310\210\311 \207" [thecondition "IF " read-string "<boolean-expression>: " " THEN" m2-newline "END (* if " " *);" 0 m2-tab] 4 (#$ . 9371) nil])
#@33 Build skeleton LOOP (with END).
(defalias 'm2-loop #[nil "\300c\210\301 \210\301 \210\302c\210\303\210\304 \207" ["LOOP" m2-newline "END (* loop *);" 0 m2-tab] 1 (#$ . 9686) nil])
#@68 Build skeleton IMPLEMENTATION MODULE, prompting for <module-name>.
(defalias 'm2-module #[nil "\301c\210\302\303!\211\304\305\261\210\306\307!\210\310 \210\311 \210\312 \210\313 \210\312 \210\314 \210\315 \210\316\317\261\210)\320 \210\312 \210\321 \207" [name "IMPLEMENTATION MODULE " read-string "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] 5 (#$ . 9873) nil])
(defalias 'm2-or #[nil "\301 \210\302!\210\303c\210\301 \210\304 \207" [m2-indent m2-newline backward-delete-char-untabify "|" m2-tab] 2 nil nil])
(defalias 'm2-procedure #[nil "\302c\210\303\304!\305\211\306\261\210\303\307!\310\261\210\303\311!\211\312\230\204$ \313\261\210\314c\210\315 \210\316c\210\315 \210\315 \210\317c\210	c\210\314c\210\320\210\321 *\207" [args name "PROCEDURE " read-string "Name: " nil " (" "Arguments: " ")" "Result Type: " "" " : " ";" m2-newline "BEGIN" "END " 0 m2-tab] 3 nil nil])
(defalias 'm2-with #[nil "\301c\210\302\303!\211c\210\304c\210\305 \210\305 \210\306\307\261\210)\310\210\311 \207" [name "WITH " read-string "Record-Type: " " DO" m2-newline "END (* with " " *);" 0 m2-tab] 4 nil nil])
(defalias 'm2-record #[nil "\300c\210\301 \210\301 \210\302c\210\303\210\304 \207" ["RECORD" m2-newline "END (* record *);" 0 m2-tab] 1 nil nil])
(defalias 'm2-stdio #[nil "\300c\207" ["\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])
(defalias 'm2-type #[nil "\300c\210\301 \210\302 \207" ["TYPE" m2-newline m2-tab] 1 nil nil])
(defalias 'm2-until #[nil "\300c\210\301 \210\301 \210\302c\210\303\304!\305\261\210\306\210\307 \207" ["REPEAT" m2-newline "UNTIL " read-string "<boolean-expression>: " ";" 0 m2-tab] 2 nil nil])
(defalias 'm2-var #[nil "\300 \210\301c\210\300 \210\302 \207" [m2-newline "VAR" m2-tab] 1 nil nil])
(defalias 'm2-while #[nil "\301c\210\302\303!\211\304\261\210\305 \210\305 \210\306\307\261\210)\310\210\311 \207" [name "WHILE " read-string "<boolean-expression>: " " DO" m2-newline "END (* while " " *);" 0 m2-tab] 4 nil nil])
(defalias 'm2-export #[nil "\300c\207" ["EXPORT QUALIFIED "] 1 nil nil])
(defalias 'm2-import #[nil "\300c\210\301\302!c\210\303c\207" ["FROM " read-string "Module: " " IMPORT "] 2 nil nil])
(defalias 'm2-begin-comment #[nil "n\204	 \301\302\"\210\303c\207" [comment-column indent-to 0 "(*  "] 3 nil nil])
(defalias 'm2-end-comment #[nil "n\204 j\210\301c\207" [m2-end-comment-column "*)"] 1 nil nil])
(defalias 'm2-compile #[nil "\301\302\303 Q!\207" [m2-compile-command compile " " buffer-name] 4 nil nil])
(defalias 'm2-link #[nil "\203 \302	\303Q!\207\302	\303\304\305\306 \"\211Q!\207" [m2-link-name m2-link-command compile " " read-string "Name of executable: " buffer-name] 6 nil nil])
(defalias 'm2-execute-monitor-command #[(command) "\304	!\305\232\306	\307\310\211\311\312P&*\207" [shell-file-name shell csh command file-name-nondirectory "csh" call-process nil t "-cf" "exec "] 8])
(defalias 'm2-visit #[nil "\303\211\211\212\304\305!\306\307!\210\310\311P!\210eb\210\303\312\313\217\210\303\314\315\217\210\n\204/ 	\204/ \316\317\"\210)\n\203D \320\n!\210	\205K \212\320	!)\202K 	\205K \320	!+\207" [modulename modfile deffile nil read-string "Module name: " switch-to-buffer "*Command Execution*" m2-execute-monitor-command "m2whereis " (byte-code "\301\302!\210\303\224\303\225{\301\207" [deffile re-search-forward "\\(.*\\.def\\) *$" 1] 2) ((search-failed)) (byte-code "\301\302!\210\303\224\303\225{\301\207" [modfile re-search-forward "\\(.*\\.mod\\) *$" 1] 2) ((search-failed)) error "I can find neither definition nor implementation of %s" find-file] 3 nil nil])
#@52 Toggle between .mod and .def files for the module.
(defalias 'm2-toggle #[nil "\300 \301\302O\303\230\203 \304\300 \305\301O\306P!\207\300 \301\302O\306\230\203( \304\300 \305\301O\303P!\207\300 \307\302O\310\230\203< \304\300 \305\307O\311P!\207\300 \307\302O\311\230\205O \304\300 \305\307O\310P!\207" [buffer-name -4 nil ".def" find-file-other-window 0 ".mod" -3 ".mi" ".md"] 4 (#$ . 13899) nil])
(provide 'modula2)
