diff options
author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2003-03-06 23:14:23 +0000 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2003-03-06 23:14:23 +0000 |
commit | 334f206c5639c4247550e05eabe4b8ee255a7453 (patch) | |
tree | fed6700ea9aed5a6e63a92c7492ff6c8d22c1b46 /lisp/progmodes/dcl-mode.el | |
parent | 74ad90d112c39b6f44911b0342706e7f6c11ab6f (diff) | |
download | emacs-334f206c5639c4247550e05eabe4b8ee255a7453.tar.gz emacs-334f206c5639c4247550e05eabe4b8ee255a7453.tar.bz2 emacs-334f206c5639c4247550e05eabe4b8ee255a7453.zip |
(dcl-font-lock-keywords, dcl-font-lock-defaults): New vars.
(dcl-mode): Make and init local var `font-lock-defaults'.
Diffstat (limited to 'lisp/progmodes/dcl-mode.el')
-rw-r--r-- | lisp/progmodes/dcl-mode.el | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index b975b089360..799c47e09fa 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el @@ -51,6 +51,7 @@ ;; ;; ;; Ideas for improvement: +;; * Better font-lock support. ;; * Change meaning of `left margin' when dcl-tab-always-indent is nil. ;; Consider the following line (`_' is the cursor): ;; $ label: _ command @@ -71,6 +72,26 @@ ;;; *** Customization ***************************************************** + +;; First, font lock. This is a minimal approach, please improve! + +(defvar dcl-font-lock-keywords + '(("\\<\\(if\\|then\\|else\\|endif\\)\\>" + 1 font-lock-keyword-face) + ("\\<f[$][a-z]+\\>" + 0 font-lock-builtin-face) + ("[.]\\(eq\\|not\\|or\\|and\\|lt\\|gt\\|le\\|ge\\|eqs\\|nes\\)[.]" + 0 font-lock-builtin-face)) + "Font lock keyword specification for DCL mode. +Presently this includes some syntax, .OP.erators, and \"f$\" lexicals.") + +(defvar dcl-font-lock-defaults + '(dcl-font-lock-keywords nil) + "Font lock specification for DCL mode.") + + +;; Now the rest. + (defgroup dcl nil "Major mode for editing DCL command files." :group 'languages) @@ -566,7 +587,10 @@ Data lines are not indented at all. $ endloop1: ! This matches dcl-block-end-regexp $ endif $ -" + + +There is some minimal font-lock support (see vars +`dcl-font-lock-defaults' and `dcl-font-lock-keywords')." (interactive) (kill-all-local-variables) (set-syntax-table dcl-mode-syntax-table) @@ -609,6 +633,10 @@ $ (make-local-variable 'dcl-calc-cont-indent-function) (make-local-variable 'dcl-electric-reindent-regexps) + ;; font lock + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults dcl-font-lock-defaults) + (setq major-mode 'dcl-mode) (setq mode-name "DCL") (use-local-map dcl-mode-map) |