From: Nick Roberts <nickrob@snap.net.nz>
Cc: emacs-devel@gnu.org, storm@cua.dk
Subject: Re: Function: window-fringes
Date: Thu, 17 Aug 2006 15:34:16 +1200 [thread overview]
Message-ID: <17635.58296.548952.43707@kahikatea.snap.net.nz> (raw)
In-Reply-To: <E1GDR2u-00086d-BM@fencepost.gnu.org>
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)));
}
next prev parent reply other threads:[~2006-08-17 3:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-15 0:34 Function: window-fringes Nick Roberts
2006-08-15 8:57 ` Kim F. Storm
2006-08-15 10:05 ` Nick Roberts
2006-08-15 18:40 ` Richard Stallman
2006-08-15 22:20 ` Nick Roberts
2006-08-16 19:27 ` Richard Stallman
2006-08-17 3:34 ` Nick Roberts [this message]
2006-08-17 15:19 ` Richard Stallman
2006-08-15 20:40 ` Kim F. Storm
2006-08-15 21:03 ` Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17635.58296.548952.43707@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=emacs-devel@gnu.org \
--cc=storm@cua.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.