diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-04-27 18:14:56 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-04-27 18:15:34 -0400 |
commit | afd3619b86ddf42c0591d394d95a7510758eaffb (patch) | |
tree | 07e8a3c63809ad352ebb435c072ecefcd2055c04 /src/window.h | |
parent | 134f4ff38b323af8892520200307e9d54ae90200 (diff) | |
download | emacs-afd3619b86ddf42c0591d394d95a7510758eaffb.tar.gz |
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.
Diffstat (limited to 'src/window.h')
-rw-r--r-- | src/window.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/window.h b/src/window.h index 94c9b7124f3..387a3be36a9 100644 --- a/src/window.h +++ b/src/window.h @@ -1191,6 +1191,7 @@ extern void replace_buffer_in_windows_safely (Lisp_Object); /* This looks like a setter, but it is a bit special. */ extern void wset_buffer (struct window *, Lisp_Object); extern bool window_outdated (struct window *); +extern ptrdiff_t window_point (struct window *w); extern void init_window_once (void); extern void init_window (void); extern void syms_of_window (void); |