[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem of released-button style mode-line
From: |
Kenichi Handa |
Subject: |
Re: problem of released-button style mode-line |
Date: |
Thu, 26 Oct 2000 16:31:04 +0900 (JST) |
Miles Bader <address@hidden> writes:
> Kenichi Handa <address@hidden> writes:
>> > Thank you, but it seems that:
>> > (pos-visible-in-window-p POS nil t)
>> > returns t even if the upper part of line at POS is
>> > non-visible.
>>
>> It seems that this function can be used only for the current
>> buffer, but the docstring is vague about this restriction.
> I don't understand what you mean by this.
> pos-visible-in-window-p doesn't use the current buffer at all, except to
> default the value of POS.
Please try this:
% emacs -q --no-site-file -g 80x40
C-h t C-x 2 C-x b RET
;; Now there are two windows; *scratch* and TUTORIAL, and
;; you are in *scratch*.
C-x = ;; you are at point 192
ESC : (pos-visible-in-window-p 191 (get-buffer-window "TUTORIAL") t) RET
=> t
ESC : (pos-visible-in-window-p 192 (get-buffer-window "TUTORIAL") t) RET
=> t
ESC : (pos-visible-in-window-p 193 (get-buffer-window "TUTORIAL") t) RET
=> nil
;; But, In the TUTORIAL buffer, point 193 is surely fully visible.
>> In the code of pos_visible_p, you calls start_display but
>> I thought that the arg W (window) should be that of the
>> current buffer.
> What do you mean? Buffers don't point to windows, windows point to
> buffers, so the current buffer doesn't *have* a window...
Sorry for the incorrect wording. At the beginning of start_display,
init_iterator is called. And, at the beginning of
init_iterator, we have this code:
xassert (charpos < 0 || (charpos > 0 && charpos <= ZV));
This apparently indicates that CHARPOS should be a position
in the current buffer, not that of WINDOW's buffer.
> BTW, the fact that the POS and WINDOW arguments of
> pos-visible-in-window-p default separately seems slightly odd to me.
> What do people think of the following change:
If pos-visible-in-window-p should work for a window which
doesn't have the current buffer, I agree with this change.
But, currently not.
---
Ken'ichi HANDA
address@hidden
- Re: problem of released-button style mode-line, (continued)
- Re: problem of released-button style mode-line, Gerd Moellmann, 2000/10/24
- Re: problem of released-button style mode-line, Miles Bader, 2000/10/24
- Re: problem of released-button style mode-line, Gerd Moellmann, 2000/10/25
- Re: problem of released-button style mode-line, Miles Bader, 2000/10/25
- Re: problem of released-button style mode-line, Kenichi Handa, 2000/10/25
- Re: problem of released-button style mode-line, Miles Bader, 2000/10/25
- Re: problem of released-button style mode-line, Kenichi Handa, 2000/10/26
- Re: problem of released-button style mode-line, Miles Bader, 2000/10/26
- Re: problem of released-button style mode-line,
Kenichi Handa <=
- Re: problem of released-button style mode-line, Miles Bader, 2000/10/26
- Re: problem of released-button style mode-line, Gerd Moellmann, 2000/10/26
- Re: problem of released-button style mode-line, Gerd Moellmann, 2000/10/26
- Re: problem of released-button style mode-line, Kenichi Handa, 2000/10/30
- Re: problem of released-button style mode-line, Eli Zaretskii, 2000/10/21
- Re: problem of released-button style mode-line, Miles Bader, 2000/10/21
Re: problem of released-button style mode-line, Gerd Moellmann, 2000/10/24