[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#50256: thing-at-mouse
From: |
martin rudalics |
Subject: |
bug#50256: thing-at-mouse |
Date: |
Thu, 2 Sep 2021 08:48:15 +0200 |
> Then what is the semantics of the code snippet above, and why did you
> call with-current-buffer the second time? What did you want to
> accomplish, except make a point?
I tried to write a simple example with emacs -Q showing how code breaks
a contract stated in a manual.
> IOW, what kind of real-life situation needs such a code?
Any call of `pos-visible-in-window-p' might happen within the context of
`with-current-buffer'. Just check how often these forms are used in the
Emacs code base.
>> (pos-visible-in-window-p nil nil t) should never return nil as it
>> does in the above recipe.
>
> Why not?
Because in the manual we say that
"The argument POSITION defaults to the current position
of point in WINDOW; WINDOW defaults to the selected window."
If the current buffer is not shown in WINDOW, the first part of this
sentence is wrong.
martin
- bug#50256: thing-at-mouse, (continued)
- bug#50256: thing-at-mouse, martin rudalics, 2021/09/01
- bug#50256: thing-at-mouse, Eli Zaretskii, 2021/09/01
- bug#50256: thing-at-mouse, martin rudalics, 2021/09/01
- bug#50256: thing-at-mouse, Eli Zaretskii, 2021/09/01
- bug#50256: thing-at-mouse, Juri Linkov, 2021/09/01
- bug#50256: thing-at-mouse, Eli Zaretskii, 2021/09/01
- bug#50256: thing-at-mouse, Juri Linkov, 2021/09/02
- bug#50256: thing-at-mouse, Eli Zaretskii, 2021/09/02
- bug#50256: thing-at-mouse, Lars Ingebrigtsen, 2021/09/02
- bug#50256: thing-at-mouse, Eli Zaretskii, 2021/09/02
- bug#50256: thing-at-mouse,
martin rudalics <=
- bug#50256: thing-at-mouse, Eli Zaretskii, 2021/09/02
- bug#50256: thing-at-mouse, Lars Ingebrigtsen, 2021/09/02
- bug#50256: thing-at-mouse, Eli Zaretskii, 2021/09/02
- bug#50256: thing-at-mouse, martin rudalics, 2021/09/02
- bug#50256: thing-at-mouse, Eli Zaretskii, 2021/09/02
- bug#50256: thing-at-mouse, martin rudalics, 2021/09/02
- bug#50256: thing-at-mouse, Eli Zaretskii, 2021/09/02
- bug#50256: thing-at-mouse, martin rudalics, 2021/09/02
- bug#50256: thing-at-mouse, Juri Linkov, 2021/09/02
- bug#50256: thing-at-mouse, Juri Linkov, 2021/09/02