]> git.eshelyaron.com Git - emacs.git/commitdiff
Delete redisplay-end-trigger-functions and related defuns
authorStefan Kangas <stefan@marxist.se>
Sat, 30 Jul 2022 23:44:22 +0000 (01:44 +0200)
committerStefan Kangas <stefan@marxist.se>
Sat, 30 Jul 2022 23:44:22 +0000 (01:44 +0200)
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.

admin/coccinelle/window.cocci
doc/lispref/hooks.texi
etc/NEWS
lisp/emacs-lisp/byte-opt.el
lisp/loadhist.el
lisp/subr.el
src/dispextern.h
src/window.c
src/window.h
src/xdisp.c

index 1448febfcc14c728d53ab3af28d9a630a4399ae6..4543fb2ce15f8cfbd19745778f2417a4aea4c48d 100644 (file)
@@ -106,9 +106,6 @@ Lisp_Object O;
 - W->column_number_displayed
 + WVAR (W, column_number_displayed)
 |
-- W->redisplay_end_trigger
-+ WVAR (W, redisplay_end_trigger)
-|
 - W->combination_limit
 + WVAR (W, combination_limit)
 |
@@ -225,9 +222,6 @@ Lisp_Object O;
 - XWINDOW (O)->column_number_displayed
 + WVAR (XWINDOW (O), column_number_displayed)
 |
-- XWINDOW (O)->redisplay_end_trigger
-+ WVAR (XWINDOW (O), redisplay_end_trigger)
-|
 - XWINDOW (O)->combination_limit
 + WVAR (XWINDOW (O), combination_limit)
 |
index 59b7930732f51ead74d6ce4d0eadd6ffc502d9ae..339e1387d2edfb559fdede600c03f2d0b3f17c34 100644 (file)
@@ -280,7 +280,6 @@ kbd-macro-termination-hook
 signal-hook-function
 
 C functions:
-redisplay-end-trigger-functions
 x-lost-selection-functions
 x-sent-selection-functions
 
index e74f60780f9cde1e3b6bded15d026c9f79bfa4cd..489948214df41e79a7f204f9ce38377b3182079c 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2452,8 +2452,9 @@ but switching to `ash` is generally much preferable.
 ---
 ** Some functions and variables obsolete since Emacs 23 have been removed:
 'find-emacs-lisp-shadows', 'newsticker-cache-filename',
+'redisplay-end-trigger-functions', 'set-window-redisplay-end-trigger',
 'unify-8859-on-decoding-mode', 'unify-8859-on-encoding-mode',
-'vc-arch-command'.
+'vc-arch-command', 'window-redisplay-end-trigger'.
 
 +++
 ** New generic function 'function-documentation'.
index 9817fa0eb158f98d07cebe40f0dcfe7dc7fa7c92..7a4bbf2e8afc95ef314f6e67a1950d6d5d1946ee 100644 (file)
@@ -1471,7 +1471,7 @@ See Info node `(elisp) Integer Basics'."
         window-next-buffers window-next-sibling window-new-normal
         window-new-total window-normal-size window-parameter window-parameters
         window-parent window-pixel-edges window-point window-prev-buffers
-        window-prev-sibling window-redisplay-end-trigger window-scroll-bars
+         window-prev-sibling window-scroll-bars
         window-start window-text-height window-top-child window-top-line
         window-total-height window-total-width window-use-time window-vscroll
         window-width zerop))
index 39481ab06840694d27c1eaef7ea3607e571a8868..b4ed0432465789938b69a528ecd1a9a69860b718 100644 (file)
@@ -128,7 +128,7 @@ from a file."
     font-lock-unfontify-region-function
     kill-buffer-query-functions kill-emacs-query-functions
     lisp-indent-function mouse-position-function
-    redisplay-end-trigger-functions suspend-tty-functions
+    suspend-tty-functions
     temp-buffer-show-function window-scroll-functions
     window-size-change-functions write-contents-functions
     write-file-functions write-region-annotate-functions)
index c220a7f4a88b570eb89541a2d934a977da589a16..1a16d781174c035428f8cc9442d446279f9f2695 100644 (file)
@@ -1860,10 +1860,7 @@ be a list of the form returned by `event-start' and `event-end'."
 \f
 ;;;; Obsolescence declarations for variables, and aliases.
 
