diff options
| author | Noam Postavsky | 2016-08-28 16:38:04 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2017-02-02 21:19:52 -0500 |
| commit | d17e92da064cabf376597f5de2a8d5a6484bfea6 (patch) | |
| tree | b608581cb4e883357a753c12e4526cac53066427 /src/window.h | |
| parent | 53c16c75a57aa486dfc1f46ef5aa538264e6ad47 (diff) | |
| download | emacs-d17e92da064cabf376597f5de2a8d5a6484bfea6.tar.gz emacs-d17e92da064cabf376597f5de2a8d5a6484bfea6.zip | |
Refactor uses of scroll_margin to a function
Its effective range needs to be clamped between 0 and (window height /
4), so it's better to have this constraint in a single place.
* src/window.c (window_scroll_margin): New function.
(window_scroll_pixel_based, window_scroll_line_based):
(Frecenter, Fmove_to_window_line):
* src/xdisp.c (try_scrolling, try_cursor_movement):
(redisplay_window, try_window, try_window_id): Use it.
Diffstat (limited to 'src/window.h')
| -rw-r--r-- | src/window.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/window.h b/src/window.h index 061cf244943..acb8a5cabfa 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -1120,6 +1120,8 @@ extern bool compare_window_configurations (Lisp_Object, Lisp_Object, bool); | |||
| 1120 | extern void mark_window_cursors_off (struct window *); | 1120 | extern void mark_window_cursors_off (struct window *); |
| 1121 | extern int window_internal_height (struct window *); | 1121 | extern int window_internal_height (struct window *); |
| 1122 | extern int window_body_width (struct window *w, bool); | 1122 | extern int window_body_width (struct window *w, bool); |
| 1123 | enum margin_unit { MARGIN_IN_LINES, MARGIN_IN_PIXELS }; | ||
| 1124 | extern int window_scroll_margin (struct window *, enum margin_unit); | ||
| 1123 | extern void temp_output_buffer_show (Lisp_Object); | 1125 | extern void temp_output_buffer_show (Lisp_Object); |
| 1124 | extern void replace_buffer_in_windows (Lisp_Object); | 1126 | extern void replace_buffer_in_windows (Lisp_Object); |
| 1125 | extern void replace_buffer_in_windows_safely (Lisp_Object); | 1127 | extern void replace_buffer_in_windows_safely (Lisp_Object); |