]> git.eshelyaron.com Git - emacs.git/commit
src/xdisp.c: Use same test in `redisplay_window` and `prepare_menu_bars`
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 27 Apr 2022 22:14:56 +0000 (18:14 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 27 Apr 2022 22:15:34 +0000 (18:15 -0400)
commitafd3619b86ddf42c0591d394d95a7510758eaffb
tree07e8a3c63809ad352ebb435c072ecefcd2055c04
parent134f4ff38b323af8892520200307e9d54ae90200
src/xdisp.c: Use same test in `redisplay_window` and `prepare_menu_bars`

This consolidates the test made in those two functions so as to make
sure they agree whether a window needs to be redisplayed.
At the same time, change this test so it uses the window's point
rather than the buffer's point when comparing to `w->last_point`.

* src/xdisp.c (needs_no_redisplay): New function, extracted from
`redisplay_window`.
(redisplay_window, prepare_menu_bars): Use it.

* src/window.c (window_point): New function, extracted from `Fwindow_point`.
(Fwindow_point): Use it.
* src/window.h (window_point): Declare it.
src/window.c
src/window.h
src/xdisp.c