From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Masatake YAMATO Newsgroups: gmane.emacs.devel Subject: Re: bug? the position of scroll-bar Date: Sun, 21 Sep 2003 14:51:30 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20030921.145130.208947415.jet@gyve.org> References: <20030917.204830.74744537.jet@gyve.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1064123523 29131 80.91.224.253 (21 Sep 2003 05:52:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 21 Sep 2003 05:52:03 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Sep 21 07:52:01 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 1A0x8b-0003qs-00 for ; Sun, 21 Sep 2003 07:52:01 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A0xDp-0002I1-00 for ; Sun, 21 Sep 2003 07:57:25 +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 1A0x8P-0006Pw-GS for emacs-devel@quimby.gnus.org; Sun, 21 Sep 2003 01:51:49 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 1A0x8J-0006Kv-KG for emacs-devel@gnu.org; Sun, 21 Sep 2003 01:51:43 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 1A0x8F-0006Ef-Tn for emacs-devel@gnu.org; Sun, 21 Sep 2003 01:51:42 -0400 Original-Received: from [210.130.136.40] (helo=r-maa.spacetown.ne.jp) by monty-python.gnu.org with esmtp (Exim 4.22) id 1A0x8F-0006Bp-6T for emacs-devel@gnu.org; Sun, 21 Sep 2003 01:51:39 -0400 Original-Received: from localhost (h219-110-074-009.catv01.itscom.jp [219.110.74.9]) by r-maa.spacetown.ne.jp (8.11.6) with ESMTP id h8L5pVE06051; Sun, 21 Sep 2003 14:51:31 +0900 (JST) Original-To: storm@cua.dk In-Reply-To: X-Mailer: Mew version 3.1.52 on Emacs 21.3 / Mule 5.0 (SAKAKI) 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:16522 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:16522 > > After evaluating (scroll-bar-mode) twice, > > both (nth 2 (window-scroll-bars)) and (frame-parameter nil 'vertical-scroll-bars) > > return t. So I cannot know the position of scroll-bar(left or right). I think > > this is a bug. > > A short-coming at least :-) A value of t means to use the system default > setting. > > In any case, I have installed a fix that should help you. Thank you. I've tested your change and I'm almost satisfied with it. But I have still one question. (progn (set-window-scroll-bars (selected-window) 10 'hippopotamus) (window-scroll-bars (selected-window))) => (10 2 hippopotamus nil) hippopotamus is accepted. But M-x set-window-scroll-bars shows: set-window-scroll-bars is a built-in function. (set-window-scroll-bars WINDOW WIDTH &optional VERTICAL-TYPE HORIZONTAL-TYPE) Set width and type of scroll bars of window WINDOW. If window is nil, set scroll bars of the currently selected window. Second parameter WIDTH specifies the pixel width for the scroll bar; this is automatically adjusted to a multiple of the frame column width. Third parameter VERTICAL-TYPE specifies the type of the vertical scroll bar: left, right, or nil. ^^^^^^^^^^^^^^^^^^^^^^^^^ A width of nil and type of t means to use the frame's corresponding value. Should set-window-scroll-bars return an error if hippopotamus is specified? I've tried to add following code if (!(EQ (vertical_type, Qnil) || EQ (vertical_type, Qleft) || EQ (vertical_type, Qright))) error ("Invalid type of vertical scroll bar"); to DEFUN ("set-window-scroll-bars", Fset_window_scroll_bars, Sset_window_scroll_bars,.. but this addition causes segmentation fault during make command running. Masatake YAMATO