;ELC ;;; compiled by rms@psilocin.gnu.ai.mit.edu on Thu Jun 6 10:27:13 1996 ;;; from file /home/fsf/rms/e19/lisp/simula.el ;;; emacs version 19.31.2. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`simula.el' was compiled for Emacs 19.29 or later")) #@175 Non-nil means TAB in SIMULA mode should always reindent the current line. Otherwise TAB indents only when point is within the run of whitespace at the beginning of the line. (defconst simula-tab-always-indent-default nil (#$ . 472)) #@176 *Non-nil means TAB in SIMULA mode should always reindent the current line. Otherwise TAB indents only when point is within the run of whitespace at the beginning of the line. (defvar simula-tab-always-indent simula-tab-always-indent-default (#$ . -712)) #@68 Indentation of SIMULA statements with respect to containing block. (defconst simula-indent-level-default 3 (#$ . 972)) #@69 *Indentation of SIMULA statements with respect to containing block. (defvar simula-indent-level simula-indent-level-default (#$ . -1097)) #@61 Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE. (defconst simula-substatement-offset-default 3 (#$ . 1241)) #@62 *Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE. (defvar simula-substatement-offset simula-substatement-offset-default (#$ . -1367)) #@239 Extra indentation for lines not starting a statement or substatement. If value is a list, each line in a multipleline continued statement will have the car of the list extra indentation with respect to the previous line of the statement. (defconst simula-continued-statement-offset-default 3 (#$ . 1519)) #@240 *Extra indentation for lines not starting a statement or substatement. If value is a list, each line in a multipleline continued statement will have the car of the list extra indentation with respect to the previous line of the statement. (defvar simula-continued-statement-offset simula-continued-statement-offset-default (#$ . -1831)) #@61 Offset of SIMULA label lines relative to usual indentation. (defconst simula-label-offset-default -4711 (#$ . 2174)) #@62 *Offset of SIMULA label lines relative to usual indentation. (defvar simula-label-offset simula-label-offset-default (#$ . -2297)) #@208 Extra indentation of THEN and ELSE with respect to the starting IF. Value is a cons cell, the car is extra THEN indentation and the cdr extra ELSE indentation. IF after ELSE is indented as the starting IF. (defconst simula-if-indent-default (quote (0 . 0)) (#$ . 2435)) #@209 *Extra indentation of THEN and ELSE with respect to the starting IF. Value is a cons cell, the car is extra THEN indentation and the cdr extra ELSE indentation. IF after ELSE is indented as the starting IF. (defvar simula-if-indent simula-if-indent-default (#$ . -2713)) #@167 Extra indentation of WHEN and OTHERWISE with respect to the INSPECT. Value is a cons cell, the car is extra WHEN indentation and the cdr extra OTHERWISE indentation. (defconst simula-inspect-indent-default (quote (0 . 0)) (#$ . 2992)) #@168 *Extra indentation of WHEN and OTHERWISE with respect to the INSPECT. Value is a cons cell, the car is extra WHEN indentation and the cdr extra OTHERWISE indentation. (defvar simula-inspect-indent simula-inspect-indent-default (#$ . -3234)) #@73 Non-nil means `simula-indent-line' function may reindent previous line. (defconst simula-electric-indent-default nil (#$ . 3481)) #@74 *Non-nil means `simula-indent-line' function may reindent previous line. (defvar simula-electric-indent simula-electric-indent-default (#$ . -3617)) #@175 Specify how to convert case for SIMULA keywords. Value is one of the symbols `upcase', `downcase', `capitalize', (as in) `abbrev-table' or nil if they should not be changed. (defconst simula-abbrev-keyword-default (quote upcase) (#$ . 3773)) #@176 *Specify how to convert case for SIMULA keywords. Value is one of the symbols `upcase', `downcase', `capitalize', (as in) `abbrev-table' or nil if they should not be changed. (defvar simula-abbrev-keyword simula-abbrev-keyword-default (#$ . -4022)) #@202 Specify how to convert case for standard SIMULA procedure and class names. Value is one of the symbols `upcase', `downcase', `capitalize', (as in) `abbrev-table', or nil if they should not be changed. (defconst simula-abbrev-stdproc-default (quote abbrev-table) (#$ . 4278)) #@203 *Specify how to convert case for standard SIMULA procedure and class names. Value is one of the symbols `upcase', `downcase', `capitalize', (as in) `abbrev-table', or nil if they should not be changed. (defvar simula-abbrev-stdproc simula-abbrev-stdproc-default (#$ . -4560)) #@228 *File with extra abbrev definitions for use in SIMULA mode. These are used together with the standard abbrev definitions for SIMULA. Please note that the standard definitions are required for SIMULA mode to function correctly. (defvar simula-abbrev-file nil (#$ . -4843)) #@38 Syntax table in SIMULA mode buffers. (defvar simula-mode-syntax-table nil (#$ . 5121)) #@427 A list of features extant in the Emacs you are using. There are many flavors of Emacs out there, each with different features supporting those needed by simula-mode. Here's the current supported list, along with the values for this variable: Emacs 19: (v19 FSF 1-bit) Vanilla Emacs 18/Epoch 4: (v18 no-dual-comments) Emacs 18/Epoch 4 (patch2): (v18 8-bit) Lucid Emacs 19: (v19 Lucid 8-bit). (defconst simula-emacs-features (byte-code "! !\nÉ=\n\"=\n̔̕O!\n͔͕O!GK!UXUeU\n\"{ւ|\" \fE," [boundp emacs-major-version emacs-minor-version nil comments flavor minor major string-match "\\([0-9]+\\).\\([0-9]+\\)" emacs-version string-to-int 1 2 error "Cannot figure out the major and minor version numbers." 18 v18 4 19 v19 "Lucid" Lucid FSF "Cannot recognize major version number: %s"] 5) (#$ . 5215)) #@35 Lucid Emacs menu for SIMULA mode. (defvar simula-mode-menu (quote (["Report Bug" simula-submit-bug-report t] ["Indent Line" simula-indent-line t] ["Backward Statement" simula-previous-statement t] ["Forward Statement" simula-next-statement t] ["Backward Up Level" simula-backward-up-level t] ["Forward Down Statement" simula-forward-down-level t])) (#$ . 6154)) (byte-code "] !##############" [simula-mode-syntax-table copy-syntax-table standard-syntax-table modify-syntax-entry 33 "<" 36 "." 37 39 "\"" 40 "()" 41 ")(" 59 ">" 91 92 93 95 "w" 124 123 125] 4) #@29 Keymap used in SIMULA mode. (defvar simula-mode-map nil (#$ . 6797)) (byte-code " ########> #!B################>!#" [simula-mode-map make-sparse-keymap define-key "" simula-backward-up-level "" simula-previous-statement "" simula-forward-down-level "" simula-next-statement "" backward-delete-char-untabify ":" simula-electric-label "" simula-indent-exp " " simula-indent-command FSF simula-emacs-features [menu-bar] [menu-bar simula] "SIMULA" [menu-bar simula bug-report] ("Submit Bug Report" . simula-submit-bug-report) [menu-bar simula separator-indent] ("--") [menu-bar simula indent-exp] ("Indent Expression" . simula-indent-exp) [menu-bar simula indent-line] ("Indent Line" . simula-indent-command) [menu-bar simula separator-navigate] ("--") [menu-bar simula backward-stmt] ("Previous Statement" . simula-previous-statement) [menu-bar simula forward-stmt] ("Next Statement" . simula-next-statement) [menu-bar simula backward-up] ("Backward Up Level" . simula-backward-up-level) [menu-bar simula forward-down] ("Forward Down Statement" . simula-forward-down-level) put menu-enable (not (eobp)) (not (bobp)) (not (eobp)) (not (bobp)) (not buffer-read-only) (not buffer-read-only) Lucid boundp mode-popup-menu button3 simula-popup-menu] 6) #@26 Pops up the SIMULA menu. (defalias 'simula-popup-menu #[(e) " P B! " [popup-menu mode-name " Mode Commands" simula-mode-menu simula-keep-region-active] 3 (#$ . 8215) "@e"]) (defalias 'simula-keep-region-active #[nil "! ‰" [boundp zmacs-region-stays t] 2]) #@37 Abbrev table in SIMULA mode buffers (defvar simula-mode-abbrev-table nil (#$ . 8489)) #@2232 Major mode for editing SIMULA code. \{simula-mode-map} Variables controlling indentation style: simula-tab-always-indent Non-nil means TAB in SIMULA mode should always reindent the current line, regardless of where in the line point is when the TAB command is used. simula-indent-level Indentation of SIMULA statements with respect to containing block. simula-substatement-offset Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE. simula-continued-statement-offset 3 Extra indentation for lines not starting a statement or substatement, e.g. a nested FOR-loop. If value is a list, each line in a multiple- line continued statement will have the car of the list extra indentation with respect to the previous line of the statement. simula-label-offset -4711 Offset of SIMULA label lines relative to usual indentation. simula-if-indent '(0 . 0) Extra indentation of THEN and ELSE with respect to the starting IF. Value is a cons cell, the car is extra THEN indentation and the cdr extra ELSE indentation. IF after ELSE is indented as the starting IF. simula-inspect-indent '(0 . 0) Extra indentation of WHEN and OTHERWISE with respect to the corresponding INSPECT. Value is a cons cell, the car is extra WHEN indentation and the cdr extra OTHERWISE indentation. simula-electric-indent nil If this variable is non-nil, `simula-indent-line' will check the previous line to see if it has to be reindented. simula-abbrev-keyword 'upcase Determine how SIMULA keywords will be expanded. Value is one of the symbols `upcase', `downcase', `capitalize', (as in) `abbrev-table', or nil if they should not be changed. simula-abbrev-stdproc 'abbrev-table Determine how standard SIMULA procedure and class names will be expanded. Value is one of the symbols `upcase', `downcase', `capitalize', (as in) `abbrev-table', or nil if they should not be changed. Turning on SIMULA mode calls the value of the variable simula-mode-hook with no arguments, if that value is non-nil Warning: simula-mode-hook should not read in an abbrev file without calling the function simula-install-standard-abbrevs afterwards, preferably not at all. (defalias 'simula-mode #[nil " \n!! !!\f!\f!!!!!!!vj!o\" )\"!!" [kill-all-local-variables use-local-map simula-mode-map simula-mode major-mode "SIMULA" mode-name make-local-variable comment-column 40 set-syntax-table simula-mode-syntax-table paragraph-start "[ ]*$\\|\\f" paragraph-separate indent-line-function simula-indent-line require-final-newline t comment-start "! " comment-end " ;" comment-start-skip "!+ *" parse-sexp-ignore-comments nil comment-multi-line simula-mode-abbrev-table simula-abbrev-file read-abbrev-file define-abbrev-table abbrevs-changed simula-install-standard-abbrevs local-abbrev-table abbrev-mode 1 run-hooks simula-mode-hook] 3 (#$ . 8583) nil]) #@43 Indent SIMULA expression following point. (defalias 'simula-indent-exp #[nil "` m b8Ŏ! !y` W7!1 y\")+" [nil end simula-electric-indent here simula-skip-comment-forward ((byte-code " " [end nil] 3)) simula-next-statement 1 point-marker simula-previous-statement 0 looking-at "[ ]*$" simula-indent-line] 3 (#$ . 11601) nil]) #@109 Indent this line as SIMULA code. If `simula-electric-indent' is non-nil, indent previous line if necessary. (defalias 'simula-indent-line #[nil "d`Z Ŏ= yw!= ?=  =?< j)," [simula-calculate-indent t case-fold-search indent origin ((byte-code "dZb \n=  \nj" [origin current-indentation indent back-to-indentation delete-horizontal-space] 2)) simula-electric-indent 0 expand-abbrev " \f" nil looking-at "\\(end\\|if\\|then\\|else\\|when\\|otherwise\\)\\>" simula-context post-indent current-indentation delete-horizontal-space] 3 (#$ . 11978)]) #@451 Indent current line as SIMULA code, or insert TAB character. If `simula-tab-always-indent' is non-nil, always indent current line. Otherwise, indent only if point is before any non-whitespace character on the line. A numeric argument, regardless of its value, means indent rigidly all the lines of the SIMULA statement after point so that this line becomes properly indented. The relative indentation among the lines of the statement are preserved. (defalias 'simula-indent-command #[(&optional whole-exp) "\n xn)y ) d`Zxn)ʼn \n \f ώ =Oxn)Y Yy j)`\f\ny`\n\fb!` \nV =?\n  Z$). )" [t case-fold-search whole-exp simula-tab-always-indent " \f" nil 0 simula-calculate-indent current-indentation end beg bol origin current indent ((byte-code " d Zb‡" [bol origin nil] 2)) back-to-indentation delete-horizontal-space 1 simula-next-statement indent-code-rigidly "%" insert-tab] 7 (#$ . 12583) "P"]) #@274 Returns value according to syntactic SIMULA context of point. 0 point inside COMMENT comment 1 point on SIMULA-compiler directive line 2 point inside END comment 3 point inside string 4 point inside character constant nil otherwise. (defalias 'simula-context #[nil "yg)= ‡`ex\foyg=`Wwuh=C`)h=bwg=\\`)u)g=kuwg=~`)u)!x`*`\fWa\f#ah>\f#h>h=yÉhz=gz=!!)h>#\fw `\fWg=Ényu\fwh=6\f#h=[`\f=FmKu\f#y +" [0 37 1 nil origin return-value "^;" saved-point loopvalue "^;\"'" 59 34 "^\";" t 39 "^';" backward-char re-search-forward "\\\\|!\\|\"\\|'\\|^%\\|\\" move (100 68) 2 ";\\|\\\\|\\\\|\\\\|\\\\|^%" (100 68) 119 backward-word looking-at "end\\>\\|else\\>\\|otherwise\\>\\|when\\>" (33 116 84) "^%;" search-forward "\"" 3 4 "'"] 5 (#$ . 13580)]) #@61 If this is a label that starts the line, reindent the line. (defalias 'simula-electric-label #[nil " cd`Z ǎ \fC\" ," [expand-abbrev 58 t read-event next-char case-fold-search origin ((byte-code ">G>=\fg>G G!xx!GxnG  j)dZb" [next-char (61 45) (10 13) 9 simula-tab-always-indent (61 45) simula-context backward-char 1 " \f" nil "a-zA-Z0-9_" looking-at "virtual\\>" simula-calculate-indent amount delete-horizontal-space origin] 2)) append unread-command-events] 3 (#$ . 14657) nil]) #@97 Move backward up COUNT block levels. If COUNT is negative, move forward up block level instead. (defalias 'simula-backward-up-level #[(count) "`ŏ*" [t case-fold-search origin nil (byte-code "V'VO! g> S\"TWO!! Hg>ETGS!'" [count 0 re-search-backward "\\\\|\\" simula-context (98 66) re-search-forward backward-word 1 (101 69) -1] 3) ((error (byte-code "b!" [origin error "No higher block level"] 2)) (quit (byte-code "b\"" [origin signal quit nil] 3)))] 3 (#$ . 15213) "p"]) #@101 Move forward down COUNT block levels. If COUNT is negative, move backward down block level instead. (defalias 'simula-forward-down-level #[(count) "`Ǐ+" [count t case-fold-search origin start-count nil (byte-code "W2Wf! #g> T\"SW\"Vf!! Sg>PSRT!V2\"2" [count 0 re-search-backward "\\\\|\\" simula-context (101 69) start-count signal error nil re-search-forward backward-word 1 (98 66) -1] 3) ((error (byte-code "b!" [origin error "No containing block level"] 2)) (quit (byte-code "b\"" [origin signal quit nil] 3)))] 3 (#$ . 15781) "p"]) #@77 Move backward COUNT statements. If COUNT is negative, move forward instead. (defalias 'simula-previous-statement #[(count) "W [!`ɏ+" [count 0 simula-next-statement nil t origin case-fold-search status (byte-code " h>!!$!$h=$!\nS\n!:#$Og=KuO! " [simula-skip-comment-backward (110 78) backward-word 1 looking-at "\\" -1 59 backward-char natnump count simula-search-backward ";\\|\\" nil move status simula-skip-comment-forward] 4) ((error (byte-code "b!" [origin error "Incomplete statement (too many ENDs)"] 2)) (quit (byte-code "b\"" [origin signal quit nil] 3)))] 3 (#$ . 16431) "p"]) #@77 Move forward COUNT statements. If COUNT is negative, move backward instead. (defalias 'simula-next-statement #[(count) "W [!`ɏ+" [count 0 simula-previous-statement nil t origin case-fold-search status (byte-code " !\fv S! d# \f 2hU?2! " [simula-skip-comment-forward looking-at "\\" 1 natnump count simula-search-forward ";\\|\\" move status 59 backward-word simula-skip-comment-backward] 4) ((error (byte-code "b!" [origin error "Incomplete statement (too few ENDs)"] 2)) (quit (byte-code "b\"" [origin signal quit nil] 3)))] 3 (#$ . 17125) "p"]) #@66 Search towards bob to find first char that is outside a comment. (defalias 'simula-skip-comment-backward #[(&optional stop-at-end) "" [simula-out (byte-code "xh=%! ! =!)(  >Uh=Mg>Mx!)Mx\" =k! >[ =yo\"  =!v\"" [nil context " \n\f" 59 backward-char 1 simula-context stop-at-end 2 (nil 3 4) 58 (45 61) ": \fa-zA-Z0-9_" looking-at "virtual\\>" throw simula-out 0 re-search-backward "!\\|\\" (0 1) "\\"] 3)] 2 (#$ . 17752) nil]) #@66 Search towards eob to find first char that is outside a comment. (defalias 'simula-skip-comment-forward #[nil "" [simula-out (byte-code "w!#n#g=#y!6!6w\"" [" \n\f" nil looking-at "!\\|\\" search-forward ";" move 37 1 "[a-z0-9_]*[ \f]*:[^-=]" "virtual\\>" "a-zA-Z0-9_ \f:" throw simula-out t] 4)] 2 (#$ . 18315) nil]) (defalias 'simula-forward-up-level #[nil "`8e#1 h>#\n>?+ \f @D b-" [t nil temp return-value case-fold-search origin continue-loop re-search-backward "\\\\|\\" move simula-context (100 68) (nil 2) simula-forward-up-level] 6]) (defalias 'simula-calculate-indent #[nil " `‰ \n=?xn3 =3!!wi b\n=J\n=W!\n=d! o w![!g>@g>Av !g>!@!A !!%!\f\fh=\fh>!!)?ك\f! y`)o?0hz=,!!?0h>?)n# 3g=T!!d\\!tv!!3\\ ! >v3\\ >@A\\ !3\\ >@A\\ :<:@:\\y`)3 ?w!!?) ! \\ o?Ahz==!!)?Ah>? LWj:" 1 3 error "Inside string" 4 "Inside character constant" simula-inside-parens " \f" looking-at "end\\>" simula-indent-level t "if\\>\\|then\\>\\|else\\>" (84 116) simula-if-indent (69 101) simula-find-if "when\\>\\|otherwise\\>" (87 119) simula-inspect-indent simula-find-inspect "virtual\\>" "[a-z0-9_]*[ \f]*:[^-=]" simula-label-offset simula-skip-comment-backward dont-skip-end 59 (78 110) backward-word "begin\\>" simula-previous-statement 119 "begin\\|then\\|else\\|when\\|otherwise\\|do" (58 59) ";\\|\\<\\(begin\\|end\\|if\\|else\\|then\\|when\\|otherwise\\|do\\)\\>" move "do\\>" simula-substatement-offset simula-find-do-match "\\(if\\|then\\|else\\)\\>" (73 105) (84 116) "\\\\|\\" (87 119) simula-continued-statement-offset "virtual" "!\\|comment\\>\\|[a-z0-9_]*[ \f]*:[^-=]" current-indentation (58 59)] 9]) #@62 Find starting IF of a IF-THEN[-ELSE[-IF-THEN...]] statement. (defalias 'simula-find-if #[nil "" [simula-out (byte-code "#,g>, hz=#!!(\")!9!\"" [simula-search-backward "\\\\|;\\|\\" nil t (73 105) simula-skip-comment-backward 119 backward-word 1 looking-at "else\\>" throw simula-out "\\" error "Missing IF or misplaced BEGIN or ';' (can't find IF)"] 4)] 2 (#$ . 20681)]) #@42 Find INSPECT matching WHEN or OTHERWISE. (defalias 'simula-find-inspect #[nil "" [simula-out (byte-code "#0gU0g> T U*\" S!" [0 level simula-search-backward "\\\\|\\\\|;" nil t 59 (79 111) throw simula-out error "Missing INSPECT or misplaced ';' (can't find INSPECT)"] 4)] 2 (#$ . 21129)]) #@55 Find keyword matching DO: FOR, WHILE, INSPECT or WHEN (defalias 'simula-find-do-match #[nil "# ! ??!" [re-search-backward "\\<\\(do\\|for\\|while\\|inspect\\|when\\|end\\|begin\\)\\>\\|;" nil move simula-context looking-at "\\<\\(for\\|while\\|inspect\\|when\\)\\>" error "No matching FOR, WHILE or INSPECT for DO, or misplaced ';'"] 4 (#$ . 21491)]) #@73 Return position after `(' on line if inside parentheses, nil otherwise. (defalias 'simula-inside-parens #[nil "Í*" [0 parlevel simula-out (byte-code "#Q =g=+U$\"!g=IUAiT\"ST\"" [re-search-backward "(\\|)\\|;" nil t simula-context 59 parlevel 0 throw simula-out error "Parenthesis mismatch or misplaced ';'" 40] 4)] 2 (#$ . 21871)]) #@59 Goto point of definition of variable, procedure or class. (defalias 'simula-goto-definition #[nil "" [nil] 1 (#$ . 22282) nil]) (defalias 'simula-expand-stdproc #[nil " \f =!= !=*!=A\f! ?A! " [simula-abbrev-stdproc simula-context unexpand-abbrev upcase upcase-word -1 downcase downcase-word capitalize capitalize-word abbrev-table symbol-name last-abbrev last-abbrev-text expand-abbrev] 2]) (defalias 'simula-expand-keyword #[nil " \f =!= !=*!\n=B !?B! " [simula-abbrev-keyword simula-context unexpand-abbrev upcase upcase-word -1 downcase downcase-word capitalize capitalize-word simula-abbrev-stdproc abbrev-table symbol-name last-abbrev last-abbrev-text expand-abbrev] 2]) #@58 Expand SIMULA keyword. If it starts the line, reindent. (defalias 'simula-electric-keyword #[nil "=\f\"!!  \f8\f=8hz=8!!)?*A L s=Z!s=h!s=s!d`Z ߏ+)" [this-command self-insert-command show-char insert-char last-command-char 1 sit-for 0 backward-char simula-context t case-fold-search where 2 119 backward-word looking-at "end\\>" unexpand-abbrev simula-abbrev-keyword upcase upcase-word -1 downcase downcase-word capitalize capitalize-word nil null pos (byte-code "hz=K!!-! \"!,`` \\{\")xnK  =G j)OwdZb]!" [119 backward-word 1 looking-at "end\\>" simula-backward-up-level pos-visible-in-window-p sit-for message "Matches %s" window-width " \f" nil simula-calculate-indent indent current-indentation delete-horizontal-space pos show-char delete-char] 6) ((quit (byte-code "dZb" [pos] 2)))] 4 (#$ . 23059)]) #@485 Search backward from point for regular expression REGEXP, ignoring matches found inside SIMULA comments, string literals, and BEGIN..END blocks. Set point to the end of the occurrence found, and return point. An optional second argument BOUND bounds the search, it is a buffer position. The match found must not extend after that position. Optional third argument NOERROR, if t, means if fail just return nil (no error). If not nil and not t, move to limit of search and return nil. (defalias 'simula-search-backward #[(regexp &optional bound noerror) " P`ʍ." [nil regexp "\\|\\" start-point match comb-regexp context end begin simula-backward (byte-code " \n# Ǝ =( !\"̂#O=L !@!@̂G!GO*=\\`\"=!\n# =g>S>g>T)f=b C\"\"f)=b? C\"" [re-search-backward comb-regexp bound 1 match-data match-data ((store-match-data match-data)) simula-context context nil looking-at regexp t BLOCK match 2 ";\\|\\\\|\\\\|\\\\|\\" "\\" throw simula-backward 0 level natnump "\\\\|\\" (98 66) (nil 2) (101 69) noerror start-point signal search-failed] 5)] 6 (#$ . 24021)]) #@484 Search forward from point for regular expression REGEXP, ignoring matches found inside SIMULA comments, string literals, and BEGIN..END blocks. Set point to the end of the occurrence found, and return point. An optional second argument BOUND bounds the search, it is a buffer position. The match found must not extend after that position. Optional third argument NOERROR, if t, means if fail just return nil (no error). If not nil and not t, move to limit of search and return nil. (defalias 'simula-search-forward #[(regexp &optional bound noerror) " P`ʍ." [nil regexp "\\|\\" start-point match comb-regexp context end begin simula-forward (byte-code " \n# Ǝǔb  + !%̂&H =E !@!@H+=U`\"=!\n#  =T =h>S)_=b C\"\"_)=b? C\"" [re-search-forward comb-regexp bound 1 match-data match-data ((store-match-data match-data)) 0 simula-context context looking-at regexp t BLOCK match 2 ";\\|\\\\|\\\\|\\\\|\\" nil throw simula-forward level natnump "\\\\|\\" (100 68) noerror start-point signal search-failed] 5)] 6 (#$ . 25331)]) #@71 Define Simula keywords, procedures and classes in local abbrev table. (defalias 'simula-install-standard-abbrevs #[nil "\"" [mapcar #[(args) "\n #" [apply define-abbrev simula-mode-abbrev-table args] 4] (("abs" "Abs" simula-expand-stdproc) ("accum" "Accum" simula-expand-stdproc) ("activate" "ACTIVATE" simula-expand-keyword) ("addepsilon" "AddEpsilon" simula-expand-stdproc) ("after" "AFTER" simula-expand-keyword) ("and" "AND" simula-expand-keyword) ("arccos" "ArcCos" simula-expand-stdproc) ("arcsin" "ArcSin" simula-expand-stdproc) ("arctan" "ArcTan" simula-expand-stdproc) ("arctan2" "ArcTan2" simula-expand-stdproc) ("array" "ARRAY" simula-expand-keyword) ("at" "AT" simula-expand-keyword) ("before" "BEFORE" simula-expand-keyword) ("begin" "BEGIN" simula-expand-keyword) ("blanks" "Blanks" simula-expand-stdproc) ("boolean" "BOOLEAN" simula-expand-keyword) ("breakoutimage" "BreakOutImage" simula-expand-stdproc) ("bytefile" "ByteFile" simula-expand-stdproc) ("call" "Call" simula-expand-stdproc) ("cancel" "Cancel" simula-expand-stdproc) ("cardinal" "Cardinal" simula-expand-stdproc) ("char" "Char" simula-expand-stdproc) ("character" "CHARACTER" simula-expand-keyword) ("checkpoint" "CheckPoint" simula-expand-stdproc) ("class" "CLASS" simula-expand-keyword) ("clear" "Clear" simula-expand-stdproc) ("clocktime" "ClockTime" simula-expand-stdproc) ("close" "Close" simula-expand-stdproc) ("comment" "COMMENT" simula-expand-keyword) ("constant" "Constant" simula-expand-stdproc) ("copy" "Copy" simula-expand-stdproc) ("cos" "Cos" simula-expand-stdproc) ("cosh" "CosH" simula-expand-stdproc) ("cotan" "CoTan" simula-expand-stdproc) ("cputime" "CpuTime" simula-expand-stdproc) ("current" "Current" simula-expand-stdproc) ("datetime" "DateTime" simula-expand-stdproc) ("decimalmark" "DecimalMark" simula-expand-stdproc) ("delay" "DELAY" simula-expand-keyword) ("deleteimage" "DeleteImage" simula-expand-stdproc) ("detach" "Detach" simula-expand-stdproc) ("digit" "Digit" simula-expand-stdproc) ("directbytefile" "DirectByteFile" simula-expand-stdproc) ("directfile" "DirectFile" simula-expand-stdproc) ("discrete" "Discrete" simula-expand-stdproc) ("do" "DO" simula-expand-keyword) ("downcase" "Downcase" simula-expand-stdproc) ("draw" "Draw" simula-expand-stdproc) ("eject" "Eject" simula-expand-stdproc) ("else" "ELSE" simula-electric-keyword) ("empty" "Empty" simula-expand-stdproc) ("end" "END" simula-electric-keyword) ("endfile" "Endfile" simula-expand-stdproc) ("entier" "Entier" simula-expand-stdproc) ("eq" "EQ" simula-expand-keyword) ("eqv" "EQV" simula-expand-keyword) ("erlang" "Erlang" simula-expand-stdproc) ("error" "Error" simula-expand-stdproc) ("evtime" "EvTime" simula-expand-stdproc) ("exp" "Exp" simula-expand-stdproc) ("external" "EXTERNAL" simula-expand-keyword) ("false" "FALSE" simula-expand-keyword) ("field" "Field" simula-expand-stdproc) ("file" "File" simula-expand-stdproc) ("first" "First" simula-expand-stdproc) ("follow" "Follow" simula-expand-stdproc) ("for" "FOR" simula-expand-keyword) ("ge" "GE" simula-expand-keyword) ("getchar" "GetChar" simula-expand-stdproc) ("getfrac" "GetFrac" simula-expand-stdproc) ("getint" "GetInt" simula-expand-stdproc) ("getreal" "GetReal" simula-expand-stdproc) ("go" "GO" simula-expand-keyword) ("goto" "GOTO" simula-expand-keyword) ("gt" "GT" simula-expand-keyword) ("head" "Head" simula-expand-stdproc) ("hidden" "HIDDEN" simula-expand-keyword) ("histd" "HistD" simula-expand-stdproc) ("histo" "Histo" simula-expand-stdproc) ("hold" "Hold" simula-expand-stdproc) ("idle" "Idle" simula-expand-stdproc) ("if" "IF" simula-expand-keyword) ("image" "Image" simula-expand-stdproc) ("imagefile" "ImageFile" simula-expand-stdproc) ("imp" "IMP" simula-expand-keyword) ("in" "IN" simula-expand-keyword) ("inbyte" "InByte" simula-expand-stdproc) ("inbytefile" "InByteFile" simula-expand-stdproc) ("inchar" "InChar" simula-expand-stdproc) ("infile" "InFile" simula-expand-stdproc) ("infrac" "InFrac" simula-expand-stdproc) ("inimage" "InImage" simula-expand-stdproc) ("inint" "InInt" simula-expand-stdproc) ("inner" "INNER" simula-expand-keyword) ("inreal" "InReal" simula-expand-stdproc) ("inrecord" "InRecord" simula-expand-stdproc) ("inspect" "INSPECT" simula-expand-keyword) ("integer" "INTEGER" simula-expand-keyword) ("intext" "InText" simula-expand-stdproc) ("into" "Into" simula-expand-stdproc) ("is" "IS" simula-expand-keyword) ("isochar" "ISOChar" simula-expand-stdproc) ("isopen" "IsOpen" simula-expand-stdproc) ("isorank" "ISORank" simula-expand-stdproc) ("label" "LABEL" simula-expand-keyword) ("last" "Last" simula-expand-stdproc) ("lastitem" "LastItem" simula-expand-stdproc) ("lastloc" "LastLoc" simula-expand-stdproc) ("le" "LE" simula-expand-keyword) ("length" "Length" simula-expand-stdproc) ("letter" "Letter" simula-expand-stdproc) ("line" "Line" simula-expand-stdproc) ("linear" "Linear" simula-expand-stdproc) ("linesperpage" "LinesPerPage" simula-expand-stdproc) ("link" "Link" simula-expand-stdproc) ("linkage" "Linkage" simula-expand-stdproc) ("ln" "Ln" simula-expand-stdproc) ("locate" "Locate" simula-expand-stdproc) ("location" "Location" simula-expand-stdproc) ("lock" "Lock" simula-expand-stdproc) ("locked" "Locked" simula-expand-stdproc) ("log10" "Log10" simula-expand-stdproc) ("long" "LONG" simula-expand-keyword) ("lowcase" "LowCase" simula-expand-stdproc) ("lowerbound" "LowerBound" simula-expand-stdproc) ("lowten" "LowTen" simula-expand-stdproc) ("lt" "LT" simula-expand-keyword) ("main" "Main" simula-expand-stdproc) ("max" "Max" simula-expand-stdproc) ("maxint" "MaxInt" simula-expand-stdproc) ("maxlongreal" "MaxLongReal" simula-expand-stdproc) ("maxloc" "MaxLoc" simula-expand-stdproc) ("maxrank" "MaxRank" simula-expand-stdproc) ("maxreal" "MaxReal" simula-expand-stdproc) ("min" "Min" simula-expand-stdproc) ("minint" "MinInt" simula-expand-stdproc) ("minlongreal" "MinLongReal" simula-expand-stdproc) ("minrank" "MinRank" simula-expand-stdproc) ("minreal" "MinReal" simula-expand-stdproc) ("mod" "Mod" simula-expand-stdproc) ("more" "More" simula-expand-stdproc) ("name" "NAME" simula-expand-keyword) ("ne" "NE" simula-expand-keyword) ("negexp" "NegExp" simula-expand-stdproc) ("new" "NEW" simula-expand-keyword) ("nextev" "NextEv" simula-expand-stdproc) ("none" "NONE" simula-expand-keyword) ("normal" "Normal" simula-expand-stdproc) ("not" "NOT" simula-expand-keyword) ("notext" "NOTEXT" simula-expand-keyword) ("open" "Open" simula-expand-stdproc) ("or" "OR" simula-expand-keyword) ("otherwise" "OTHERWISE" simula-electric-keyword) ("out" "Out" simula-expand-stdproc) ("outbyte" "OutByte" simula-expand-stdproc) ("outbytefile" "OutByteFile" simula-expand-stdproc) ("outchar" "OutChar" simula-expand-stdproc) ("outfile" "OutFile" simula-expand-stdproc) ("outfix" "OutFix" simula-expand-stdproc) ("outfrac" "OutFrac" simula-expand-stdproc) ("outimage" "OutImage" simula-expand-stdproc) ("outint" "OutInt" simula-expand-stdproc) ("outreal" "OutReal" simula-expand-stdproc) ("outrecord" "OutRecord" simula-expand-stdproc) ("outtext" "OutText" simula-expand-stdproc) ("page" "Page" simula-expand-stdproc) ("passivate" "Passivate" simula-expand-stdproc) ("poisson" "Poisson" simula-expand-stdproc) ("pos" "Pos" simula-expand-stdproc) ("precede" "Precede" simula-expand-stdproc) ("pred" "Pred" simula-expand-stdproc) ("prev" "Prev" simula-expand-stdproc) ("printfile" "PrintFile" simula-expand-stdproc) ("prior" "PRIOR" simula-expand-keyword) ("procedure" "PROCEDURE" simula-expand-keyword) ("process" "Process" simula-expand-stdproc) ("protected" "PROTECTED" simula-expand-keyword) ("putchar" "PutChar" simula-expand-stdproc) ("putfix" "PutFix" simula-expand-stdproc) ("putfrac" "PutFrac" simula-expand-stdproc) ("putint" "PutInt" simula-expand-stdproc) ("putreal" "PutReal" simula-expand-stdproc) ("qua" "QUA" simula-expand-keyword) ("randint" "RandInt" simula-expand-stdproc) ("rank" "Rank" simula-expand-stdproc) ("reactivate" "REACTIVATE" simula-expand-keyword) ("real" "REAL" simula-expand-keyword) ("ref" "REF" simula-expand-keyword) ("resume" "Resume" simula-expand-stdproc) ("setaccess" "SetAccess" simula-expand-stdproc) ("setpos" "SetPos" simula-expand-stdproc) ("short" "SHORT" simula-expand-keyword) ("sign" "Sign" simula-expand-stdproc) ("simset" "SimSet" simula-expand-stdproc) ("simulaid" "SimulaId" simula-expand-stdproc) ("simulation" "Simulation" simula-expand-stdproc) ("sin" "Sin" simula-expand-stdproc) ("sinh" "SinH" simula-expand-stdproc) ("sourceline" "SourceLine" simula-expand-stdproc) ("spacing" "Spacing" simula-expand-stdproc) ("sqrt" "Sqrt" simula-expand-stdproc) ("start" "Start" simula-expand-stdproc) ("step" "STEP" simula-expand-keyword) ("strip" "Strip" simula-expand-stdproc) ("sub" "Sub" simula-expand-stdproc) ("subepsilon" "SubEpsilon" simula-expand-stdproc) ("suc" "Suc" simula-expand-stdproc) ("switch" "SWITCH" simula-expand-keyword) ("sysin" "SysIn" simula-expand-stdproc) ("sysout" "SysOut" simula-expand-stdproc) ("tan" "Tan" simula-expand-stdproc) ("tanh" "TanH" simula-expand-stdproc) ("terminate_program" "Terminate_Program" simula-expand-stdproc) ("terminated" "Terminated" simula-expand-stdproc) ("text" "TEXT" simula-expand-keyword) ("then" "THEN" simula-electric-keyword) ("this" "THIS" simula-expand-keyword) ("time" "Time" simula-expand-stdproc) ("to" "TO" simula-expand-keyword) ("true" "TRUE" simula-expand-keyword) ("uniform" "Uniform" simula-expand-stdproc) ("unlock" "Unlock" simula-expand-stdproc) ("until" "UNTIL" simula-expand-keyword) ("upcase" "Upcase" simula-expand-stdproc) ("upperbound" "UpperBound" simula-expand-stdproc) ("value" "VALUE" simula-expand-keyword) ("virtual" "VIRTUAL" simula-expand-keyword) ("wait" "Wait" simula-expand-stdproc) ("when" "WHEN" simula-electric-keyword) ("while" "WHILE" simula-expand-keyword))] 3 (#$ . 26594) nil]) (byte-code "!! \"$\n LJ" [fboundp hilit-set-mode-patterns boundp hilit-patterns-alist assoc simula-mode (("^%\\([ \f].*\\)?$" nil comment) ("^%include\\>" nil include) ("\"[^\"\n]*\"\\|'.'\\|'![0-9]+!'" nil string) ("\\<\\(ACTIVATE\\|AFTER\\|AND\\|ARRAY\\|AT\\|BEFORE\\|BEGIN\\|BOOLEAN\\|CHARACTER\\|CLASS\\|DELAY\\|DO\\|ELSE\\|END\\|EQ\\|EQV\\|EXTERNAL\\|FALSE\\|FOR\\|GE\\|GO\\|GOTO\\|GT\\|HIDDEN\\|IF\\|IMP\\|IN\\|INNER\\|INSPECT\\|INTEGER\\|IS\\|LABEL\\|LE\\|LONG\\|LT\\|NAME\\|NE\\|NEW\\|NONE\\|NOT\\|NOTEXT\\|OR\\|OTHERWISE\\|PRIOR\\|PROCEDURE\\|PROTECTED\\|QUA\\|REACTIVATE\\|REAL\\|REF\\|SHORT\\|STEP\\|SWITCH\\|TEXT\\|THEN\\|THIS\\|TO\\|TRUE\\|UNTIL\\|VALUE\\|VIRTUAL\\|WHEN\\|WHILE\\)\\>" nil keyword) ("!\\|\\" ";" comment)) nil case-insensitive -1 simula-find-comment-point simula-find-comment-context] 5) #@63 Return region (start end) cons of comment after point, or NIL (defalias 'simula-find-next-comment-region #[(param) " `=`  >`L#Lh\n>2`K\n>@`K\n=K`) =[#s =gys =sd#\ny` ` \n B*" [nil end start simula-find-comment-point simula-context simula-find-comment-context (0 1 2) re-search-forward "\\\\|!\\|\"\\|'\\|^%\\|\\" move previous-char (100 68) 2 (116 84 33) 0 37 search-forward ";" 1 ";\\|\\\\|\\\\|\\\\|\\\\" -1] 5 (#$ . 37283)]) (byte-code "!\nM" [fboundp save-match-data (macro . #[(&rest body) "!\nDCB\nDEE)" [make-symbol "match-data" original let (match-data) unwind-protect progn body store-match-data] 6 "Execute the BODY forms, restoring the global value of the match data."])] 2) #@58 Address accepting submission of simula-mode bug reports. (defconst simula-mode-help-address "simula-mode@ifi.uio.no" (#$ . 38137)) #@46 Submit via mail a bug report on simula-mode. (defalias 'simula-submit-bug-report #[nil "!!!! Pӯ\f#" [y-or-n-p "Do you want to submit a report on simula-mode? " require reporter reporter-submit-bug-report simula-mode-help-address "simula-mode from Emacs " emacs-version simula-emacs-features simula-indent-level simula-substatement-offset simula-continued-statement-offset simula-label-offset simula-if-indent simula-inspect-indent simula-electric-indent simula-abbrev-keyword simula-abbrev-stdproc simula-abbrev-file simula-tab-always-indent] 15 (#$ . 38274) nil]) (provide (quote simula-mode))