[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Diff mode faces
From: |
Juri Linkov |
Subject: |
Re: Diff mode faces |
Date: |
Mon, 20 Jun 2005 07:48:08 +0300 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
> First, it calls an obsolete function frame-update-face-colors (it's an
> alias for backward compatibility; let's use the function it is aliased
> to).
Then it would be better to rename it in all C files to not create
Lisp symbols in C for both of them.
> Second, I think doing this unconditionally might not be a good idea:
> wouldn't it clash with what x_set_frame_parameters and
> IT_set_frame_parameters do for their respective displays?
It is called conditionally on non-window and non-dos systems
so it doesn't clash with x_set_frame_parameters or IT_set_frame_parameters.
> Third, please be sure to test this change with various ways one can
> use to set colors on a tty, including these few:
>
> . emacs -fg FOO
> . emacs -fg FOO -bg BAR
> . emacs -bg BAR
> . repeat the above 3 with -rv, and convince yourself that the above
> 4 tests produce expected results
I see there is a bug not caused by my patch:
emacs -q -nw -rv
sets the background mode to light on xterm. But since -rv switches
foreground and background, it should switch the background mode too
from light to dark on xterm.
> . modify the default color with set-background-color and verify that
> it is in effect for new frames created with "C-x 5 b" and the like
For frames with undefined backgrounds it reuses the background mode
specified with set-background-color. Is it right?
> . same as the last one above, but with set-face-background for the
> default face, both with and without the optional frame arg; verify
> that with an arg only the named frame is affected and without an
> arg all frames are affected, including the newly created ones
This works.
> Finally, could you please elaborate on your analysis of this issue; in
> particular, where is this handled on X?
On X this is handled in `if (EQ (param, Qbackground_color))' condition
in update_face_from_frame_parameter(xfaces.c) which is reached from
Fmodify_frame_parameters thru the following function calls:
update_face_from_frame_parameter at xfaces.c:4490
x_set_background_color at xfns.c:911
x_set_frame_parameters at frame.c:2738
Fmodify_frame_parameters at frame.c:2280
Finternal_set_lisp_face_attribute at xfaces.c:4434
But on tty it doesn't go past the function Fmodify_frame_parameters
due to the condition `if (FRAME_WINDOW_P (f))'. The explicit call
to `Qframe_update_face_colors' I added in Fmodify_frame_parameters
is on the else-branch of this condition.
--
Juri Linkov
http://www.jurta.org/emacs/
- Diff mode faces, Juri Linkov, 2005/06/17
- Re: Diff mode faces, Eli Zaretskii, 2005/06/17
- Re: Diff mode faces, Juri Linkov, 2005/06/18
- Re: Diff mode faces, Randal L. Schwartz, 2005/06/18
- Re: Diff mode faces, Eli Zaretskii, 2005/06/18
- Re: Diff mode faces, Juri Linkov, 2005/06/19
- Re: Diff mode faces, Eli Zaretskii, 2005/06/19
- Re: Diff mode faces,
Juri Linkov <=
- Re: Diff mode faces, Eli Zaretskii, 2005/06/20
- Background mode (was: Diff mode faces), Juri Linkov, 2005/06/21
- Re: Background mode, Juri Linkov, 2005/06/26
- Re: Background mode, Richard M. Stallman, 2005/06/27
- Re: Background mode, Juri Linkov, 2005/06/27
- Re: Background mode, Richard M. Stallman, 2005/06/28
- Re: Background mode, Stefan Monnier, 2005/06/29
- Re: Background mode, Miles Bader, 2005/06/29
- Re: Background mode, Stefan Monnier, 2005/06/30
- Re: Background mode, Juri Linkov, 2005/06/27