From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: Function: window-fringes Date: Thu, 17 Aug 2006 15:34:16 +1200 Message-ID: <17635.58296.548952.43707@kahikatea.snap.net.nz> References: <17633.5806.596053.708560@kahikatea.snap.net.nz> <17633.40013.127540.600671@kahikatea.snap.net.nz> <17634.18605.516263.788498@kahikatea.snap.net.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1155785808 21841 80.91.229.2 (17 Aug 2006 03:36:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 17 Aug 2006 03:36:48 +0000 (UTC) Cc: emacs-devel@gnu.org, storm@cua.dk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 17 05:36:44 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GDYgU-0000pv-CU for ged-emacs-devel@m.gmane.org; Thu, 17 Aug 2006 05:36:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GDYgT-0002b8-Qj for ged-emacs-devel@m.gmane.org; Wed, 16 Aug 2006 23:36:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GDYgB-0002Xu-DK for emacs-devel@gnu.org; Wed, 16 Aug 2006 23:36:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GDYg9-0002WY-Ad for emacs-devel@gnu.org; Wed, 16 Aug 2006 23:36:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GDYg9-0002WR-2A for emacs-devel@gnu.org; Wed, 16 Aug 2006 23:36:21 -0400 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GDYmS-0003wb-Px; Wed, 16 Aug 2006 23:42:53 -0400 Original-Received: from kahikatea.snap.net.nz (p202-124-125-87.snap.net.nz [202.124.125.87]) by viper.snap.net.nz (Postfix) with ESMTP id 0BE907B299B; Thu, 17 Aug 2006 15:36:10 +1200 (NZST) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 0B7B9BE42D; Thu, 17 Aug 2006 15:34:18 +1200 (NZST) Original-To: rms@gnu.org In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.0.50.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:58455 Archived-At: 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))); }