[Top][All Lists]

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

Re: comint-carriage-motion causes severe problems.

From: Stefan Monnier
Subject: Re: comint-carriage-motion causes severe problems.
Date: Thu, 04 Jul 2002 13:04:41 -0400

> Let me just tell you about my concern.  Through autoloads, :load and
> :require keywords in defgroups and defcustoms and so on, plenty of
> functions can be unpredictably added to the global values of hooks,
> behind the user's back.  This actually happens all the time in
> practice.  Just searching for some item using customize-browse can add
> plenty of functions to hooks, even if no custumizations are actually
> made.  Some of these functions may be globally necessary, but cause
> trouble locally.  We may want to exclude them from the local value
> before they appear in the global one because we have no idea when that
> might happen.

I haven't seen any evidence for the need of such a thing.
The only cases I've seen where my patch is useful is when you want to
turn a feature on globally but turn it off at a few places.
Global customizations normally occur before buffers are created, so
before the (remove-hook 'foo 'bar 'local) has even a chance of being run.
If you could show me something more concrete, I might better understand
your concern.

>    After all
>             (remove-hook 'foo 'bar)
>             (add-hook 'foo 'bar)
>       does not prevent `bar' from being run (the `remove-hook' above ends up
>       being a noop).
> This is not the same situation. We remove bar fom the global value
> and add it right back.  Clearly that should be a no-op.

I assumed that the hook was nil before the above two commands were executed,
which is why the `remove-hook' is a noop.


reply via email to

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