1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 (%include e-macros)
27
28 (declare (special fill-column comment-column comment-prefix fill-prefix
29 compiler compile-options mode-identification))
30
31 (defvar alm-mode-hook nil)
32
33 (defun alm-mode ()
34 (register-local-var 'compiler)
35 (register-local-var 'compile-options)
36 (register-local-var 'mode-identification)
37 (setq current-buffer-mode 'ALM compiler 'alm compile-options ""
38 mode-identification -3)
39 (setq comment-column 40. comment-prefix "")
40 (negate-minor-mode 'electric)
41 (set-key 'ESC-^C 'compile-buffer)
42 (if alm-mode-hook (errset (funcall alm-mode-hook))))
43
44 (defun electric-alm-mode ()
45 (alm-mode)
46 (setq fill-prefix TAB)
47 (set-key ': 'alm-label-hacker)
48 (set-key '^M 'nl-nb-line)
49 (assert-minor-mode 'electric))
50
51 (defun nl-nb-line ()
52 (and (eolp)(delete-white-sides))
53 (new-line))
54
55 (defun alm-label-hacker ()
56 (save-excursion
57 (go-to-beginning-of-line)
58 (if (at-white-char)(delete-white-sides)))
59 (insert-string ":")
60 (format-to-col 10.))
61