help-gnu-emacs
[Top][All Lists]
Advanced

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

How to make a new mode based on c++-mode


From: Helfer Thomas
Subject: How to make a new mode based on c++-mode
Date: Fri, 01 Dec 2006 22:15:28 +0100

following awk.el i have tried the following :

;;; -*-emacs-lisp-*-
;;; castfront.el --- ELisp package for making castfront related stuff
easier.

(provide 'castfront)

(defconst castfront-keywords
  (list
   (list
    "\\(@\\(Coef\\)\\)\\>"
    '(0 font-lock-warning-face prepend))
   ))

;;;###autoload
(define-derived-mode castfront-mode c++-mode "CASTFRONT"
  "Major mode for editing castfront code."
  (setq font-lock-defaults '(castfront-keywords)))

This make @Coef to be highlighted by not standard c++-keywords. What I
am doing wrong ?

Sincerly,

Helfer Thomas





reply via email to

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