all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Obsolete redisplay-end-trigger and lazy-lock.el
@ 2013-02-01  8:24 Dmitry Antipov
  2013-02-01 10:36 ` Eli Zaretskii
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Dmitry Antipov @ 2013-02-01  8:24 UTC (permalink / raw)
  To: Emacs development discussions

[-- Attachment #1: Type: text/plain, Size: 151 bytes --]

This stuff was marked obsolete in 2008, and the only user is lazy-lock.el;
if the latter has no real users, can we drop its low-level support?

Dmitry

[-- Attachment #2: redisplay_end_trigger.patch --]
[-- Type: text/plain, Size: 9354 bytes --]

=== modified file 'lisp/emacs-lisp/byte-opt.el'
--- lisp/emacs-lisp/byte-opt.el	2013-01-02 16:13:04 +0000
+++ lisp/emacs-lisp/byte-opt.el	2013-02-01 08:07:03 +0000
@@ -1231,7 +1231,7 @@
 	 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))

=== modified file 'lisp/loadhist.el'
--- lisp/loadhist.el	2013-01-01 09:11:05 +0000
+++ lisp/loadhist.el	2013-02-01 08:07:03 +0000
@@ -131,7 +131,7 @@
     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)

=== modified file 'lisp/subr.el'
--- lisp/subr.el	2013-01-13 01:23:48 +0000
+++ lisp/subr.el	2013-02-01 08:07:03 +0000
@@ -1237,11 +1237,8 @@
       "use enable-multibyte-characters or set-buffer-multibyte instead" "23.2")
 
 (make-obsolete-variable 'define-key-rebound-commands nil "23.2")
-(make-obsolete-variable 'redisplay-end-trigger-functions 'jit-lock-register "23.1")
 (make-obsolete-variable 'deferred-action-list 'post-command-hook "24.1")
 (make-obsolete-variable 'deferred-action-function 'post-command-hook "24.1")
-(make-obsolete 'window-redisplay-end-trigger nil "23.1")
-(make-obsolete 'set-window-redisplay-end-trigger nil "23.1")
 
 (make-obsolete 'process-filter-multibyte-p nil "23.1")
 (make-obsolete 'set-process-filter-multibyte nil "23.1")

=== modified file 'src/dispextern.h'
--- src/dispextern.h	2013-01-02 16:13:04 +0000
+++ src/dispextern.h	2013-02-01 08:07:03 +0000
@@ -2151,9 +2151,6 @@
      visible in the window.  */
   ptrdiff_t region_beg_charpos, region_end_charpos;
 
-  /* Position at which redisplay end trigger functions should be run.  */
-  ptrdiff_t redisplay_end_trigger_charpos;
-
   /* 1 means multibyte characters are enabled.  */
   unsigned multibyte_p : 1;
 

=== modified file 'src/window.c'
--- src/window.c	2013-02-01 07:23:18 +0000
+++ src/window.c	2013-02-01 08:07:03 +0000
@@ -882,31 +882,6 @@
   return set_window_hscroll (decode_live_window (window), XINT (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;
-}
-
 DEFUN ("window-edges", Fwindow_edges, Swindow_edges, 0, 1, 0,
        doc: /* Return a list of the edge coordinates of WINDOW.
 WINDOW must be a valid window and defaults to the selected one.
@@ -6877,8 +6852,6 @@
   defsubr (&Swindow_body_width);
   defsubr (&Swindow_hscroll);
   defsubr (&Sset_window_hscroll);
-  defsubr (&Swindow_redisplay_end_trigger);
-  defsubr (&Sset_window_redisplay_end_trigger);
   defsubr (&Swindow_edges);
   defsubr (&Swindow_pixel_edges);
   defsubr (&Swindow_absolute_pixel_edges);

=== modified file 'src/window.h'
--- src/window.h	2013-02-01 07:23:18 +0000
+++ src/window.h	2013-02-01 08:07:03 +0000
@@ -192,10 +192,6 @@
        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;
 
@@ -368,11 +364,6 @@
   w->prev = val;
 }
 WINDOW_INLINE void
-wset_redisplay_end_trigger (struct window *w, Lisp_Object val)
-{
-  w->redisplay_end_trigger = val;
-}
-WINDOW_INLINE void
 wset_top_line (struct window *w, Lisp_Object val)
 {
   w->top_line = val;

=== modified file 'src/xdisp.c'
--- src/xdisp.c	2013-02-01 07:23:18 +0000
+++ src/xdisp.c	2013-02-01 08:07:03 +0000
@@ -324,7 +324,6 @@
 Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
 Lisp_Object Qwindow_scroll_functions;
 static Lisp_Object Qwindow_text_change_functions;
-static Lisp_Object Qredisplay_end_trigger_functions;
 Lisp_Object Qinhibit_point_motion_hooks;
 static Lisp_Object QCeval, QCpropertize;
 Lisp_Object QCfile, QCdata;
@@ -873,7 +872,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 int get_overlay_strings (struct it *, ptrdiff_t);
 static int get_overlay_strings_1 (struct it *, ptrdiff_t, int);
 static void next_overlay_string (struct it *);
@@ -2707,16 +2705,6 @@
   else
     it->region_beg_charpos = it->region_end_charpos = -1;
 
-  /* 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 (INTEGERP (w->redisplay_end_trigger))
-    it->redisplay_end_trigger_charpos =
-      clip_to_bounds (PTRDIFF_MIN, XINT (w->redisplay_end_trigger), PTRDIFF_MAX);
-
   it->tab_width = SANE_TAB_WIDTH (current_buffer);
 
   /* Are lines in the display truncated?  */
@@ -7969,13 +7957,6 @@
       unsigned char *p;
       ptrdiff_t stop;
 
-      /* 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);
-
       stop = it->bidi_it.scan_dir < 0 ? -1 : it->end_charpos;
       if (CHAR_COMPOSED_P (it, IT_CHARPOS (*it), IT_BYTEPOS (*it),
 			   stop)
@@ -8030,34 +8011,6 @@
   return success_p;
 }
 
-
-/* Run the redisplay end trigger hook for IT.  */
-
-static void
-run_redisplay_end_trigger_hook (struct it *it)
-{
-  Lisp_Object args[3];
-
-  /* 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);
-
-  /* Set up hook arguments.  */
-  args[0] = Qredisplay_end_trigger_functions;
-  args[1] = it->window;
-  XSETINT (args[2], 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);
-  Frun_hook_with_args (3, args);
-
-  /* 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
@@ -28597,7 +28550,6 @@
   DEFSYM (Qoverriding_local_map, "overriding-local-map");
   DEFSYM (Qwindow_scroll_functions, "window-scroll-functions");
   DEFSYM (Qwindow_text_change_functions, "window-text-change-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");
@@ -28886,12 +28838,6 @@
     doc: /* Functions to call in redisplay when text in the window might change.  */);
   Vwindow_text_change_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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Obsolete redisplay-end-trigger and lazy-lock.el
  2013-02-01  8:24 Obsolete redisplay-end-trigger and lazy-lock.el Dmitry Antipov
@ 2013-02-01 10:36 ` Eli Zaretskii
  2013-02-01 12:14 ` Xue Fuqiao
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2013-02-01 10:36 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: emacs-devel

> Date: Fri, 01 Feb 2013 12:24:13 +0400
> From: Dmitry Antipov <dmantipov@yandex.ru>
> 
> This stuff was marked obsolete in 2008, and the only user is lazy-lock.el;
> if the latter has no real users, can we drop its low-level support?

This is for Stefan to answer, AFAIU he has some kind of plan or desire
to use this for things that now use the evil post-command-hook or
other tricks.  I'm on the fence wrt this.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Obsolete redisplay-end-trigger and lazy-lock.el
  2013-02-01  8:24 Obsolete redisplay-end-trigger and lazy-lock.el Dmitry Antipov
  2013-02-01 10:36 ` Eli Zaretskii
