Lines Matching +defs:casl +defs:annotation +defs:face
2 (autoload 'turn-on-casl-indent "casl-indent" "Turn on CASL indentation." t)
12 (defconst casl-mode-version "0.3"
15 (defgroup casl nil
18 :prefix "casl-")
21 (defvar casl-mode-hook nil)
22 (defvar casl-mode-map (let ((keymap (make-keymap)))
23 (define-key keymap "\C-c\C-r" 'casl-run-hets-r)
25 (define-key keymap "\C-c\C-u" 'casl-run-hets-g)
26 (define-key keymap "\C-c\C-c" 'casl-run-hets-g))
27 (define-key keymap "\C-c\C-n" 'casl-compile-goto-next-error)
32 (defvar casl-running-xemacs
38 (defvar casl-mode-syntax-table nil
41 (if casl-mode-syntax-table
74 (setq casl-mode-syntax-table table))
78 (defun casl-vars ()
89 (setq comment-indent-function 'casl-comment-indent)
96 (defun casl-comment-indent ()
103 (defface casl-black-komma-face
108 (defface casl-blue-komma-face
113 (defvar casl-black-komma-face 'casl-black-komma-face
116 (defvar casl-annotation-face 'casl-annotation-face
117 "CASL mode face for Annotations")
118 (setq casl-annotation-face 'font-lock-constant-face)
120 (defvar casl-name-face 'casl-name-face)
121 (setq casl-name-face 'font-lock-variable-name-face)
123 (defvar casl-keyword-face 'casl-keyword-face)
124 (setq casl-keyword-face 'font-lock-keyword-face)
126 (defvar casl-library-name-face 'casl-library-name-face)
127 (setq casl-library-name-face 'font-lock-type-face)
129 (defvar casl-builtin-face 'casl-builtin-face)
130 (setq casl-builtin-face 'font-lock-builtin-face)
132 (defvar casl-comment-face 'casl-comment-face)
133 (setq casl-comment-face 'font-lock-comment-face)
135 (defvar casl-other-name-face 'casl-other-name-face)
137 (setq casl-other-name-face 'casl-blue-komma-face)
138 (setq casl-other-name-face 'font-lock-function-name-face)
141 (defvar casl-string-char-face 'casl-string-char-face)
142 (setq casl-string-char-face 'font-lock-string-face)
155 (defconst casl-font-lock-specialcomment
157 '("%%.*$" (0 (symbol-value 'casl-comment-face) keep t)))
161 (defconst casl-font-lock-annotations
162 (append casl-font-lock-specialcomment
166 (1 (symbol-value 'casl-annotation-face) keep t))
169 (0 (symbol-value 'casl-annotation-face) keep t))
172 (1 (symbol-value 'casl-annotation-face) keep t))
175 (1 (symbol-value 'casl-annotation-face) keep t))
179 (defconst casl-font-lock-keywords
180 (append casl-font-lock-annotations
184 (2 (symbol-value 'casl-keyword-face) keep t))
185 '("[,;.]" (0 (symbol-value 'casl-black-komma-face) t t))
188 (1 (symbol-value 'casl-black-komma-face) keep t))
191 (2 (symbol-value 'casl-builtin-face) keep t))
194 (2 (symbol-value 'casl-library-name-face) keep t)
195 (5 (symbol-value 'casl-library-name-face) keep t))
198 (2 (symbol-value 'casl-name-face) t t))
200 (1 (symbol-value 'casl-library-name-face) keep t))
203 (3 (symbol-value 'casl-name-face) keep t)
204 (5 (symbol-value 'casl-name-face) keep t))
207 (2 (symbol-value 'casl-name-face) keep t)
208 (4 (symbol-value 'casl-name-face) keep t))
211 (1 (symbol-value 'casl-name-face) keep t)
212 (3 (symbol-value 'casl-name-face) keep t)
213 (5 (symbol-value 'casl-name-face) keep t))
216 (2 (symbol-value 'casl-name-face) keep t)
217 (4 (symbol-value 'casl-name-face) keep t))
220 (2 (symbol-value 'casl-other-name-face) keep t))
223 (2 (symbol-value 'casl-other-name-face) keep t)
224 (3 (symbol-value 'casl-other-name-face) keep t))
227 (0 (symbol-value 'casl-other-name-face) keep t))
230 (1 (symbol-value 'casl-other-name-face) keep t)
231 (3 (symbol-value 'casl-other-name-face) keep t)
232 (4 (symbol-value 'casl-other-name-face) keep t)
233 (6 (symbol-value 'casl-other-name-face) keep t))
236 (2 (symbol-value 'casl-other-name-face) keep t)
237 (4 (symbol-value 'casl-other-name-face) keep t)
238 (6 (symbol-value 'casl-other-name-face) keep t))
241 (1 (symbol-value 'casl-other-name-face) keep t))
244 (1 (symbol-value 'casl-other-name-face) keep t))
247 (1 (symbol-value 'casl-other-name-face) keep t))
252 (defconst casl-font-lock-string
253 (append casl-font-lock-keywords
255 (0 (symbol-value 'casl-string-char-face) keep t))
260 ;; (defvar casl-font-lock-syntax-highligthing casl-font-lock-keywords
261 (defvar casl-font-lock-syntax-highligthing (symbol-value 'casl-font-lock-string)
267 (setq casl-error-list nil)
270 (defvar casl-hets-options nil
273 (defun casl-run-hets (&rest opt)
279 (casl-hets-file-name (buffer-file-name))
282 (setq casl-hets-program hets-program)
283 (setq casl-hets-program "hets"))
287 (setq hets-command (concat casl-hets-program run-option casl-hets-file-name))
322 (set-process-sentinel proc 'casl-compilation-sentinel)
323 (set-process-filter proc 'casl-compilation-filter)
329 (defun casl-run-hets-r (&rest opt)
330 "Run hets process with options (from casl-hets-options) to compile the
336 (if casl-hets-options
337 (setq run-option-r casl-hets-options))
343 (casl-run-hets run-option-r)
346 (defun casl-run-hets-g ()
347 "Run hets process with -g and other options (from variable casl-hets-options)
350 (casl-run-hets-r "-g")
355 (defun casl-compilation-sentinel (proc msg)
371 (casl-compilation-handle-exit (process-status proc)
383 (defun casl-compilation-filter (proc string)
401 (defun casl-compilation-handle-exit (process-status exit-status msg)
424 (setq casl-error-list nil)
425 (setq casl-error-list nil)
426 (casl-parse-error)
427 (message "%s errors have been found." (length casl-error-list)))
432 (defun casl-parse-error ()
435 (setq casl-error-list nil)
445 (re-search-backward "\\(\(\\|\\s-+\\)\\([^.]+\\.\\(casl\\|het\\)\\)" nil t 1)
452 (setq casl-error-list
453 (nconc casl-error-list (list (list file-name error-line error-colnum error-window-point))))
457 (defun casl-compile-goto-next-error ()
461 (if (null casl-error-list)
462 (casl-parse-error))
463 (if (null casl-error-list)
467 (let* ((this-error (pop casl-error-list))
489 (setq casl-error-list (nconc casl-error-list (list this-error)))
493 ;; casl major mode setup
495 (defun casl-mode ()
498 (casl-vars)
499 (setq major-mode 'casl-mode)
502 (use-local-map casl-mode-map)
504 (set-syntax-table casl-mode-syntax-table)
505 ;; (casl-create-syntax-table)
509 '(casl-font-lock-syntax-highligthing))
519 'casl-compile-mouse-goto-error)
521 'casl-compile-goto-next-error)))
522 (run-hooks 'casl-mode-hook)
525 (provide 'casl-mode)