/[packages]/cauldron/magicpoint/current/SOURCES/magicpoint-1.09a-emacs-mode--add-font-lock.patch
ViewVC logotype

Contents of /cauldron/magicpoint/current/SOURCES/magicpoint-1.09a-emacs-mode--add-font-lock.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1370 - (show annotations) (download)
Sat Jan 8 23:21:38 2011 UTC (12 years, 4 months ago) by kharec
File size: 1484 byte(s)
imported package magicpoint
1 --- magicpoint-1.09a/contrib/mgp-mode.el.pix Fri Dec 17 20:21:19 1999
2 +++ magicpoint-1.09a/contrib/mgp-mode.el Sun Oct 7 18:07:18 2001
3 @@ -157,6 +157,17 @@
4 ("^%.*" nil defun)
5 ))))))
6
7 +(defvar mgp-font-lock-keywords
8 + (list
9 + ;; keywords
10 + (cons (concat "^%\\(" (mapconcat 'identity mgp-directives "\\|") "\\)\\b") 0)
11 +
12 + (cons "^%%.*\n" '(0 font-lock-comment-face t))
13 +
14 +; (cons "^%.*" '(1 font-lock-function-name-face))
15 + )
16 + "Additional expressions to highlight in gmp mode.")
17 +
18
19 ;; History
20 (defvar mgp-history nil
21 @@ -183,10 +194,13 @@
22 (if mgp-mode-syntax-table
23 ()
24 (setq mgp-mode-syntax-table (make-syntax-table))
25 - (modify-syntax-entry ?% ". " mgp-mode-syntax-table)
26 - (modify-syntax-entry ?\" ". " mgp-mode-syntax-table)
27 - (modify-syntax-entry ?\\ ". " mgp-mode-syntax-table)
28 - (modify-syntax-entry ?' "w " mgp-mode-syntax-table))
29 +
30 + ;; comment delimiters
31 + (modify-syntax-entry ?\# "<" mgp-mode-syntax-table)
32 + (modify-syntax-entry ?\n ">" mgp-mode-syntax-table)
33 + (modify-syntax-entry ?\% "_ 23" mgp-mode-syntax-table)
34 +
35 + (modify-syntax-entry ?\" "\"" mgp-mode-syntax-table))
36
37 ;; Mode Map
38 (defvar mgp-mode-map nil
39 @@ -260,6 +274,10 @@
40 (make-local-variable 'mgp-page-separator)
41 (make-local-variable 'mgp-emph-color)
42 (make-local-variable 'mgp-emph-color-normal)
43 +
44 + (make-local-variable 'font-lock-defaults)
45 + (setq font-lock-defaults '(mgp-font-lock-keywords))
46 +
47 (run-hooks 'mgp-mode-hook))
48
49

  ViewVC Help
Powered by ViewVC 1.1.28