Mercurial > emacs
annotate test/indent/modula2.mod @ 112447:bcecab2ad22d
* nsterm.m (x_set_offset): Set dont_constrain to 0 so the call to
setFrameTopLeftPoint is constrained.
author | Jan D. <jan.h.d@swipnet.se> |
---|---|
date | Sun, 23 Jan 2011 14:28:14 +0100 |
parents | d9d916379aff |
children |
rev | line source |
---|---|
111498
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
1 (* -*- mode: modula-2; m2-indent:3 -*- *) |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
2 |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
3 IMPLEMENTATION MODULE Indent ; |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
4 |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
5 (* This is (* a nested comment *) *) |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
6 // This is a single-line comment. |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
7 |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
8 FROM SYSTEM IMPORT ADR, TSIZE, SIZE, WORD ; |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
9 |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
10 CONST |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
11 c1 = 2; |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
12 |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
13 TYPE |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
14 t = POINTER TO ARRAY [0..10] OF LONGINT; |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
15 |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
16 VAR x: t; |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
17 y:LONGINT; |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
18 |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
19 |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
20 PROCEDURE f1 (f: File) : INTEGER ; |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
21 VAR |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
22 fd: FileDescriptor ; |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
23 PROCEDURE foo (a:CARDINAL) : INTEGER; |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
24 BEGIN |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
25 END foo; |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
26 BEGIN |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
27 IF f#Error |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
28 THEN |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
29 fd := GetIndice(FileInfo, f) ; |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
30 IF fd#NIL THEN |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
31 RETURN( fd^.unixfd ) |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
32 ELSE |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
33 CASE z OF |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
34 1: do1(); |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
35 | 2: do2(); |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
36 toto(x); |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
37 | 3: ; |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
38 | 4: do4(); |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
39 ELSE do5(); |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
40 END ; (* CASE selection *) |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
41 |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
42 END |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
43 END ; |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
44 FormatError1('file %d has not been opened or is out of range\n', f) ; |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
45 RETURN( -1 ) |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
46 END f1 ; |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
47 |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
48 |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
49 BEGIN |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
50 init |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
51 FINALLY |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
52 done |
d9d916379aff
* lisp/progmodes/modula2.el: Use SMIE and skeleton.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
53 END Indent. |