Mercurial > hg > xemacs-beta
comparison lisp/modes/simula.el @ 189:489f57a838ef r20-3b21
Import from CVS: tag r20-3b21
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:57:07 +0200 |
parents | 28f395d8dc7a |
children |
comparison
equal
deleted
inserted
replaced
188:e29a8e7498d9 | 189:489f57a838ef |
---|---|
39 | 39 |
40 ;;; Code: | 40 ;;; Code: |
41 | 41 |
42 (provide 'simula-mode) | 42 (provide 'simula-mode) |
43 | 43 |
44 (defconst simula-tab-always-indent nil | 44 (defgroup simula nil |
45 "SIMULA 87 code editing commands for Emacs." | |
46 :group 'languages) | |
47 | |
48 | |
49 (defcustom simula-tab-always-indent nil | |
45 "*Non-nil means TAB in SIMULA mode should always reindent the current line. | 50 "*Non-nil means TAB in SIMULA mode should always reindent the current line. |
46 Otherwise TAB indents only when point is within | 51 Otherwise TAB indents only when point is within |
47 the run of whitespace at the beginning of the line.") | 52 the run of whitespace at the beginning of the line." |
48 | 53 :type 'boolean |
49 (defconst simula-indent-level 3 | 54 :group 'simula) |
50 "*Indentation of SIMULA statements with respect to containing block.") | 55 |
51 | 56 (defcustom simula-indent-level 3 |
52 (defconst simula-substatement-offset 3 | 57 "*Indentation of SIMULA statements with respect to containing block." |
53 "*Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE.") | 58 :type 'integer |
54 | 59 :group 'simula) |
55 (defconst simula-continued-statement-offset 3 | 60 |
61 (defcustom simula-substatement-offset 3 | |
62 "*Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE." | |
63 :type 'integer | |
64 :group 'simula) | |
65 | |
66 (defcustom simula-continued-statement-offset 3 | |
56 "*Extra indentation for lines not starting a statement or substatement. | 67 "*Extra indentation for lines not starting a statement or substatement. |
57 If value is a list, each line in a multipleline continued statement | 68 If value is a list, each line in a multipleline continued statement |
58 will have the car of the list extra indentation with respect to | 69 will have the car of the list extra indentation with respect to |
59 the previous line of the statement.") | 70 the previous line of the statement." |
60 | 71 :type 'integer |
61 (defconst simula-label-offset -4711 | 72 :group 'simula) |
62 "*Offset of SIMULA label lines relative to usual indentation.") | 73 |
63 | 74 (defcustom simula-label-offset -4711 |
64 (defconst simula-if-indent '(0 . 0) | 75 "*Offset of SIMULA label lines relative to usual indentation." |
76 :type 'integer | |
77 :group 'simula) | |
78 | |
79 (defcustom simula-if-indent '(0 . 0) | |
65 "*Extra indentation of THEN and ELSE with respect to the starting IF. | 80 "*Extra indentation of THEN and ELSE with respect to the starting IF. |
66 Value is a cons cell, the car is extra THEN indentation and the cdr | 81 Value is a cons cell, the car is extra THEN indentation and the cdr |
67 extra ELSE indentation. IF after ELSE is indented as the starting IF.") | 82 extra ELSE indentation. IF after ELSE is indented as the starting IF." |
68 | 83 :type '(cons (integer :tag "THEN") |
69 (defconst simula-inspect-indent '(0 . 0) | 84 (integer :tag "ELSE")) |
85 :group 'simula) | |
86 | |
87 (defcustom simula-inspect-indent '(0 . 0) | |
70 "*Extra indentation of WHEN and OTHERWISE with respect to the INSPECT. | 88 "*Extra indentation of WHEN and OTHERWISE with respect to the INSPECT. |
71 Value is a cons cell, the car is extra WHEN indentation | 89 Value is a cons cell, the car is extra WHEN indentation |
72 and the cdr extra OTHERWISE indentation.") | 90 and the cdr extra OTHERWISE indentation." |
73 | 91 :type '(cons (integer :tag "WHEN") |
74 (defconst simula-electric-indent nil | 92 (integer :tag "OTHERWISE")) |
75 "*Non-nil means `simula-indent-line' function may reindent previous line.") | 93 :group 'simula) |
76 | 94 |
77 (defconst simula-abbrev-keyword 'upcase | 95 (defcustom simula-electric-indent nil |
96 "*Non-nil means `simula-indent-line' function may reindent previous line." | |
97 :type 'boolean | |
98 :group 'simula) | |
99 | |
100 (defcustom simula-abbrev-keyword 'upcase | |
78 "*Specify how to convert case for SIMULA keywords. | 101 "*Specify how to convert case for SIMULA keywords. |
79 Value is one of the symbols `upcase', `downcase', `capitalize', | 102 Value is one of the symbols `upcase', `downcase', `capitalize', |
80 \(as in) `abbrev-table' or nil if they should not be changed.") | 103 \(as in) `abbrev-table' or nil if they should not be changed." |
81 | 104 :type '(choice (const upcase) (const downcase) (const capitalize) |
82 (defconst simula-abbrev-stdproc 'abbrev-table | 105 (const abbrev-table) (const nil)) |
106 :group 'simula) | |
107 | |
108 (defcustom simula-abbrev-stdproc 'abbrev-table | |
83 "*Specify how to convert case for standard SIMULA procedure and class names. | 109 "*Specify how to convert case for standard SIMULA procedure and class names. |
84 Value is one of the symbols `upcase', `downcase', `capitalize', | 110 Value is one of the symbols `upcase', `downcase', `capitalize', |
85 \(as in) `abbrev-table', or nil if they should not be changed.") | 111 \(as in) `abbrev-table', or nil if they should not be changed." |
86 | 112 :type '(choice (const upcase) (const downcase) (const capitalize) |
87 (defvar simula-abbrev-file nil | 113 (const abbrev-table) (const nil)) |
114 :group 'simula) | |
115 | |
116 (defcustom simula-abbrev-file nil | |
88 "*File with extra abbrev definitions for use in SIMULA mode. | 117 "*File with extra abbrev definitions for use in SIMULA mode. |
89 These are used together with the standard abbrev definitions for SIMULA. | 118 These are used together with the standard abbrev definitions for SIMULA. |
90 Please note that the standard definitions are required | 119 Please note that the standard definitions are required |
91 for SIMULA mode to function correctly.") | 120 for SIMULA mode to function correctly." |
121 :type '(choice (const :tag "None") | |
122 file) | |
123 :group 'simula) | |
92 | 124 |
93 (defvar simula-mode-syntax-table nil | 125 (defvar simula-mode-syntax-table nil |
94 "Syntax table in SIMULA mode buffers.") | 126 "Syntax table in SIMULA mode buffers.") |
95 | 127 |
96 (if simula-mode-syntax-table | 128 (if simula-mode-syntax-table |