emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/dcl-mode.el


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/dcl-mode.el
Date: Fri, 04 Apr 2003 01:22:50 -0500

Index: emacs/lisp/progmodes/dcl-mode.el
diff -c emacs/lisp/progmodes/dcl-mode.el:1.10 
emacs/lisp/progmodes/dcl-mode.el:1.11
*** emacs/lisp/progmodes/dcl-mode.el:1.10       Tue Feb  4 08:24:34 2003
--- emacs/lisp/progmodes/dcl-mode.el    Thu Mar  6 18:10:12 2003
***************
*** 51,56 ****
--- 51,57 ----
  ;;
  ;;
  ;; 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,76 ****
--- 72,97 ----
  
  ;;; *** 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,572 ****
  $           endloop1: ! This matches dcl-block-end-regexp
  $       endif
  $
! "
    (interactive)
    (kill-all-local-variables)
    (set-syntax-table dcl-mode-syntax-table)
--- 587,596 ----
  $           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)
***************
*** 608,613 ****
--- 632,641 ----
    (make-local-variable 'dcl-calc-command-indent-function)
    (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")




reply via email to

[Prev in Thread] Current Thread [Next in Thread]