-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathmediawiki-faces.el
More file actions
186 lines (157 loc) · 5.67 KB
/
mediawiki-faces.el
File metadata and controls
186 lines (157 loc) · 5.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
;;; mediawiki-faces.el --- Font-lock face definitions for MediaWiki mode -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2025 Mark A. Hershberger
;; Author: Mark A. Hershberger <mah@everybody.org>
;; URL: https://github.com/hexmode/mediawiki-el
;; This file is NOT part of GNU Emacs.
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file contains font-lock face definitions for MediaWiki syntax highlighting.
;; It provides faces for bold, italic, math, verbatim, and other MediaWiki markup elements.
;;; Code:
(require 'mediawiki-core)
;;; Customization Groups
(defgroup font-mediawiki-highlighting-faces nil
"Faces for highlighting MediaWiki markup."
:group 'mediawiki
:prefix "font-mediawiki-")
;;; Face Variables
(defvar font-mediawiki-sedate-face 'font-mediawiki-sedate-face
"Face to use for mediawiki minor keywords.")
(defvar font-mediawiki-italic-face 'font-mediawiki-italic-face
"Face to use for mediawiki italics.")
(defvar font-mediawiki-bold-face 'font-mediawiki-bold-face
"Face to use for mediawiki bolds.")
(defvar font-mediawiki-math-face 'font-mediawiki-math-face
"Face to use for mediawiki math environments.")
(defvar font-mediawiki-string-face 'font-mediawiki-string-face
"Face to use for strings.")
(defvar font-mediawiki-verbatim-face 'font-mediawiki-verbatim-face
"Face to use for text in verbatim macros or environments.")
;;; Face Definitions
(defface font-mediawiki-bold-face
`((((class grayscale) (background light))
:foreground "DimGray"
:weight bold)
(((class grayscale) (background dark))
:foreground "LightGray"
:weight bold)
(((class color) (background light))
:foreground "DarkOliveGreen"
:weight bold)
(((class color) (background dark))
:foreground "OliveDrab"
:weight bold)
(t
:weight bold))
"Face used to highlight text to be typeset in bold."
:group 'font-mediawiki-highlighting-faces)
(defface font-mediawiki-italic-face
`((((class grayscale) (background light))
:foreground "DimGray"
:slant italic)
(((class grayscale) (background dark))
:foreground "LightGray"
:slant italic)
(((class color) (background light))
:foreground "DarkOliveGreen"
:slant italic)
(((class color) (background dark))
:foreground "OliveDrab"
:slant italic)
(t
:slant italic))
"Face used to highlight text to be typeset in italic."
:group 'font-mediawiki-highlighting-faces)
(defface font-mediawiki-math-face
`((((class grayscale) (background light))
:foreground "DimGray"
:underline t)
(((class grayscale) (background dark))
:foreground "LightGray"
:underline t)
(((class color) (background light))
:foreground "SaddleBrown"
:underline t)
(((class color) (background dark))
:foreground "burlywood"
:underline t)
(t
:underline t))
"Face used to highlight math."
:group 'font-mediawiki-highlighting-faces)
(defface font-mediawiki-sedate-face
'((((class grayscale) (background light))
:foreground "DimGray")
(((class grayscale) (background dark))
:foreground "LightGray")
(((class color) (background light))
:foreground "DimGray")
(((class color) (background dark))
:foreground "LightGray"))
"Face used to highlight sedate stuff."
:group 'font-mediawiki-highlighting-faces)
(defface font-mediawiki-string-face
`((((type tty) (class color))
:foreground "green"
:slant italic)
(((class grayscale) (background light))
:foreground "DimGray"
:slant italic)
(((class grayscale) (background dark))
:foreground "LightGray"
:slant italic)
(((class color) (background light))
:foreground "RosyBrown"
:slant italic)
(((class color) (background dark))
:foreground "LightSalmon"
:slant italic)
(t
:slant italic))
"Face used to highlight strings."
:group 'font-mediawiki-highlighting-faces)
(defface font-mediawiki-warning-face
`((((class grayscale)(background light))
:foreground "DimGray"
:weight bold)
(((class grayscale)(background dark))
:foreground "LightGray"
:weight bold)
(((class color)(background light))
:foreground "red"
:weight bold)
(((class color)(background dark))
:foreground "red"
:weight bold)
(t
:weight bold))
"Face for important keywords."
:group 'font-mediawiki-highlighting-faces)
(defface font-mediawiki-verbatim-face
`((((class grayscale) (background light))
:foreground "DimGray"
:inherit fixed-pitch)
(((class grayscale) (background dark))
:foreground "LightGray"
:inherit fixed-pitch)
(((class color) (background light))
:foreground "SaddleBrown"
:inherit fixed-pitch)
(((class color) (background dark))
:foreground "burlywood"
:inherit fixed-pitch)
(t
:inherit fixed-pitch))
"Face used to highlight TeX verbatim environments."
:group 'font-mediawiki-highlighting-faces)
(provide 'mediawiki-faces)
;;; mediawiki-faces.el ends here