[Top][All Lists]

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

Re: comint-carriage-motion causes severe problems.

From: Luc Teirlinck
Subject: Re: comint-carriage-motion causes severe problems.
Date: Tue, 2 Jul 2002 11:18:56 -0500 (CDT)

I now agree that comint-carriage-motion is appropriate for the global
value of comint-output-filter-functions.  I believe that there seems
to be consensus that it is not appropriate for the local ielm value.

The following code would implement this, but has some drawbacks:

 (setq comint-output-filter-functions
       (default-value 'comint-output-filter-functions))

 (remove-hook 'comint-output-filter-functions 'comint-carriage-motion t)

The drawbacks are that this creates an "old-style" local hook without
t and the Emacs Lisp manual as well as plenty of documentation strings
of hook-related functions seem to very emphatically state that this is
stylistically unacceptable.  (Or else I am misunderstanding them.)

The removal of t from the local value also means, as Stefan pointed
out, that changes in the global value will no longer be seen by the
local value.  Fortunately, this would be limited to the duration of
the present ielm run.

The question of how to best remove unwanted global functions from
the local values of hooks is, however, way more general and far
reaching than the particular question we are discussing.

I would argue for the desirability of Stefan's suggested additions to
the hook machinery.  I believe they are absolutely necessary.  We have
right here a very good example why.


Luc Teirlinck.

reply via email to

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