[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Function: window-fringes
From: |
Nick Roberts |
Subject: |
Re: Function: window-fringes |
Date: |
Thu, 17 Aug 2006 15:34:16 +1200 |
Richard Stallman writes:
> You can set it with set-window-fringes, directly through the variables
> left-fringe-width or right-fringe-width and probably with
> modify-frame-parameters (or specifying frame parameters).
>
> Judging from reading the code, I don't think that the values of
> left-fringe-width and right-fringe-width have any effect on the value
> of WINDOW_LEFT_FRINGE_WIDTH, on a tty frame. I don't think that
> trying to specify the frame parameter has any effect on the frame
> fringe width, on a tty frame. Have you actually observed that either
> of these actions has such an effect?
Yes, I think you're right. I must have made some false assumptions.
> It looks like set-window-fringes really can set the frame width
> slots. I think that is the bug. So let's change it not to set them
> on a tty.
>
> With the following change, does any of this problem persist?
>
>
> *** window.c 18 Jul 2006 09:41:15 -0400 1.553
> --- window.c 16 Aug 2006 12:47:34 -0400
> ***************
> *** 6657,6662 ****
> --- 6657,6666 ----
> if (!NILP (right_width))
> CHECK_NATNUM (right_width);
>
> + /* Do nothing on a tty. */
> + if (! FRAME_WINDOW_P (f))
> + return Qnil;
> +
> if (!EQ (w->left_fringe_width, left_width)
> || !EQ (w->right_fringe_width, right_width)
> || !EQ (w->fringes_outside_margins, outside_margins))
It doesn't compile.
How about below? (using Kim's suggested condition for window-fringes).
--
Nick http://www.inet.net.nz/~nickrob
*** window.c 19 Jul 2006 01:29:55 +1200 1.553
--- window.c 17 Aug 2006 15:26:32 +1200
***************
*** 6656,6665 ****
CHECK_NATNUM (left_width);
if (!NILP (right_width))
CHECK_NATNUM (right_width);
!
! if (!EQ (w->left_fringe_width, left_width)
! || !EQ (w->right_fringe_width, right_width)
! || !EQ (w->fringes_outside_margins, outside_margins))
{
w->left_fringe_width = left_width;
w->right_fringe_width = right_width;
--- 6656,6667 ----
CHECK_NATNUM (left_width);
if (!NILP (right_width))
CHECK_NATNUM (right_width);
!
! /* Do nothing on a tty. */
! if (FRAME_WINDOW_P (WINDOW_XFRAME (w))
! && (!EQ (w->left_fringe_width, left_width)
! || !EQ (w->right_fringe_width, right_width)
! || !EQ (w->fringes_outside_margins, outside_margins)))
{
w->left_fringe_width = left_width;
w->right_fringe_width = right_width;
***************
*** 6687,6696 ****
Lisp_Object window;
{
struct window *w = decode_window (window);
return Fcons (make_number (WINDOW_LEFT_FRINGE_WIDTH (w)),
Fcons (make_number (WINDOW_RIGHT_FRINGE_WIDTH (w)),
! Fcons ((WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) ?
! Qt : Qnil), Qnil)));
}
--- 6689,6699 ----
Lisp_Object window;
{
struct window *w = decode_window (window);
+
return Fcons (make_number (WINDOW_LEFT_FRINGE_WIDTH (w)),
Fcons (make_number (WINDOW_RIGHT_FRINGE_WIDTH (w)),
! Fcons ((WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
! ? Qt : Qnil), Qnil)));
}
Re: Function: window-fringes, Chong Yidong, 2006/08/15