From: Masatake YAMATO <jet@gyve.org>
Cc: emacs-devel@gnu.org
Subject: Re: bug? the position of scroll-bar
Date: Mon, 22 Sep 2003 18:22:41 +0900 (JST) [thread overview]
Message-ID: <20030922.182241.152505591.jet@gyve.org> (raw)
In-Reply-To: <m365jl5k9h.fsf@kfs-l.imdomain.dk>
> > (progn (set-window-scroll-bars (selected-window) 10 'hippopotamus)
> > (window-scroll-bars (selected-window)))
> > => (10 2 hippopotamus nil)
> >
> > hippopotamus is accepted.
>
> It shouldn't, so your fix is ok (read on)...
>
> > 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.
> ^^^^^^^^^
>
> You need to allow Qt as well:
Thank you. I've validated more strictly.
How about this one?
2003-09-22 Masatake YAMATO <jet@gyve.org>
* 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))
{
next prev parent reply other threads:[~2003-09-22 9:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-17 11:48 bug? the position of scroll-bar Masatake YAMATO
2003-09-21 0:02 ` Kim F. Storm
2003-09-21 5:51 ` Masatake YAMATO
2003-09-22 7:56 ` Kim F. Storm
2003-09-22 9:22 ` Masatake YAMATO [this message]
2003-09-22 12:23 ` Kim F. Storm
2003-09-21 22:34 ` Richard Stallman
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=20030922.182241.152505591.jet@gyve.org \
--to=jet@gyve.org \
--cc=emacs-devel@gnu.org \
/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.