1;;
2;; Copyright (c) 2003 by The XFree86 Project, Inc.
3;;
4;; Permission is hereby granted, free of charge, to any person obtaining a
5;; copy of this software and associated documentation files (the "Software"),
6;; to deal in the Software without restriction, including without limitation
7;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
8;; and/or sell copies of the Software, and to permit persons to whom the
9;; Software is furnished to do so, subject to the following conditions:
10;;
11;; The above copyright notice and this permission notice shall be included in
12;; all copies or substantial portions of the Software.
13;;
14;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
18;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
19;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20;; SOFTWARE.
21;;
22;; Except as contained in this notice, the name of the XFree86 Project shall
23;; not be used in advertising or otherwise to promote the sale, use or other
24;; dealings in this Software without prior written authorization from the
25;; XFree86 Project.
26;;
27;; Author: Paulo César Pereira de Andrade
28;;
29;;
30;; $XFree86: xc/programs/xedit/lisp/modules/progmodes/xlog.lsp,v 1.1 2003/01/16 06:25:51 paulo Exp $
31;;
32
33(require "syntax")
34(in-package "XEDIT")
35
36(defsynprop *prop-xlog-probe*
37    "xlog-probe"
38    :font	"*courier-medium-r*-12-*"
39    :background	"rgb:c/f/c")
40
41(defsynprop *prop-xlog-config*
42    "xlog-config"
43    :font	"*courier-medium-r*-12-*"
44    :background	"rgb:c/e/f")
45
46(defsynprop *prop-xlog-default*
47    "xlog-default"
48    :font	"*courier-medium-r*-12-*"
49    :background	"rgb:e/c/f")
50
51(defsynprop *prop-xlog-warning*
52    "xlog-warning"
53    :font	"*courier-bold-r*-12-*"
54    :foreground	"Red4"
55    :background	"Yellow1"
56)
57
58(defsynprop *prop-xlog-error*
59    "xlog-error"
60    :font	"*courier-bold-r*-12-*"
61    :foreground	"Yellow2"
62    :background	"Red3"
63)
64
65(defsyntax *xlog-mode* :main nil nil nil
66    ;; highlight version
67    (syntoken "^XFree86 Version \\S+" :property *prop-annotation*)
68
69    ;; release date
70    (syntoken "^Release Date: " :property *prop-keyword* :begin :note)
71
72    ;; highlight operating system description
73    (syntoken "^Build Operating System: " :property *prop-keyword* :begin :note)
74
75    (syntable :note *prop-annotation* nil (syntoken "$" :switch -1))
76
77    ;; don't highlight info lines
78    (syntoken "^\\(II\\) " :property *prop-keyword*)
79
80    ;; default lines
81    (syntoken "^\\(==\\) " :property *prop-keyword* :begin :default)
82    (syntable :default *prop-xlog-default* nil (syntoken "$" :switch -1))
83
84    ;; probe lines
85    (syntoken "^\\(--\\) " :property *prop-keyword* :begin :probe)
86    (syntable :probe *prop-xlog-probe* nil (syntoken "$" :switch -1))
87
88    ;; config lines
89    (syntoken "^\\(\\*\\*\\) " :property *prop-keyword* :begin :config)
90    (syntable :config *prop-xlog-config* nil (syntoken "$" :switch -1))
91
92    ;; warnings
93    (syntoken "^\\(WW\\) " :property *prop-keyword* :begin :warning)
94    (syntable :warning *prop-xlog-warning* nil (syntoken "$" :switch -1))
95
96    ;; errors
97    (syntoken "^\\(EE\\) " :property *prop-keyword* :begin :error)
98    (syntable :error *prop-xlog-error* nil (syntoken "$" :switch -1))
99
100    ;; command line and "uncommon" messages
101    (syntoken "^\\(..\\) " :property *prop-control* :begin :warning)
102)
103