Mercurial > emacs
comparison lisp/progmodes/pascal.el @ 9387:ccd27c6ef48d
(pascal-font-lock-keywords): New variable.
(pascal-mode): Set comment-start-skip and comment-end.
Set font-lock-keywords locally.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 07 Oct 1994 10:10:07 +0000 |
parents | 499bf32bfd9b |
children | ef7c2b4dfee4 |
comparison
equal
deleted
inserted
replaced
9386:17dfca2d42e2 | 9387:ccd27c6ef48d |
---|---|
144 (modify-syntax-entry ?& "." pascal-mode-syntax-table) | 144 (modify-syntax-entry ?& "." pascal-mode-syntax-table) |
145 (modify-syntax-entry ?| "." pascal-mode-syntax-table) | 145 (modify-syntax-entry ?| "." pascal-mode-syntax-table) |
146 (modify-syntax-entry ?_ "w" pascal-mode-syntax-table) | 146 (modify-syntax-entry ?_ "w" pascal-mode-syntax-table) |
147 (modify-syntax-entry ?\' "\"" pascal-mode-syntax-table)) | 147 (modify-syntax-entry ?\' "\"" pascal-mode-syntax-table)) |
148 | 148 |
149 (defvar pascal-font-lock-keywords | |
150 (list | |
151 '("^[ \t]*\\(function\\|pro\\(cedure\\|gram\\)\\)\\>[ \t]*\\(\\sw+\\)?" | |
152 (1 font-lock-keyword-face) (3 font-lock-function-name-face nil t)) | |
153 ; ("type" "const" "real" "integer" "char" "boolean" "var" | |
154 ; "record" "array" "file") | |
155 (cons (concat "\\<\\(array\\|boolean\\|c\\(har\\|onst\\)\\|file\\|" | |
156 "integer\\|re\\(al\\|cord\\)\\|type\\|var\\)\\>") | |
157 'font-lock-type-face) | |
158 '("\\<\\(label\\|external\\|forward\\)\\>" . font-lock-reference-face) | |
159 '("\\<\\([0-9]+\\)[ \t]*:" 1 font-lock-reference-face) | |
160 ; ("of" "to" "for" "if" "then" "else" "case" "while" | |
161 ; "do" "until" "and" "or" "not" "in" "with" "repeat" "begin" "end") | |
162 (concat "\\<\\(" | |
163 "and\\|begin\\|case\\|do\\|e\\(lse\\|nd\\)\\|for\\|i[fn]\\|" | |
164 "not\\|o[fr]\\|repeat\\|t\\(hen\\|o\\)\\|until\\|w\\(hile\\|ith\\)" | |
165 "\\)\\>") | |
166 '("\\<\\(goto\\)\\>[ \t]*\\([0-9]+\\)?" | |
167 (1 font-lock-keyword-face) (2 font-lock-reference-face nil t))) | |
168 "Additional expressions to highlight in Pascal mode.") | |
169 | |
149 (defvar pascal-indent-level 3 | 170 (defvar pascal-indent-level 3 |
150 "*Indentation of Pascal statements with respect to containing block.") | 171 "*Indentation of Pascal statements with respect to containing block.") |
151 | 172 |
152 (defvar pascal-case-indent 2 | 173 (defvar pascal-case-indent 2 |
153 "*Indentation for case statements.") | 174 "*Indentation for case statements.") |
295 (setq comment-indent-function 'pascal-indent-comment) | 316 (setq comment-indent-function 'pascal-indent-comment) |
296 (make-local-variable 'parse-sexp-ignore-comments) | 317 (make-local-variable 'parse-sexp-ignore-comments) |
297 (setq parse-sexp-ignore-comments t) | 318 (setq parse-sexp-ignore-comments t) |
298 (make-local-variable 'case-fold-search) | 319 (make-local-variable 'case-fold-search) |
299 (setq case-fold-search t) | 320 (setq case-fold-search t) |
321 (make-local-variable 'comment-start-skip) | |
322 (setq comment-start-skip "(\\*+ *\\|{ *") | |
323 (make-local-variable 'comment-end) | |
324 (setq comment-end "}") | |
325 (make-local-variable 'font-lock-keywords) | |
326 (setq font-lock-keywords pascal-font-lock-keywords) | |
300 (run-hooks 'pascal-mode-hook)) | 327 (run-hooks 'pascal-mode-hook)) |
301 | 328 |
302 | 329 |
303 | 330 |
304 ;;; | 331 ;;; |