Mercurial > emacs
changeset 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 | 17dfca2d42e2 |
children | c9b5541ec9f5 |
files | lisp/progmodes/pascal.el |
diffstat | 1 files changed, 27 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/pascal.el Fri Oct 07 10:08:48 1994 +0000 +++ b/lisp/progmodes/pascal.el Fri Oct 07 10:10:07 1994 +0000 @@ -146,6 +146,27 @@ (modify-syntax-entry ?_ "w" pascal-mode-syntax-table) (modify-syntax-entry ?\' "\"" pascal-mode-syntax-table)) +(defvar pascal-font-lock-keywords + (list + '("^[ \t]*\\(function\\|pro\\(cedure\\|gram\\)\\)\\>[ \t]*\\(\\sw+\\)?" + (1 font-lock-keyword-face) (3 font-lock-function-name-face nil t)) +; ("type" "const" "real" "integer" "char" "boolean" "var" +; "record" "array" "file") + (cons (concat "\\<\\(array\\|boolean\\|c\\(har\\|onst\\)\\|file\\|" + "integer\\|re\\(al\\|cord\\)\\|type\\|var\\)\\>") + 'font-lock-type-face) + '("\\<\\(label\\|external\\|forward\\)\\>" . font-lock-reference-face) + '("\\<\\([0-9]+\\)[ \t]*:" 1 font-lock-reference-face) +; ("of" "to" "for" "if" "then" "else" "case" "while" +; "do" "until" "and" "or" "not" "in" "with" "repeat" "begin" "end") + (concat "\\<\\(" + "and\\|begin\\|case\\|do\\|e\\(lse\\|nd\\)\\|for\\|i[fn]\\|" + "not\\|o[fr]\\|repeat\\|t\\(hen\\|o\\)\\|until\\|w\\(hile\\|ith\\)" + "\\)\\>") + '("\\<\\(goto\\)\\>[ \t]*\\([0-9]+\\)?" + (1 font-lock-keyword-face) (2 font-lock-reference-face nil t))) + "Additional expressions to highlight in Pascal mode.") + (defvar pascal-indent-level 3 "*Indentation of Pascal statements with respect to containing block.") @@ -297,6 +318,12 @@ (setq parse-sexp-ignore-comments t) (make-local-variable 'case-fold-search) (setq case-fold-search t) + (make-local-variable 'comment-start-skip) + (setq comment-start-skip "(\\*+ *\\|{ *") + (make-local-variable 'comment-end) + (setq comment-end "}") + (make-local-variable 'font-lock-keywords) + (setq font-lock-keywords pascal-font-lock-keywords) (run-hooks 'pascal-mode-hook))