[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New hook before-region-change-functions wanted

From: Alan Mackenzie
Subject: Re: New hook before-region-change-functions wanted
Date: Mon, 11 Sep 2017 16:45:05 +0000
User-agent: Mutt/1.7.2 (2016-11-26)

Hello, Richard.

On Sun, Sep 10, 2017 at 21:17:57 -0400, Richard Stallman wrote:
>   > > The other approach has the virtue of being entirely internal.  It will
>   > > not require an announcement, or adding to the Lisp manual.

>   > Yes.  This other approach is slightly more difficult to debug with, but
>   > not unreasonably so.

> Just from curiosity, why is it more difficult to debug with?
> Since it has no effect on behavior, and its only effect is to speed
> up some cases, I'd expect it to have no effect on debugging.

> Is there something I am missing?

As I said, the difference was small.

With the hook in place, the filling and use of the cache was entirely
disjoint from swapping the caches in and out - the former occurred on
calling syntax-ppss, the latter on the hook called from

Using the actual solution, the swapping in and out of the caches
occurred at the beginning of syntax-ppss (if needed), and NOT on
widen/n-t-r.  So until I got used to it, I was calling n-t-r, then
forgetting a token invocation of syntax-ppss, and wondering why the
caches hadn't been swapped.

In that sense, the hook would have been a cleaner solution.  A pity
about its overwhelming disadvantages.

> -- 
> Dr Richard Stallman
> President, Free Software Foundation (gnu.org, fsf.org)
> Internet Hall-of-Famer (internethalloffame.org)
> Skype: No way! See stallman.org/skype.html.

Alan Mackenzie (Nuremberg, Germany).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]