From xemacs-m  Fri Aug 22 07:41:54 1997
Received: from frege.math.ethz.ch (root@frege-d-math-north-g-west.math.ethz.ch [129.132.145.3])
	by xemacs.org (8.8.5/8.8.5) with SMTP id HAA26599
	for <xemacs-beta@xemacs.org>; Fri, 22 Aug 1997 07:41:46 -0500 (CDT)
Received: from midget (vroonhof@midget [129.132.145.4]) by frege.math.ethz.ch (8.6.12/Main-STAT-mailer) with ESMTP id OAA22493 for <xemacs-beta@xemacs.org>; Fri, 22 Aug 1997 14:41:06 +0200
Received: (vroonhof@localhost) by midget (SMI-8.6/D-MATH-client) id OAA23965; Fri, 22 Aug 1997 14:41:05 +0200
To: xemacs-beta@xemacs.org
Subject: Re: A prototype solution for true demand locking..
References: <199708211520.LAA26108@ten-thousand-dollar-bill.MIT.EDU> <by67szo39g.fsf@midget.math.ethz.ch> <8667szfmiu.fsf@kramer.in.aventail.com>
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=US-ASCII
From: Jan Vroonhof <vroonhof@math.ethz.ch>
Date: 22 Aug 1997 14:41:05 +0200
In-Reply-To: wmperry@aventail.com's message of 21 Aug 1997 10:56:09 -0700
Message-ID: <byoh6qo0f2.fsf@midget.math.ethz.ch>
Lines: 45
X-Mailer: Gnus v5.4.55/XEmacs 19.15

wmperry@aventail.com (William M. Perry) writes:

>   I can see the utility in this, but I think setting it up as a single-shot 
> function is not necessarily the right way to do it.  I'd call it something
> like 'display-hook' (redisplay-hook(s)?), and make it up to the package to
> make it one-shot or not, by modifying the extent from within the
> hook.

The reasen I made it one shot is so that the function is not called too
often. The display code now sends of an eval event for the lisp
function. What happens when another redisplay happens before the event
is processed?

It also makes the implemenation easier because I don't have to worry
about the extent belonging to multiple extent fragments.

But this is just internal convention. You could easily invent a new
event property called 'display-hook and then then set the one shot
function to

(defun run-event-hook-and-reinstall (event)
   (
     (run-hook-with-args (get-extent-property extent 'display-hook)
          event)
     (set-one-shot-function extent 'run-event-hook-and-reinstall)))


> > As you play around with it you will see that you can outsmart the current
> > naive implementation by making large jumps, especially on a beta XEmacs
> > with all the extent debugging code compiled in.  You will see blue text
> > that after a brief moment flashes red.
> 
>   I don't think there's a way to get around this. :)  Unless we make XEmacs 
> lisp much much much faster.

I thought the best way to solve this to inhibit the redisplay of this
part of the buffer for one go, then the old version is never shown and
you won't see flicker. However then you have to abort the redisplay
correctly which is much more complicated than the way it is done now.

Note that I don't use lazy-lock enough to check if you also see this
kind of effects with the current lazylock (which gets in before
redisplay)

Jan

