forked from ran9er/init.emacs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path09_hl-line.el.bak
41 lines (41 loc) · 1.53 KB
/
09_hl-line.el.bak
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
(require 'hl-line)
;;(hl-line-mode -1)
;;(global-hl-line-mode -1)
;; for hight line mode
(or (facep 'my-hl-line-face) (make-face 'my-hl-line-face))
(setq hl-line-face 'my-hl-line-face)
(face-spec-set 'my-hl-line-face '((t (
:background "DodgerBlue3"
;;:bold
;;:weight nil
:inverse-video nil
))))
(defun wcy-color-theme-adjust-hl-mode-face()
"interactive"
(let* ((color (x-color-values (face-attribute 'default :background))))
(if (null color)
(error "not support.")
(let ((my-color (mapcar
(lambda (x)
(let ((y (/ #XFFFF 4))
(delta #X18FF))
(cond
((< x (* y 1))
(+ x delta))
((< x (* y 2))
(+ x delta))
((< x (* y 3))
(- x delta))
(t
(- x delta)))))
color)))
(message "%S %S" color my-color)
(set-face-attribute
'my-hl-line-face nil
:background
(concat "#"
(mapconcat
(lambda (c) (format "%04X" c))
my-color
"")))))))
(wcy-color-theme-adjust-hl-mode-face)