-
Notifications
You must be signed in to change notification settings - Fork 5
/
shampoo-faces.el
53 lines (45 loc) · 1.6 KB
/
shampoo-faces.el
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
;;; shampoo-faces.el --- Shampoo custom faces
;;
;; Copyright (C) 2010 - 2012 Dmitry Matveev <[email protected]>
;;
;; This software is released under terms of the MIT license,
;; please refer to the LICENSE file for details.
(defface shampoo-selected-list-item
'((((class color) (min-colors 88))
:background "royal blue" :foreground "white")
(((class color) (min-colors 8))
:background "blue" :foreground "white")
(((type tty) (class mono))
:inverse-video t)
(t :background "gray"))
"Selected list item face"
:group 'basic-faces)
(defface shampoo-smalltalk-version
'((((class color) (min-colors 88) (background light))
:foreground "dark green")
(((class color) (min-colors 88) (background dark))
:foreground "pale green")
(((class color) (min-colors 8))
:foreground "magenta"))
"Smalltalk system version face"
:group 'basic-faces)
(defface shampoo-method-name
'((((background light))
:foreground "black" :weight black)
(((background dark))
:foreground "white" :weight black))
"Smalltalk system version face"
:group 'basic-faces)
(defun shampoo-set-line-face (facename)
(let ((buffer-read-only nil))
(add-text-properties (line-beginning-position)
(line-end-position)
`(face ,facename))))
(defun shampoo-set-str-face (str facename)
(add-text-properties 0 (length str) `(face ,facename) str)
str)
(defun shampoo-reset-buffer-faces ()
(let ((buffer-read-only nil))
(remove-text-properties (point-min) (point-max) `(face nil))))
(provide 'shampoo-faces)
;;; shampoo-faces.el ends here.