-(make-obsolete-variable 'redisplay-end-trigger-functions 'jit-lock-register "23.1")
 (make-obsolete-variable 'redisplay-dont-pause nil "24.5")
-(make-obsolete 'window-redisplay-end-trigger nil "23.1")
-(make-obsolete 'set-window-redisplay-end-trigger nil "23.1")
 (make-obsolete-variable 'operating-system-release nil "28.1")
 (make-obsolete-variable 'inhibit-changing-match-data 'save-match-data "29.1")
 
index 817211e795eb2dcc34bed9a9d2f6a64c6a09fbb4..037e02ff58f4d6c247d4a49eb00a4cc8cfe03144 100644 (file)
@@ -2350,9 +2350,6 @@ struct it
      used for overlay strings and strings from display properties.  */
   ptrdiff_t string_nchars;
 
-  /* Position at which redisplay end trigger functions should be run.  */
-  ptrdiff_t redisplay_end_trigger_charpos;
-
   /* True means multibyte characters are enabled.  */
   bool_bf multibyte_p : 1;
 
index 33a1b8a4bf45bffe34d2c6336b3523094df325d9..afb8f75537b7629397a33344a3129463146f3c26 100644 (file)
@@ -1300,31 +1300,6 @@ window so that the location of point moves off-window.  */)
   return set_window_hscroll (decode_live_window (window), XFIXNUM (ncol));
 }
 
-DEFUN ("window-redisplay-end-trigger", Fwindow_redisplay_end_trigger,
-       Swindow_redisplay_end_trigger, 0, 1, 0,
-       doc: /* Return WINDOW's redisplay end trigger value.
-WINDOW must be a live window and defaults to the selected one.
-See `set-window-redisplay-end-trigger' for more information.  */)
-  (Lisp_Object window)
-{
-  return decode_live_window (window)->redisplay_end_trigger;
-}
-
-DEFUN ("set-window-redisplay-end-trigger", Fset_window_redisplay_end_trigger,
-       Sset_window_redisplay_end_trigger, 2, 2, 0,
-       doc: /* Set WINDOW's redisplay end trigger value to VALUE.
-WINDOW must be a live window and defaults to the selected one.  VALUE
-should be a buffer position (typically a marker) or nil.  If it is a
-buffer position, then if redisplay in WINDOW reaches a position beyond
-VALUE, the functions in `redisplay-end-trigger-functions' are called
-with two arguments: WINDOW, and the end trigger value.  Afterwards the
-end-trigger value is reset to nil.  */)
-  (register Lisp_Object window, Lisp_Object value)
-{
-  wset_redisplay_end_trigger (decode_live_window (window), value);
-  return value;
-}
-
 /* Test if the character at column X, row Y is within window W.
    If it is not, return ON_NOTHING;
    if it is on the window's vertical divider, return
@@ -8640,8 +8615,6 @@ displayed after a scrolling operation to be somewhat inaccurate.  */);
   defsubr (&Swindow_body_width);
   defsubr (&Swindow_hscroll);
   defsubr (&Sset_window_hscroll);
-  defsubr (&Swindow_redisplay_end_trigger);
-  defsubr (&Sset_window_redisplay_end_trigger);
   defsubr (&Swindow_mode_line_height);
   defsubr (&Swindow_header_line_height);
   defsubr (&Swindow_tab_line_height);
index c63b1b24d4ff367df7802b62cbc6e6f0f0237aca..93817a9544543f9e6d56e6ad68d652290da9aad7 100644 (file)
@@ -199,10 +199,6 @@ struct window
        and Qt, so bitfield can't be used here.  */
     Lisp_Object dedicated;
 
-    /* If redisplay in this window goes beyond this buffer position,
-       must run the redisplay-end-trigger-hook.  */
-    Lisp_Object redisplay_end_trigger;
-
     /* t means this window's child windows are not (re-)combined.  */
     Lisp_Object combination_limit;
 
@@ -497,12 +493,6 @@ wset_prev (struct window *w, Lisp_Object val)
   w->prev = val;
 }
 
