aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-10-07 10:10:07 +0000
committerRichard M. Stallman1994-10-07 10:10:07 +0000
commit210cf16d3191e5f05d805cded4746d70e407e57d (patch)
treeca4adbfa1daf3d6a98f3017b493ac2ff6940270b
parent9e5514777178a45851036be29ec9d03a89854611 (diff)
downloademacs-210cf16d3191e5f05d805cded4746d70e407e57d.tar.gz
emacs-210cf16d3191e5f05d805cded4746d70e407e57d.zip
(pascal-font-lock-keywords): New variable.
(pascal-mode): Set comment-start-skip and comment-end. Set font-lock-keywords locally.
-rw-r--r--lisp/progmodes/pascal.el27
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 @@
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
@@ -297,6 +318,12 @@ no args, if that value is non-nil."
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