emacs-devel
[Top][All Lists]
Advanced

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

Re: Unbalanced change hooks (part 2)


From: Alan Mackenzie
Subject: Re: Unbalanced change hooks (part 2)
Date: Tue, 2 Aug 2016 10:15:49 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

Hello, Richard.

On Mon, Aug 01, 2016 at 12:38:42PM -0400, Richard Stallman wrote:
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]

>   > There are several functions in .../src/insdel.c which have a parameter
>   > `prepare'.  The meaning of `prepare' is "direct the function to call
>   > prepare_to_modify_buffer" (YUCK!).

> Why do you say "yuck" to that?

Hey, don't misquote me!  I said "YUCK!", not "yuck".  :-)

It's my emotional reaction to a dodgy coding practice.  We have two
functions, one of which assumes far too much about the inner workings of
the other.  This "convolution" (as Richard Copley described it) is
liable to lead to all sorts of tangles and awkwardnesses and things
generally being very difficult to maintain.

> I'm not saying it can't have problems, or that you can't
> think of some change for the better.  However, to merit "yuck",
> it would have to be grossly and conspicuously bad.

I think the particular instance IS grossly and conspicuously bad.  The
resulting code is so difficult to maintain that (i) our
before-change-functions/after-change-functions mechanism is broken, in
that the b-c-f hook is only called for some changes, not all changes;
(ii) Eli Z. has forcefully declined my offer to fix this, on the grounds
that the pertinent code (in .../src/insdel.c) is so fragile that any
attempt to fix it will inevitably introduce hidden bugs elsewhere.

This `prepare' parameter is central to the difficulties of fixing/not
being able to fix the b-c-f/a-c-f mechanism.

> -- 
> 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]