diff options
| author | Stefan Kangas | 2022-07-31 01:44:22 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2022-07-31 01:44:22 +0200 |
| commit | 5b29f8cd98c014b4b3e5844ef128ba97e65ea036 (patch) | |
| tree | 90475b7bdcae4146ce8b4c9ce11d979ed00ba600 /src | |
| parent | a3d974d59f4c352724f5562f4cc53e8a8f6e8cab (diff) | |
| download | emacs-5b29f8cd98c014b4b3e5844ef128ba97e65ea036.tar.gz emacs-5b29f8cd98c014b4b3e5844ef128ba97e65ea036.zip | |
Delete redisplay-end-trigger-functions and related defuns
This variable and related functions have been obsolete since 23.1.
The last things to depend on this (fast-lock.el and lazy-lock.el) were
recently removed.
* src/dispextern.h (struct it): Delete field
'redisplay_end_trigger_charpos'.
* src/window.c (Fwindow_redisplay_end_trigger)
(Fset_window_redisplay_end_trigger): Delete defuns and corresponding
defsubrs for functions obsolete since 23.1.
* src/window.h (wset_redisplay_end_trigger): Delete function.
(GCALIGNED_STRUCT): Delete 'redisplay_end_trigger'.
* src/xdisp.c (run_redisplay_end_trigger_hook): Delete function.
(syms_of_xdisp) <redisplay_end_trigger_functions>: Delete
variable obsolete since 23.1.
(init_iterator, next_element_from_buffer): Don't run or set above
deleted hook variable.
* lisp/subr.el: Delete obsoletion definitions for above deleted
defuns and variable.
* doc/lispref/hooks.texi (Standard Hooks):
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns):
* lisp/loadhist.el (unload-feature-special-hooks): Don't mention
above deleted variable.
* admin/coccinelle/window.cocci: Adjust for above changes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispextern.h | 3 | ||||
| -rw-r--r-- | src/window.c | 27 | ||||
| -rw-r--r-- | src/window.h | 10 | ||||
| -rw-r--r-- | src/xdisp.c | 49 |
4 files changed, 0 insertions, 89 deletions
diff --git a/src/dispextern.h b/src/dispextern.h index 817211e795e..037e02ff58f 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -2350,9 +2350,6 @@ struct it | |||
| 2350 | used for overlay strings and strings from display properties. */ | 2350 | used for overlay strings and strings from display properties. */ |
| 2351 | ptrdiff_t string_nchars; | 2351 | ptrdiff_t string_nchars; |
| 2352 | 2352 | ||
| 2353 | /* Position at which redisplay end trigger functions should be run. */ | ||
| 2354 | ptrdiff_t redisplay_end_trigger_charpos; | ||
| 2355 | |||
| 2356 | /* True means multibyte characters are enabled. */ | 2353 | /* True means multibyte characters are enabled. */ |
| 2357 | bool_bf multibyte_p : 1; | 2354 | bool_bf multibyte_p : 1; |
| 2358 | 2355 | ||
diff --git a/src/window.c b/src/window.c index 33a1b8a4bf4..afb8f75537b 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1300,31 +1300,6 @@ window so that the location of point moves off-window. */) | |||
| 1300 | return set_window_hscroll (decode_live_window (window), XFIXNUM (ncol)); | 1300 | return set_window_hscroll (decode_live_window (window), XFIXNUM (ncol)); |
| 1301 | } | 1301 | } |
| 1302 | 1302 | ||
| 1303 | DEFUN ("window-redisplay-end-trigger", Fwindow_redisplay_end_trigger, | ||
| 1304 | Swindow_redisplay_end_trigger, 0, 1, 0, | ||
| 1305 | doc: /* Return WINDOW's redisplay end trigger value. | ||
| 1306 | WINDOW must be a live window and defaults to the selected one. | ||
| 1307 | See `set-window-redisplay-end-trigger' for more information. */) | ||
| 1308 | (Lisp_Object window) | ||
| 1309 | { | ||
| 1310 | return decode_live_window (window)->redisplay_end_trigger; | ||
| 1311 | } | ||
| 1312 | |||
| 1313 | DEFUN ("set-window-redisplay-end-trigger", Fset_window_redisplay_end_trigger, | ||
| 1314 | Sset_window_redisplay_end_trigger, 2, 2, 0, | ||
| 1315 | doc: /* Set WINDOW's redisplay end trigger value to VALUE. | ||
| 1316 | WINDOW must be a live window and defaults to the selected one. VALUE | ||
| 1317 | should be a buffer position (typically a marker) or nil. If it is a | ||
| 1318 | buffer position, then if redisplay in WINDOW reaches a position beyond | ||
| 1319 | VALUE, the functions in `redisplay-end-trigger-functions' are called | ||
| 1320 | with two arguments: WINDOW, and the end trigger value. Afterwards the | ||
| 1321 | end-trigger value is reset to nil. */) | ||
| 1322 | (register Lisp_Object window, Lisp_Object value) | ||
| 1323 | { | ||
| 1324 | wset_redisplay_end_trigger (decode_live_window (window), value); | ||
| 1325 | return value; | ||
| 1326 | } | ||
| 1327 | |||
| 1328 | /* Test if the character at column X, row Y is within window W. | 1303 | /* Test if the character at column X, row Y is within window W. |
| 1329 | If it is not, return ON_NOTHING; | 1304 | If it is not, return ON_NOTHING; |
| 1330 | if it is on the window's vertical divider, return | 1305 | if it is on the window's vertical divider, return |
| @@ -8640,8 +8615,6 @@ displayed after a scrolling operation to be somewhat inaccurate. */); | |||
| 8640 | defsubr (&Swindow_body_width); | 8615 | defsubr (&Swindow_body_width); |
| 8641 | defsubr (&Swindow_hscroll); | 8616 | defsubr (&Swindow_hscroll); |
| 8642 | defsubr (&Sset_window_hscroll); | 8617 | defsubr (&Sset_window_hscroll); |
| 8643 | defsubr (&Swindow_redisplay_end_trigger); | ||
| 8644 | defsubr (&Sset_window_redisplay_end_trigger); | ||
| 8645 | defsubr (&Swindow_mode_line_height); | 8618 | defsubr (&Swindow_mode_line_height); |
| 8646 | defsubr (&Swindow_header_line_height); | 8619 | defsubr (&Swindow_header_line_height); |
| 8647 | defsubr (&Swindow_tab_line_height); | 8620 | defsubr (&Swindow_tab_line_height); |
diff --git a/src/window.h b/src/window.h index c63b1b24d4f..93817a95445 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -199,10 +199,6 @@ struct window | |||
| 199 | and Qt, so bitfield can't be used here. */ | 199 | and Qt, so bitfield can't be used here. */ |
| 200 | Lisp_Object dedicated; | 200 | Lisp_Object dedicated; |
| 201 | 201 | ||
| 202 | /* If redisplay in this window goes beyond this buffer position, | ||
| 203 | must run the redisplay-end-trigger-hook. */ | ||
| 204 | Lisp_Object redisplay_end_trigger; | ||
| 205 | |||
| 206 | /* t means this window's child windows are not (re-)combined. */ | 202 | /* t means this window's child windows are not (re-)combined. */ |
| 207 | Lisp_Object combination_limit; | 203 | Lisp_Object combination_limit; |
| 208 | 204 | ||
| @@ -498,12 +494,6 @@ wset_prev (struct window *w, Lisp_Object val) | |||
| 498 | } | 494 | } |
| 499 | 495 | ||
| 500 | INLINE void | 496 | INLINE void |
| 501 | wset_redisplay_end_trigger (struct window *w, Lisp_Object val) | ||
| 502 | { | ||
| 503 | w->redisplay_end_trigger = val; | ||
| 504 | } | ||
| 505 | |||
| 506 | INLINE void | ||
| 507 | wset_mode_line_help_echo (struct window *w, Lisp_Object val) | 497 | wset_mode_line_help_echo (struct window *w, Lisp_Object val) |
| 508 | { | 498 | { |
| 509 | w->mode_line_help_echo = val; | 499 | w->mode_line_help_echo = val; |
diff --git a/src/xdisp.c b/src/xdisp.c index b1ee7889d46..88a489e290f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1138,7 +1138,6 @@ static int display_string (const char *, Lisp_Object, Lisp_Object, | |||
| 1138 | ptrdiff_t, ptrdiff_t, struct it *, int, int, int, | 1138 | ptrdiff_t, ptrdiff_t, struct it *, int, int, int, |
| 1139 | int); | 1139 | int); |
| 1140 | static void compute_line_metrics (struct it *); | 1140 | static void compute_line_metrics (struct it *); |
| 1141 | static void run_redisplay_end_trigger_hook (struct it *); | ||
| 1142 | static bool get_overlay_strings (struct it *, ptrdiff_t); | 1141 | static bool get_overlay_strings (struct it *, ptrdiff_t); |
| 1143 | static bool get_overlay_strings_1 (struct it *, ptrdiff_t, bool); | 1142 | static bool get_overlay_strings_1 (struct it *, ptrdiff_t, bool); |
| 1144 | static void next_overlay_string (struct it *); | 1143 | static void next_overlay_string (struct it *); |
| @@ -3279,17 +3278,6 @@ init_iterator (struct it *it, struct window *w, | |||
| 3279 | /* Are multibyte characters enabled in current_buffer? */ | 3278 | /* Are multibyte characters enabled in current_buffer? */ |
| 3280 | it->multibyte_p = !NILP (BVAR (current_buffer, enable_multibyte_characters)); | 3279 | it->multibyte_p = !NILP (BVAR (current_buffer, enable_multibyte_characters)); |
| 3281 | 3280 | ||
| 3282 | /* Get the position at which the redisplay_end_trigger hook should | ||
| 3283 | be run, if it is to be run at all. */ | ||
| 3284 | if (MARKERP (w->redisplay_end_trigger) | ||
| 3285 | && XMARKER (w->redisplay_end_trigger)->buffer != 0) | ||
| 3286 | it->redisplay_end_trigger_charpos | ||
| 3287 | = marker_position (w->redisplay_end_trigger); | ||
| 3288 | else if (FIXNUMP (w->redisplay_end_trigger)) | ||
| 3289 | it->redisplay_end_trigger_charpos | ||
| 3290 | = clip_to_bounds (PTRDIFF_MIN, XFIXNUM (w->redisplay_end_trigger), | ||
| 3291 | PTRDIFF_MAX); | ||
| 3292 | |||
| 3293 | it->tab_width = SANE_TAB_WIDTH (current_buffer); | 3281 | it->tab_width = SANE_TAB_WIDTH (current_buffer); |
| 3294 | 3282 | ||
| 3295 | /* Are lines in the display truncated? */ | 3283 | /* Are lines in the display truncated? */ |
| @@ -9430,13 +9418,6 @@ next_element_from_buffer (struct it *it) | |||
| 9430 | previously seen overlays is no longer valid. */ | 9418 | previously seen overlays is no longer valid. */ |
| 9431 | it->ignore_overlay_strings_at_pos_p = false; | 9419 | it->ignore_overlay_strings_at_pos_p = false; |
| 9432 | 9420 | ||
| 9433 | /* Maybe run the redisplay end trigger hook. Performance note: | ||
| 9434 | This doesn't seem to cost measurable time. */ | ||
| 9435 | if (it->redisplay_end_trigger_charpos | ||
| 9436 | && it->glyph_row | ||
| 9437 | && IT_CHARPOS (*it) >= it->redisplay_end_trigger_charpos) | ||
| 9438 | run_redisplay_end_trigger_hook (it); | ||
| 9439 | |||
| 9440 | if (composition_break_at_point | 9421 | if (composition_break_at_point |
| 9441 | && !NILP (BVAR (current_buffer, enable_multibyte_characters)) | 9422 | && !NILP (BVAR (current_buffer, enable_multibyte_characters)) |
| 9442 | && !NILP (Vauto_composition_mode)) | 9423 | && !NILP (Vauto_composition_mode)) |
| @@ -9504,29 +9485,6 @@ next_element_from_buffer (struct it *it) | |||
| 9504 | } | 9485 | } |
| 9505 | 9486 | ||
| 9506 | 9487 | ||
| 9507 | /* Run the redisplay end trigger hook for IT. */ | ||
| 9508 | |||
| 9509 | static void | ||
| 9510 | run_redisplay_end_trigger_hook (struct it *it) | ||
| 9511 | { | ||
| 9512 | /* IT->glyph_row should be non-null, i.e. we should be actually | ||
| 9513 | displaying something, or otherwise we should not run the hook. */ | ||
| 9514 | eassert (it->glyph_row); | ||
| 9515 | |||
| 9516 | ptrdiff_t charpos = it->redisplay_end_trigger_charpos; | ||
| 9517 | it->redisplay_end_trigger_charpos = 0; | ||
| 9518 | |||
| 9519 | /* Since we are *trying* to run these functions, don't try to run | ||
| 9520 | them again, even if they get an error. */ | ||
| 9521 | wset_redisplay_end_trigger (it->w, Qnil); | ||
| 9522 | CALLN (Frun_hook_with_args, Qredisplay_end_trigger_functions, it->window, | ||
| 9523 | make_fixnum (charpos)); | ||
| 9524 | |||
| 9525 | /* Notice if it changed the face of the character we are on. */ | ||
| 9526 | handle_face_prop (it); | ||
| 9527 | } | ||
| 9528 | |||
| 9529 | |||
| 9530 | /* Deliver a composition display element. Unlike the other | 9488 | /* Deliver a composition display element. Unlike the other |
| 9531 | next_element_from_XXX, this function is not registered in the array | 9489 | next_element_from_XXX, this function is not registered in the array |
| 9532 | get_next_element[]. It is called from next_element_from_buffer and | 9490 | get_next_element[]. It is called from next_element_from_buffer and |
| @@ -36129,7 +36087,6 @@ be let-bound around code that needs to disable messages temporarily. */); | |||
| 36129 | DEFSYM (Qoverriding_terminal_local_map, "overriding-terminal-local-map"); | 36087 | DEFSYM (Qoverriding_terminal_local_map, "overriding-terminal-local-map"); |
| 36130 | DEFSYM (Qoverriding_local_map, "overriding-local-map"); | 36088 | DEFSYM (Qoverriding_local_map, "overriding-local-map"); |
| 36131 | DEFSYM (Qwindow_scroll_functions, "window-scroll-functions"); | 36089 | DEFSYM (Qwindow_scroll_functions, "window-scroll-functions"); |
| 36132 | DEFSYM (Qredisplay_end_trigger_functions, "redisplay-end-trigger-functions"); | ||
| 36133 | DEFSYM (Qinhibit_point_motion_hooks, "inhibit-point-motion-hooks"); | 36090 | DEFSYM (Qinhibit_point_motion_hooks, "inhibit-point-motion-hooks"); |
| 36134 | DEFSYM (Qeval, "eval"); | 36091 | DEFSYM (Qeval, "eval"); |
| 36135 | DEFSYM (QCdata, ":data"); | 36092 | DEFSYM (QCdata, ":data"); |
| @@ -36533,12 +36490,6 @@ is scrolled. It is not designed for that, and such use probably won't | |||
| 36533 | work. */); | 36490 | work. */); |
| 36534 | Vwindow_scroll_functions = Qnil; | 36491 | Vwindow_scroll_functions = Qnil; |
| 36535 | 36492 | ||
| 36536 | DEFVAR_LISP ("redisplay-end-trigger-functions", Vredisplay_end_trigger_functions, | ||
| 36537 | doc: /* Functions called when redisplay of a window reaches the end trigger. | ||
| 36538 | Each function is called with two arguments, the window and the end trigger value. | ||
| 36539 | See `set-window-redisplay-end-trigger'. */); | ||
| 36540 | Vredisplay_end_trigger_functions = Qnil; | ||
| 36541 | |||
| 36542 | DEFVAR_LISP ("mouse-autoselect-window", Vmouse_autoselect_window, | 36493 | DEFVAR_LISP ("mouse-autoselect-window", Vmouse_autoselect_window, |
| 36543 | doc: /* Non-nil means autoselect window with mouse pointer. | 36494 | doc: /* Non-nil means autoselect window with mouse pointer. |
| 36544 | If nil, do not autoselect windows. | 36495 | If nil, do not autoselect windows. |