Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion skk-vars.el
Original file line number Diff line number Diff line change
Expand Up @@ -236,32 +236,42 @@ CODING $B$,(B non-nil $B$G$"$l$P!"8D?M<-=q$KE,MQ$5$l$k(B CODING $B$rJV$9(B
;;; skk-vars.el related.
(defcustom skk-background-mode
;; from font-lock-make-faces of font-lock.el Welcome!

;; $BHs(Bnil $B$J$i!"$=$l$r:GM%@h(B
(or frame-background-mode

(cond ((and window-system (x-display-color-p))
;; A) GUI$B4D6-$+$D%+%i!<I=<($,2DG=(B
(let ((bg-resource (x-get-resource ".backgroundMode"
"BackgroundMode"))
(params (frame-parameters)))
(cond (bg-resource
;; A-1) X $B%j%=!<%9$,B8:_$9$l$O!"3NDj(B
(intern (downcase bg-resource)))

((and (eq system-type 'windows-nt)
(not (fboundp 'x-color-values)))
;; A-2) Windows $B$+$D(B color-values $B$,L$Dj5A$J$i(B
(if (string-match "light"
(cdr (assq 'background-color params)))
'light
'dark))

((not (null (cdr (assq 'background-mode params))))
;; Emacs20.x (Meadow)
;; A-3) Emacs20.x (Meadow)
(cdr (assq 'background-mode params)))

;; A-4) $BF0E*H=Dj(B
((< (apply '+ (x-color-values
(cdr (assq 'background-color params))))
(/ (apply '+ (x-color-values "white")) 3))
'dark)

;; A-5 $B:G=*E*$K>e5-0J30(B
(t
'light))))

;; B) TTY$B4D6-$J$I(B
(t
nil)))
"*SKK $B$NI8=`$N%U%'%$%9?'$r7h$a$k$?$a$NGX7J?'$K4X$9$k>pJs!#(B
Expand Down
Loading