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: Tue, 15 Aug 2006 22:05:01 +1200 Message-ID: <17633.40013.127540.600671@kahikatea.snap.net.nz> References: <17633.5806.596053.708560@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 1155636436 21175 80.91.229.2 (15 Aug 2006 10:07:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 15 Aug 2006 10:07:16 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 15 12:07:15 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 1GCvpI-0002yM-Jm for ged-emacs-devel@m.gmane.org; Tue, 15 Aug 2006 12:07:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GCvpI-0006AA-5M for ged-emacs-devel@m.gmane.org; Tue, 15 Aug 2006 06:07:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GCvp7-0006A5-Vk for emacs-devel@gnu.org; Tue, 15 Aug 2006 06:07:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GCvp7-00069c-03 for emacs-devel@gnu.org; Tue, 15 Aug 2006 06:07:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GCvp6-00069X-T9 for emacs-devel@gnu.org; Tue, 15 Aug 2006 06:07:00 -0400 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GCvv6-0003di-TR for emacs-devel@gnu.org; Tue, 15 Aug 2006 06:13:13 -0400 Original-Received: from kahikatea.snap.net.nz (p202-124-124-46.snap.net.nz [202.124.124.46]) by viper.snap.net.nz (Postfix) with ESMTP id 5028E79DED5; Tue, 15 Aug 2006 22:06:55 +1200 (NZST) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 37E62BE3F2; Tue, 15 Aug 2006 22:05:03 +1200 (NZST) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.0.50.1 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:58401 Archived-At: > > On a text-only terminal, I think window-fringes should always return > > (0 0 nil). > > Ok. Pls. fix it. Well it's a bit of a shot in the dark. In future with multi-tty, where some windows might be graphic and others text-only, it might be better to condition on the selected window: if (WINDOW_FRAME_COLUMN_WIDTH (w) == 1) But maybe that's not orthodox at the moment. -- Nick http://www.inet.net.nz/~nickrob *** window.c 19 Jul 2006 01:29:55 +1200 1.553 --- window.c 15 Aug 2006 21:59:53 +1200 *************** *** 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))); } --- 6687,6700 ---- Lisp_Object window; { struct window *w = decode_window (window); ! if (EQ (Vwindow_system, Qnil)) ! return Fcons (make_number (0), (Fcons (make_number (0), ! (Fcons (Qnil, Qnil))))); ! else ! 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))); }