[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mode-line, scroll-bar, tool-bar の色、etc...



最近 Fedora Core 4 から 5 に乗り換えて、以前から ~/.emacs に書い
てあった以下の指定が Emacs 21〜23 のすべてで効かないことに気が付
きました。GTK は使っていません。デフォルト(?) の LUCID です。

  (set-face-background 'mode-line "LemonChiffon4")
  (set-face-foreground 'mode-line "White")
  (set-face-background 'scroll-bar "LemonChiffon3")
  (set-face-background 'tool-bar "LemonChiffon2")

そこで、かなり昔に Sony NEWS でやっていたことを思い出し、以下の
ように書き換えたところ、指定した通りの色になりました。

  (add-hook
   'window-setup-hook
   (lambda nil
     (set-face-background 'mode-line "LemonChiffon4")
     (set-face-foreground 'mode-line "White")
     (set-face-background 'scroll-bar "LemonChiffon3")
     (set-face-background 'tool-bar "LemonChiffon2")))

  (add-hook
   'after-make-frame-functions
   (lambda (frame)
     (set-face-background 'mode-line "LemonChiffon4" frame)
     (set-face-foreground 'mode-line "White" frame)
     (set-face-background 'scroll-bar "LemonChiffon3" frame)
     (set-face-background 'tool-bar "LemonChiffon2" frame)))

これは今後時間があるときに調べようと思っていますが、以前と同様に
結局わからないかもしれません。

なお、ぼくは Emacs のための X リソースはまったく使わず、すべての
設定を ~/.emacs で行なうことにしています。

もう一点、FC5 にバンドルされているものより古くなってしまった
/usr/local にあるアプリを消していったところ、ispell が動かなくなっ
てしまいました。原因は aspell の辞書ファイル名に utf-8 でエンコー
ドされた非 ascii 文字が含まれているのに、それらを読み込むときの
default-file-name-coding-system の値が euc-jp になっていたためで
した。FC5 のデフォルトが utf-8 であるとはいえ、euc-jp でエンコー
ドされた以前からある日本語名のファイルを変えるのが面倒だったので、
以下のようにして逃げました。

(defadvice ispell-aspell-add-aliases (around bind-file-name-coding-system
					     activate)
  "Bind `file-name-coding-system' to `utf-8'."
  (let ((file-name-coding-system 'utf-8))
    ad-do-it))
-- 
山岡