-INLINE void
-wset_redisplay_end_trigger (struct window *w, Lisp_Object val)
-{
-  w->redisplay_end_trigger = val;
-}
-
 INLINE void
 wset_mode_line_help_echo (struct window *w, Lisp_Object val)
 {
index b1ee7889d46a9fb53ddf664b6850b993e1198d59..88a489e290f6ed8d9e6a74e2a0a814598ae4b06b 100644 (file)
@@ -1138,7 +1138,6 @@ static int display_string (const char *, Lisp_Object, Lisp_Object,
                            ptrdiff_t, ptrdiff_t, struct it *, int, int, int,
                           int);
 static void compute_line_metrics (struct it *);
-static void run_redisplay_end_trigger_hook (struct it *);
 static bool get_overlay_strings (struct it *, ptrdiff_t);
 static bool get_overlay_strings_1 (struct it *, ptrdiff_t, bool);
 static void next_overlay_string (struct it *);
@@ -3279,17 +3278,6 @@ init_iterator (struct it *it, struct window *w,
   /* Are multibyte characters enabled in current_buffer?  */
   it->multibyte_p = !NILP (BVAR (current_buffer, enable_multibyte_characters));
 
-  /* Get the position at which the redisplay_end_trigger hook should
-     be run, if it is to be run at all.  */
-  if (MARKERP (w->redisplay_end_trigger)
-      && XMARKER (w->redisplay_end_trigger)->buffer != 0)
-    it->redisplay_end_trigger_charpos
-      = marker_position (w->redisplay_end_trigger);
-  else if (FIXNUMP (w->redisplay_end_trigger))
-    it->redisplay_end_trigger_charpos
-      = clip_to_bounds (PTRDIFF_MIN, XFIXNUM (w->redisplay_end_trigger),
-                       PTRDIFF_MAX);
-
   it->tab_width = SANE_TAB_WIDTH (current_buffer);
 
   /* Are lines in the display truncated?  */
@@ -9430,13 +9418,6 @@ next_element_from_buffer (struct it *it)
         previously seen overlays is no longer valid.  */
       it->ignore_overlay_strings_at_pos_p = false;
 
-      /* Maybe run the redisplay end trigger hook.  Performance note:
-        This doesn't seem to cost measurable time.  */
-      if (it->redisplay_end_trigger_charpos
-         && it->glyph_row
-         && IT_CHARPOS (*it) >= it->redisplay_end_trigger_charpos)
-       run_redisplay_end_trigger_hook (it);
-
       if (composition_break_at_point
          && !NILP (BVAR (current_buffer, enable_multibyte_characters))
          && !NILP (Vauto_composition_mode))
@@ -9504,29 +9485,6 @@ next_element_from_buffer (struct it *it)
 }
 
 
-/* Run the redisplay end trigger hook for IT.  */
-
-static void
-run_redisplay_end_trigger_hook (struct it *it)
-{
-  /* IT->glyph_row should be non-null, i.e. we should be actually
-     displaying something, or otherwise we should not run the hook.  */
-  eassert (it->glyph_row);
-
-  ptrdiff_t charpos = it->redisplay_end_trigger_charpos;
-  it->redisplay_end_trigger_charpos = 0;
-
-  /* Since we are *trying* to run these functions, don't try to run
-     them again, even if they get an error.  */
-  wset_redisplay_end_trigger (it->w, Qnil);
-  CALLN (Frun_hook_with_args, Qredisplay_end_trigger_functions, it->window,
-        make_fixnum (charpos));
-
-  /* Notice if it changed the face of the character we are on.  */
-  handle_face_prop (it);
-}
-
-
 /* Deliver a composition display element.  Unlike the other
    next_element_from_XXX, this function is not registered in the array
    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. */);
   DEFSYM (Qoverriding_terminal_local_map, "overriding-terminal-local-map");
   DEFSYM (Qoverriding_local_map, "overriding-local-map");
   DEFSYM (Qwindow_scroll_functions, "window-scroll-functions");
-  DEFSYM (Qredisplay_end_trigger_functions, "redisplay-end-trigger-functions");
   DEFSYM (Qinhibit_point_motion_hooks, "inhibit-point-motion-hooks");
   DEFSYM (Qeval, "eval");
   DEFSYM (QCdata, ":data");
@@ -36533,12 +36490,6 @@ is scrolled.  It is not designed for that, and such use probably won't
 work.  */);
   Vwindow_scroll_functions = Qnil;
 
-  DEFVAR_LISP ("redisplay-end-trigger-functions", Vredisplay_end_trigger_functions,
-    doc: /* Functions called when redisplay of a window reaches the end trigger.
-Each function is called with two arguments, the window and the end trigger value.
-See `set-window-redisplay-end-trigger'.  */);
-  Vredisplay_end_trigger_functions = Qnil;
-
   DEFVAR_LISP ("mouse-autoselect-window", Vmouse_autoselect_window,
      doc: /* Non-nil means autoselect window with mouse pointer.
 If nil, do not autoselect windows.