Lines Matching +defs:hpf +defs:mode +defs:version
11 (defconst hpf-mode-version "0.1"
14 (defgroup hpf nil
15 "Major mode for editing (heterogeneous) HPF specifications."
17 :prefix "hpf-")
19 (defvar hpf-mode-hook nil)
20 (defvar hpf-mode-map (let ((keymap (make-keymap)))
23 "Keymap for HPF major mode")
26 (defvar hpf-running-xemacs
27 (string-match "Lucid\\|XEmacs" emacs-version)
31 ;; Syntax table for HPF major mode
32 (defvar hpf-mode-syntax-table nil
33 "Syntax table for HPF mode.")
35 (if hpf-mode-syntax-table
49 (setq hpf-mode-syntax-table table))
52 ;; Various mode variables.
53 (defun hpf-vars ()
67 (defface hpf-black-komma-face
72 (defface hpf-blue-komma-face
77 (defvar hpf-black-komma-face 'hpf-black-komma-face
80 (defvar hpf-annotation-face 'hpf-annotation-face
81 "HPF mode face for Annotations")
82 (setq hpf-annotation-face 'font-lock-constant-face)
84 (defvar hpf-name-face 'hpf-name-face)
85 (setq hpf-name-face 'font-lock-variable-name-face)
87 (defvar hpf-keyword-face 'hpf-keyword-face)
88 (setq hpf-keyword-face 'font-lock-keyword-face)
90 (defvar hpf-library-name-face 'hpf-library-name-face)
91 (setq hpf-library-name-face 'font-lock-type-face)
93 (defvar hpf-builtin-face 'hpf-builtin-face)
94 (setq hpf-builtin-face 'font-lock-builtin-face)
96 (defvar hpf-comment-face 'hpf-comment-face)
97 (setq hpf-comment-face 'font-lock-comment-face)
99 (defvar hpf-other-name-face 'hpf-other-name-face)
101 (setq hpf-other-name-face 'hpf-blue-komma-face)
102 (setq hpf-other-name-face 'font-lock-function-name-face)
105 (defvar hpf-string-char-face 'hpf-string-char-face)
106 (setq hpf-string-char-face 'font-lock-string-face)
119 (defconst hpf-font-lock-specialcomment
121 '("#.*$" (0 (symbol-value 'hpf-comment-face) keep t)))
124 (defconst hpf-font-lock-keywords
125 (append hpf-font-lock-specialcomment
130 (2 (symbol-value 'hpf-keyword-face) keep t))
133 (2 (symbol-value 'hpf-keyword-face) keep t))
136 (2 (symbol-value 'hpf-keyword-face) keep t)
137 (3 (symbol-value 'hpf-other-name-face) keep t)
138 (5 (symbol-value 'hpf-other-name-face) keep t)
139 (7 (symbol-value 'hpf-other-name-face) keep t))
143 (defconst hpf-font-lock-idname
144 (append hpf-font-lock-keywords
148 (2 (symbol-value 'hpf-library-name-face) keep t))
153 (2 (symbol-value 'hpf-other-name-face) keep t))
156 (3 (symbol-value 'hpf-builtin-face) keep t))
159 (3 (symbol-value 'hpf-other-name-face) keep t))
163 (defconst hpf-font-lock-string
164 (append hpf-font-lock-idname
166 (0 (symbol-value 'hpf-string-char-face) keep t))
171 ;; (defvar hpf-font-lock-syntax-highligthing hpf-font-lock-keywords
172 (defvar hpf-font-lock-syntax-highligthing (symbol-value 'hpf-font-lock-string)
173 "Default syntax highlighting level in HPF mode")
176 ;; hpf major mode setup
177 ;; Definition of HPF major mode
178 (defun hpf-mode ()
179 "Major mode for editing HPF models"
181 (hpf-vars)
182 (setq major-mode 'hpf-mode)
183 (setq mode-name "HPF")
185 (use-local-map hpf-mode-map)
187 (set-syntax-table hpf-mode-syntax-table)
188 ;; (hpf-create-syntax-table)
192 '(hpf-font-lock-syntax-highligthing))
197 (run-hooks 'hpf-mode-hook)
199 (provide 'hpf-mode)
201 ;; HPF-mode ends here