[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: show-enclosing-scopes
From: |
Jefferson Carpenter |
Subject: |
Re: show-enclosing-scopes |
Date: |
Wed, 16 May 2018 21:46:08 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
replying to all
On 5/16/2018 8:03 AM, Eli Zaretskii wrote> AFIU, you have there a
function on pre-command-hook that
deletes a window and then forces redisplay. So I'd say you get what
you asked for?
Yeah, maybe :)
I don't think I understand why scroll commands rewuire that.
Open a blank buffer and enter some text into it, for example "C-x ( F3
<RET> C-x ) C-u 20 C-x e". Then, run
(progn (scroll-up 1) (beginning-of-buffer))
The window scrolls up by 1 line and point is moved to the middle of the
screen, even though (beginning-of-buffer) is sequenced after (scroll-up
1). Compare with:
(progn (scroll-up 1) (redisplay) (beginning-of-buffer))
This moves point to the beginning of the buffer, the (scroll-up 1) call
essentially becoming a no-op. This is why (redisplay) is used in my
code: it appears to flush the internal state set by scroll-up and
scroll-down, so that (beginning-of-buffer) has the intended effect.
- show-enclosing-scopes, Jefferson Carpenter, 2018/05/16
- show-enclosing-scopes, Jefferson Carpenter, 2018/05/16
- Re: show-enclosing-scopes, Eli Zaretskii, 2018/05/16
- Re: show-enclosing-scopes,
Jefferson Carpenter <=
- Re: show-enclosing-scopes, Stefan Monnier, 2018/05/17
- Re: show-enclosing-scopes, Eli Zaretskii, 2018/05/17
- Re: show-enclosing-scopes, Stefan Monnier, 2018/05/17
- Re: show-enclosing-scopes, Eli Zaretskii, 2018/05/17
- Re: show-enclosing-scopes, Stefan Monnier, 2018/05/17
- Re: show-enclosing-scopes, Jefferson Carpenter, 2018/05/17
- Re: show-enclosing-scopes, Jefferson Carpenter, 2018/05/17
- Re: show-enclosing-scopes, Eli Zaretskii, 2018/05/18
- Re: show-enclosing-scopes, Stefan Monnier, 2018/05/17
- Re: show-enclosing-scopes, Jefferson Carpenter, 2018/05/18