diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-10-07 10:10:07 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-10-07 10:10:07 +0000 |
commit | e140f07b1b031708b9a8e274e6497b32bbf77120 (patch) | |
tree | 83628f5854e61bc22ed2d259192314c5c63a26e5 /lisp/progmodes/pascal.el | |
parent | 66a4cda55cc9cb64f1b1dafa892555b74815f965 (diff) | |
download | emacs-e140f07b1b031708b9a8e274e6497b32bbf77120.tar.gz |
(pascal-font-lock-keywords): New variable.
(pascal-mode): Set comment-start-skip and comment-end.
Set font-lock-keywords locally.
Diffstat (limited to 'lisp/progmodes/pascal.el')
-rw-r--r-- | lisp/progmodes/pascal.el | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index bdc2cb689ba..8a26c65ccc9 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el @@ -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 @@ no args, if that value is non-nil." (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)) |