auto-complete の face の設定解決編

どうもです。
雰囲気から察するに,どうやら風邪は治っているようです。
いや〜,阿呆みたいに寝ましたよ。偏頭痛がこなかったのが不幸中の幸い。
と思いきや,気を抜いたときにおそってくるのがヤツ。
気を引き締めていきまっしょい。

結論

pulldown の方にお邪魔して,そちらの face を設定したらうまくいきました。
けど,なんかすげぇ罪悪感。。。

auto-complete 1.0 で face の設定が有効にならない件

以前,書きました。
1.0にしてから,face を設定しても,効かないと。
M-x describe-face すると,設定した値に変更されているので,
設定した値が使われてないのでは? との疑問から,auto-complete.el を眺めてみました。
結局は,pulldown を使っているだろうから,ac-candidates-1 を眺めていると,
pulldown-item-propertize に face, selection-face を渡している感じ?
で,それらはというと,なんや初めて見た,assoc-default とかいうので取得している。
というわけでおなじみの,M-x edebug-defun ですよ。
すると,どちらも nil になっている。
なんやわからんけん,とするならば,デフォルトの設定が使われている?
との疑問に行き着いたわけです。


さて,pulldown.el を眺めてみると,
pulldown-default-face, pulldown-default-selection-face
の2つが定義されています。
こいつを設定してみると,無事,思い通りの色になってくれました。
ぱちぱちぱち〜。よかったお。
ちなみに,こんな感じの設定です。

(when (and (require 'auto-complete nil t) (require 'auto-complete-config nil t))
  (require 'ac-dabbrev nil t)
  (global-auto-complete-mode t)
  (setq ac-auto-start 2)
  (set-default 'ac-sources '(ac-source-abbrev ac-source-words-in-buffer))
  (setq ac-modes (append ac-modes '(jde-mode)))
  (define-key ac-complete-mode-map "\C-n" 'ac-next)
  (define-key ac-complete-mode-map "\C-p" 'ac-previous)
  (define-key ac-complete-mode-map "\M-/" 'ac-stop)
  (custom-set-faces  '(pulldown-default-face ((t (:background "slate gray" :foreground "white"))))
                     '(pulldown-selection-face ((t (:background "blue" :foreground "white"))))
                     '(ac-completion-face ((t (:background "blue" :foreground "white"))))
                     '(ac-candidate-face ((t (:background "slate gray" :foreground "white"))))
                     '(ac-selection-face ((t (:background "blue" :foreground "white"))))
                     '(ac-dabbrev-menu-face ((t (:background "slate gray" :foreground "white"))))
                     '(ac-dabbrev-selection-face ((t (:background "firebrick4" :foreground "white"))))
                     '(ac-gtags-candidate-face ((t (:background "slate gray" :foreground "white"))))
                     '(ac-gtags-selection-face ((t (:background "indian red" :foreground "white"))))))

お疲れ様でした。

しかし,なぜに効かないかについての原因は未解明だったりするのであーる。