comparison lisp/diff-mode.el @ 63197:ce2a9eb0ff8a

Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-368 Remove "-face" suffix from diff-mode faces 2005-06-10 Miles Bader <miles@gnu.org> * lisp/diff-mode.el (diff-header, diff-file-header, diff-index) (diff-hunk-header, diff-removed, diff-added, diff-changed) (diff-function, diff-context, diff-nonexistent): Remove "-face" suffix from face names. (diff-header-face, diff-file-header-face, diff-index-face) (diff-hunk-header-face, diff-removed-face, diff-added-face) (diff-changed-face, diff-function-face, diff-context-face) (diff-nonexistent-face): New backward-compatibility aliases for renamed faces. (diff-header-face, diff-file-header-face) (diff-index, diff-index-face, diff-hunk-header) (diff-hunk-header-face, diff-removed, diff-removed-face) (diff-added, diff-added-face, diff-changed-face, diff-function) (diff-function-face, diff-context-face, diff-nonexistent) (diff-nonexistent-face): Use renamed diff-mode faces.
author Miles Bader <miles@gnu.org>
date Fri, 10 Jun 2005 07:43:31 +0000
parents c2487fe1ca34
children 3ed17f92f3c9
comparison
equal deleted inserted replaced
63196:72620d384ae2 63197:ce2a9eb0ff8a
173 173
174 ;;;; 174 ;;;;
175 ;;;; font-lock support 175 ;;;; font-lock support
176 ;;;; 176 ;;;;
177 177
178 (defface diff-header-face 178 (defface diff-header
179 '((((class color) (min-colors 88) (background light)) 179 '((((class color) (min-colors 88) (background light))
180 :background "grey85") 180 :background "grey85")
181 (((class color) (min-colors 88) (background dark)) 181 (((class color) (min-colors 88) (background dark))
182 :background "grey45") 182 :background "grey45")
183 (((class color) (background light)) 183 (((class color) (background light))
185 (((class color) (background dark)) 185 (((class color) (background dark))
186 :foreground "green" :weight bold) 186 :foreground "green" :weight bold)
187 (t :weight bold)) 187 (t :weight bold))
188 "`diff-mode' face inherited by hunk and index header faces." 188 "`diff-mode' face inherited by hunk and index header faces."
189 :group 'diff-mode) 189 :group 'diff-mode)
190 (defvar diff-header-face 'diff-header-face) 190 ;; backward-compatibility alias
191 191 (put 'diff-header-face 'face-alias 'diff-header)
192 (defface diff-file-header-face 192 (defvar diff-header-face 'diff-header)
193
194 (defface diff-file-header
193 '((((class color) (min-colors 88) (background light)) 195 '((((class color) (min-colors 88) (background light))
194 :background "grey70" :weight bold) 196 :background "grey70" :weight bold)
195 (((class color) (min-colors 88) (background dark)) 197 (((class color) (min-colors 88) (background dark))
196 :background "grey60" :weight bold) 198 :background "grey60" :weight bold)
197 (((class color) (background light)) 199 (((class color) (background light))
199 (((class color) (background dark)) 201 (((class color) (background dark))
200 :foreground "cyan" :weight bold) 202 :foreground "cyan" :weight bold)
201 (t :weight bold)) ; :height 1.3 203 (t :weight bold)) ; :height 1.3
202 "`diff-mode' face used to highlight file header lines." 204 "`diff-mode' face used to highlight file header lines."
203 :group 'diff-mode) 205 :group 'diff-mode)
204 (defvar diff-file-header-face 'diff-file-header-face) 206 ;; backward-compatibility alias
205 207 (put 'diff-file-header-face 'face-alias 'diff-file-header)
206 (defface diff-index-face 208 (defvar diff-file-header-face 'diff-file-header)
207 '((t :inherit diff-file-header-face)) 209
210 (defface diff-index
211 '((t :inherit diff-file-header))
208 "`diff-mode' face used to highlight index header lines." 212 "`diff-mode' face used to highlight index header lines."
209 :group 'diff-mode) 213 :group 'diff-mode)
210 (defvar diff-index-face 'diff-index-face) 214 ;; backward-compatibility alias
211 215 (put 'diff-index-face 'face-alias 'diff-index)
212 (defface diff-hunk-header-face 216 (defvar diff-index-face 'diff-index)
213 '((t :inherit diff-header-face)) 217
218 (defface diff-hunk-header
219 '((t :inherit diff-header))
214 "`diff-mode' face used to highlight hunk header lines." 220 "`diff-mode' face used to highlight hunk header lines."
215 :group 'diff-mode) 221 :group 'diff-mode)
216 (defvar diff-hunk-header-face 'diff-hunk-header-face) 222 ;; backward-compatibility alias
217 223 (put 'diff-hunk-header-face 'face-alias 'diff-hunk-header)
218 (defface diff-removed-face 224 (defvar diff-hunk-header-face 'diff-hunk-header)
219 '((t :inherit diff-changed-face)) 225
226 (defface diff-removed
227 '((t :inherit diff-changed))
220 "`diff-mode' face used to highlight removed lines." 228 "`diff-mode' face used to highlight removed lines."
221 :group 'diff-mode) 229 :group 'diff-mode)
222 (defvar diff-removed-face 'diff-removed-face) 230 ;; backward-compatibility alias
223 231 (put 'diff-removed-face 'face-alias 'diff-removed)
224 (defface diff-added-face 232 (defvar diff-removed-face 'diff-removed)
225 '((t :inherit diff-changed-face)) 233
234 (defface diff-added
235 '((t :inherit diff-changed))
226 "`diff-mode' face used to highlight added lines." 236 "`diff-mode' face used to highlight added lines."
227 :group 'diff-mode) 237 :group 'diff-mode)
228 (defvar diff-added-face 'diff-added-face) 238 ;; backward-compatibility alias
229 239 (put 'diff-added-face 'face-alias 'diff-added)
230 (defface diff-changed-face 240 (defvar diff-added-face 'diff-added)
241
242 (defface diff-changed
231 '((((type tty pc) (class color) (background light)) 243 '((((type tty pc) (class color) (background light))
232 :foreground "magenta" :weight bold :slant italic) 244 :foreground "magenta" :weight bold :slant italic)
233 (((type tty pc) (class color) (background dark)) 245 (((type tty pc) (class color) (background dark))
234 :foreground "yellow" :weight bold :slant italic)) 246 :foreground "yellow" :weight bold :slant italic))
235 "`diff-mode' face used to highlight changed lines." 247 "`diff-mode' face used to highlight changed lines."
236 :group 'diff-mode) 248 :group 'diff-mode)
237 (defvar diff-changed-face 'diff-changed-face) 249 ;; backward-compatibility alias
238 250 (put 'diff-changed-face 'face-alias 'diff-changed)
239 (defface diff-function-face 251 (defvar diff-changed-face 'diff-changed)
240 '((t :inherit diff-context-face)) 252
253 (defface diff-function
254 '((t :inherit diff-context))
241 "`diff-mode' face used to highlight function names produced by \"diff -p\"." 255 "`diff-mode' face used to highlight function names produced by \"diff -p\"."
242 :group 'diff-mode) 256 :group 'diff-mode)
243 (defvar diff-function-face 'diff-function-face) 257 ;; backward-compatibility alias
244 258 (put 'diff-function-face 'face-alias 'diff-function)
245 (defface diff-context-face 259 (defvar diff-function-face 'diff-function)
260
261 (defface diff-context
246 '((t :inherit shadow)) 262 '((t :inherit shadow))
247 "`diff-mode' face used to highlight context and other side-information." 263 "`diff-mode' face used to highlight context and other side-information."
248 :group 'diff-mode) 264 :group 'diff-mode)
249 (defvar diff-context-face 'diff-context-face) 265 ;; backward-compatibility alias
250 266 (put 'diff-context-face 'face-alias 'diff-context)
251 (defface diff-nonexistent-face 267 (defvar diff-context-face 'diff-context)
252 '((t :inherit diff-file-header-face)) 268
269 (defface diff-nonexistent
270 '((t :inherit diff-file-header))
253 "`diff-mode' face used to highlight nonexistent files in recursive diffs." 271 "`diff-mode' face used to highlight nonexistent files in recursive diffs."
254 :group 'diff-mode) 272 :group 'diff-mode)
255 (defvar diff-nonexistent-face 'diff-nonexistent-face) 273 ;; backward-compatibility alias
274 (put 'diff-nonexistent-face 'face-alias 'diff-nonexistent)
275 (defvar diff-nonexistent-face 'diff-nonexistent)
256 276
257 (defconst diff-yank-handler '(diff-yank-function)) 277 (defconst diff-yank-handler '(diff-yank-function))
258 (defun diff-yank-function (text) 278 (defun diff-yank-function (text)
259 ;; FIXME: the yank-handler is now called separately on each piece of text 279 ;; FIXME: the yank-handler is now called separately on each piece of text
260 ;; with a yank-handler property, so the next-single-property-change call 280 ;; with a yank-handler property, so the next-single-property-change call