comparison lisp/progmodes/modula2.el @ 20960:2f9b7d0689a9

Customized.
author Stephen Eglen <stephen@gnu.org>
date Sun, 22 Feb 1998 19:51:45 +0000
parents f3f9df46d008
children 253f761ad37b
comparison
equal deleted inserted replaced
20959:9b831f34ff7d 20960:2f9b7d0689a9
18 ;; for Modula-2 keywords, knows about the standard layout rules, and supports 18 ;; for Modula-2 keywords, knows about the standard layout rules, and supports
19 ;; a native compile command. 19 ;; a native compile command.
20 20
21 ;;; Code: 21 ;;; Code:
22 22
23 (defgroup modula2 nil
24 "Major mode for editing Modula-2 code."
25 :prefix "m2-"
26 :group 'languages)
27
23 ;;; Added by Tom Perrine (TEP) 28 ;;; Added by Tom Perrine (TEP)
24 (defvar m2-mode-syntax-table nil 29 (defvar m2-mode-syntax-table nil
25 "Syntax table in use in Modula-2 buffers.") 30 "Syntax table in use in Modula-2 buffers.")
26 31
27 (defvar m2-compile-command "m2c" 32 (defcustom m2-compile-command "m2c"
28 "Command to compile Modula-2 programs") 33 "Command to compile Modula-2 programs."
29 34 :type 'string
30 (defvar m2-link-command "m2l" 35 :group 'modula2)
31 "Command to link Modula-2 programs") 36
32 37 (defcustom m2-link-command "m2l"
33 (defvar m2-link-name nil 38 "Command to link Modula-2 programs."
34 "Name of the executable.") 39 :type 'string
35 40 :group 'modula2)
36 (defvar m2-end-comment-column nil 41
37 "*Column for aligning the end of a comment, in Modula-2.") 42 (defcustom m2-link-name nil
43 "Name of the Modula-2 executable."
44 :type '(choice (const nil) string)
45 :group 'modula2)
46
47 (defcustom m2-end-comment-column 75
48 "*Column for aligning the end of a comment, in Modula-2."
49 :type 'integer
50 :group 'modula2)
38 51
39 (if m2-mode-syntax-table 52 (if m2-mode-syntax-table
40 () 53 ()
41 (let ((table (make-syntax-table))) 54 (let ((table (make-syntax-table)))
42 (modify-syntax-entry ?\\ "\\" table) 55 (modify-syntax-entry ?\\ "\\" table)
87 (define-key map "\C-c\C-t" 'm2-toggle) 100 (define-key map "\C-c\C-t" 'm2-toggle)
88 (define-key map "\C-c\C-l" 'm2-link) 101 (define-key map "\C-c\C-l" 'm2-link)
89 (define-key map "\C-c\C-c" 'm2-compile) 102 (define-key map "\C-c\C-c" 'm2-compile)
90 (setq m2-mode-map map))) 103 (setq m2-mode-map map)))
91 104
92 (defvar m2-indent 5 "*This variable gives the indentation in Modula-2-Mode") 105 (defcustom m2-indent 5
106 "*This variable gives the indentation in Modula-2-Mode."
107 :type 'integer
108 :group 'modula2)
93 109
94 ;;;###autoload 110 ;;;###autoload
95 (defun modula-2-mode () 111 (defun modula-2-mode ()
96 "This is a mode intended to support program development in Modula-2. 112 "This is a mode intended to support program development in Modula-2.
97 All control constructs of Modula-2 can be reached by typing C-c 113 All control constructs of Modula-2 can be reached by typing C-c
121 (setq major-mode 'modula-2-mode) 137 (setq major-mode 'modula-2-mode)
122 (setq mode-name "Modula-2") 138 (setq mode-name "Modula-2")
123 (make-local-variable 'comment-column) 139 (make-local-variable 'comment-column)
124 (setq comment-column 41) 140 (setq comment-column 41)
125 (make-local-variable 'm2-end-comment-column) 141 (make-local-variable 'm2-end-comment-column)
126 (setq m2-end-comment-column 75)
127 (set-syntax-table m2-mode-syntax-table) 142 (set-syntax-table m2-mode-syntax-table)
128 (make-local-variable 'paragraph-start) 143 (make-local-variable 'paragraph-start)
129 (setq paragraph-start (concat "$\\|" page-delimiter)) 144 (setq paragraph-start (concat "$\\|" page-delimiter))
130 (make-local-variable 'paragraph-separate) 145 (make-local-variable 'paragraph-separate)
131 (setq paragraph-separate paragraph-start) 146 (setq paragraph-separate paragraph-start)