Subject: bug#10748: Ping

From: Oleksandr Manzyuk <[email-masked]>
Date: Tue, 28 Feb 2012 14:30:20 +0000

To save you reading the thread linked in the original bug report, here
is how to reproduce the bug:

1. emacs -Q
2. M-x server-start
3. Open a terminal with nonstandard foreground and/or background colors.
   For the sake of example, I assume that you've run "xterm -bg yellow".
4. Run "emacsclient -t" in the terminal.

The observed behavior: the background becomes grey, whereas the expected
behavior is that Emacs honors the terminal background color (yellow).

I normally set the background to white in .Xresources.  I've used yellow
color only to make my point.

This behavior is a regression in Emacs 24.  I've chased it down to this
commit:

commit 27528399fd429b2f510e13f361affb1e2211ceb3
Author: Chong Yidong <[email-masked]>
Date:   Tue Jan 31 16:38:58 2012 +0800

   Fix menu-set-font interaction with Custom themes.

   In particular, prevent it from setting non-font-related attributes
   like the foreground and background color.  This requires a bugfix to
   face-spec-reset-face to make "resetting" the default face work.

   * lisp/faces.el (face-spec-reset-face): Don't apply unspecified
   attribute values to the default face.

   * lisp/frame.el (set-frame-font): New arg ALL-FRAMES.

   * lisp/menu-bar.el (menu-set-font): Use set-frame-font.

`face-spec-reset-face' has been changed to reset only non-default faces.
While I understand the rationale of this change, it seems to break
handling of fore- and background colors in terminal.  If I evaluate the
old definition of `face-spec-reset-face' in the *scratch* buffer,
connecting to Emacs with "emacsclient -t" works the way I am used to.
-- 
Oleksandr Manzyuk
http://oleksandrmanzyuk.wordpress.com