From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: bug? the position of scroll-bar Date: 22 Sep 2003 14:23:54 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20030921.145130.208947415.jet@gyve.org> <20030922.182241.152505591.jet@gyve.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1064233736 32319 80.91.224.253 (22 Sep 2003 12:28:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 Sep 2003 12:28:56 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Sep 22 14:28:54 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A1PoE-00052p-00 for ; Mon, 22 Sep 2003 14:28:54 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A1Pu2-0001vY-00 for ; Mon, 22 Sep 2003 14:34:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 1A1Pll-0004ro-KM for emacs-devel@quimby.gnus.org; Mon, 22 Sep 2003 08:26:21 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 1A1Pjh-0004qR-DT for emacs-devel@gnu.org; Mon, 22 Sep 2003 08:24:13 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 1A1PjX-0004oH-P4 for emacs-devel@gnu.org; Mon, 22 Sep 2003 08:24:04 -0400 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.22) id 1A1PjS-0004nh-ML for emacs-devel@gnu.org; Mon, 22 Sep 2003 08:23:58 -0400 Original-Received: (qmail 73663 invoked from network); 22 Sep 2003 12:23:57 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 22 Sep 2003 12:23:57 -0000 Original-To: Masatake YAMATO In-Reply-To: <20030922.182241.152505591.jet@gyve.org> Original-Lines: 51 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:16551 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:16551 Masatake YAMATO writes: > > > A width of nil and type of t means to use the frame's corresponding value. > Thank you. I've validated more strictly. That's too much now :-) The doc string is unclear. What it's supposed to say is: If WIDTH is nil, use the frame's scroll-bar width. If TYPE is t, use the frame's scroll-bar type. So just allow type = t with no check on width... And fix the doc string :-) > How about this one? > > 2003-09-22 Masatake YAMATO > > * window.c (Fset_window_scroll_bars): Validate the value of > `vertical_type'. > > Index: src/window.c > =================================================================== > RCS file: /cvsroot/emacs/emacs/src/window.c,v > retrieving revision 1.447 > diff -u -r1.447 window.c > --- src/window.c 20 Sep 2003 23:38:54 -0000 1.447 > +++ src/window.c 22 Sep 2003 09:18:19 -0000 > @@ -5873,6 +5873,12 @@ > if (XINT (width) == 0) > vertical_type = Qnil; > > + if (!(EQ (vertical_type, Qnil) > + || EQ (vertical_type, Qleft) > + || EQ (vertical_type, Qright) > + || (EQ (vertical_type, Qt) && NILP (width)))) > + error ("Invalid type of vertical scroll bar"); > + > if (!EQ (w->scroll_bar_width, width) > || !EQ (w->vertical_scroll_bar_type, vertical_type)) > { > > -- Kim F. Storm http://www.cua.dk