77 |
will have the car of the list extra indentation with respect to |
will have the car of the list extra indentation with respect to |
78 |
the previous line of the statement.") |
the previous line of the statement.") |
79 |
|
|
80 |
(defcustom simula-continued-statement-offset |
(defcustom simula-continued-statement-offset |
81 |
simula-continued-statement-offset-default |
simula-continued-statement-offset-default |
82 |
"*Extra indentation for lines not starting a statement or substatement. |
"*Extra indentation for lines not starting a statement or substatement. |
83 |
If value is a list, each line in a multipleline continued statement |
If value is a list, each line in a multipleline continued statement |
201 |
"spect\\)\\)\\|l\\([et]\\|abel\\)\\|n\\(ew?\\|ot\\)\\|" |
"spect\\)\\)\\|l\\([et]\\|abel\\)\\|n\\(ew?\\|ot\\)\\|" |
202 |
"o\\(r\\|therwise\\)\\|pr\\(ior\\|otected\\)\\|qua\\|" |
"o\\(r\\|therwise\\)\\|pr\\(ior\\|otected\\)\\|qua\\|" |
203 |
"reactivate\\|s\\(tep\\|witch\\)\\|t\\(h\\(en\\|is\\)\\|o\\)\\|" |
"reactivate\\|s\\(tep\\|witch\\)\\|t\\(h\\(en\\|is\\)\\|o\\)\\|" |
204 |
"until\\|virtual\\|wh\\(en\\|ile\\)" |
"until\\|virtual\\|wh\\(en\\|ile\\)" |
205 |
"\\)\\>") |
"\\)\\>") |
206 |
;; |
;; |
207 |
;; Types. |
;; Types. |
496 |
(simula-indent-line)) |
(simula-indent-line)) |
497 |
(forward-line 1))) |
(forward-line 1))) |
498 |
(and end (set-marker end nil)))))) |
(and end (set-marker end nil)))))) |
499 |
|
|
500 |
|
|
501 |
(defun simula-indent-line () |
(defun simula-indent-line () |
502 |
"Indent this line as SIMULA code. |
"Indent this line as SIMULA code. |
728 |
(delete-horizontal-space) |
(delete-horizontal-space) |
729 |
(indent-to amount))) |
(indent-to amount))) |
730 |
(goto-char (- (point-max) origin))))) |
(goto-char (- (point-max) origin))))) |
731 |
|
|
732 |
|
|
733 |
(defun simula-backward-up-level (count) |
(defun simula-backward-up-level (count) |
734 |
"Move backward up COUNT block levels. |
"Move backward up COUNT block levels. |
797 |
(goto-char origin) |
(goto-char origin) |
798 |
(signal 'quit nil)))))) |
(signal 'quit nil)))))) |
799 |
|
|
800 |
|
|
801 |
(defun simula-previous-statement (count) |
(defun simula-previous-statement (count) |
802 |
"Move backward COUNT statements. |
"Move backward COUNT statements. |
803 |
If COUNT is negative, move forward instead." |
If COUNT is negative, move forward instead." |
808 |
(case-fold-search t) |
(case-fold-search t) |
809 |
(origin (point))) |
(origin (point))) |
810 |
(condition-case () |
(condition-case () |
811 |
;; |
;; |
812 |
(progn |
(progn |
813 |
(simula-skip-comment-backward) |
(simula-skip-comment-backward) |
814 |
(if (memq (preceding-char) '(?n ?N)) |
(if (memq (preceding-char) '(?n ?N)) |
1104 |
;; (at or before comment or label) |
;; (at or before comment or label) |
1105 |
;; temp = t means finished |
;; temp = t means finished |
1106 |
(setq temp |
(setq temp |
1107 |
(and (not (simula-context)) |
(and (not (simula-context)) |
1108 |
(save-excursion |
(save-excursion |
1109 |
(skip-chars-forward " \t\f") |
(skip-chars-forward " \t\f") |
1110 |
(or (looking-at "virtual") |
(or (looking-at "virtual") |
1443 |
nil |
nil |
1444 |
(signal 'search-failed (list regexp)))))) |
(signal 'search-failed (list regexp)))))) |
1445 |
|
|
1446 |
|
|
1447 |
(defun simula-install-standard-abbrevs () |
(defun simula-install-standard-abbrevs () |
1448 |
"Define Simula keywords, procedures and classes in local abbrev table." |
"Define Simula keywords, procedures and classes in local abbrev table." |
1449 |
;; procedure and class names are as of the SIMULA 87 standard. |
;; procedure and class names are as of the SIMULA 87 standard. |