@ 2013-02-01 12:14 ` Xue Fuqiao
  2013-02-01 13:21 ` Eli Zaretskii
  2013-02-01 15:39 ` Stefan Monnier
  3 siblings, 0 replies; 6+ messages in thread
From: Xue Fuqiao @ 2013-02-01 12:14 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: Emacs development discussions

On Fri, 01 Feb 2013 12:24:13 +0400
Dmitry Antipov <dmantipov@yandex.ru> wrote:

> This stuff was marked obsolete in 2008, and the only user is lazy-lock.el;
> if the latter has no real users, can we drop its low-level support?

I agree.  Personally, I only use just-in-time Lock mode.

-- 
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Obsolete redisplay-end-trigger and lazy-lock.el
  2013-02-01  8:24 Obsolete redisplay-end-trigger and lazy-lock.el Dmitry Antipov
  2013-02-01 10:36 ` Eli Zaretskii
  2013-02-01 12:14 ` Xue Fuqiao
@ 2013-02-01 13:21 ` Eli Zaretskii
  2013-02-01 15:39 ` Stefan Monnier
  3 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2013-02-01 13:21 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: emacs-devel

> Date: Fri, 01 Feb 2013 12:24:13 +0400
> From: Dmitry Antipov <dmantipov@yandex.ru>
> 
> This stuff was marked obsolete in 2008, and the only user is lazy-lock.el;
> if the latter has no real users, can we drop its low-level support?

This is for Stefan to answer, AFAIU he has some kind of plan or desire
to use this for things that now use the evil post-command-hook or
other tricks.  I'm on the fence wrt this.

OTOH, removing this stuff will break lazy-lock.el, so if we are
dropping this feature, we should delete lazy-lock.el and all its
traces as well.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Obsolete redisplay-end-trigger and lazy-lock.el
  2013-02-01  8:24 Obsolete redisplay-end-trigger and lazy-lock.el Dmitry Antipov
                   ` (2 preceding siblings ...)
  2013-02-01 13:21 ` Eli Zaretskii
@ 2013-02-01 15:39 ` Stefan Monnier
  2013-02-01 16:02   ` Xue Fuqiao
  3 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2013-02-01 15:39 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: Emacs development discussions

> This stuff was marked obsolete in 2008, and the only user is lazy-lock.el;
> if the latter has no real users, can we drop its low-level support?

That would entail removing lazy-lock.el.
For Emacs-24.1, we dropped the "obsolete since Emacs-21" but not the
"obsolete since Emacs-22", so I think I'd rather not do that yet.

Unless there's a particular reason to want to remove
redisplay-end-trigger, of course.


        Stefan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Obsolete redisplay-end-trigger and lazy-lock.el
  2013-02-01 15:39 ` Stefan Monnier
@ 2013-02-01 16:02   ` Xue Fuqiao
  0 siblings, 0 replies; 6+ messages in thread
From: Xue Fuqiao @ 2013-02-01 16:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Dmitry Antipov, Emacs development discussions

On Fri, 01 Feb 2013 10:39:21 -0500
Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> For Emacs-24.1, we dropped the "obsolete since Emacs-21" but not the
> "obsolete since Emacs-22", so I think I'd rather not do that yet.

Does that apply to every Emacs major version?  I mean for emacs-nn, we will drop the "obsolete since emacs-{nn-3}".

-- 
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-02-01 16:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-01  8:24 Obsolete redisplay-end-trigger and lazy-lock.el Dmitry Antipov
2013-02-01 10:36 ` Eli Zaretskii
2013-02-01 12:14 ` Xue Fuqiao
2013-02-01 13:21 ` Eli Zaretskii
2013-02-01 15:39 ` Stefan Monnier
2013-02-01 16:02   ` Xue Fuqiao

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.