emacs-devel
[Top][All Lists]
Advanced

[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: Wed, 3 Jul 2002 22:49:04 -0500 (CDT)

Dear Stefan,

Here is my more concrete proposal:

Here is your commented out code:


    ;; If the function is on the global hook, we need to shadow it
       locally
    ;;(when (and local (member function (default-value hook))
    ;;             (not (member (cons 'not function) hook-value)))
    ;;  (push (cons 'not function) hook-value))

There actually is a problem with this.  We want locally nothing to do
with 'function'.  But if 'function' is not currently a member of the
default-value, any later adding to the global value will reintroduce
it.  So I would suggest to replace:

(and local (member function (default-value hook))
       (not ...

with:

(and (eq local 'override) (not ...))
               
I believe this single change might be sufficient to both implement my
previous suggestion and make sure that any later adding of 'function'
to the default-value will be shadowed locally.  If no shadowing of the
global value is wanted, we call with local equal to t or 'local,
whatever.  If we want the behavior your code implements, we call with
local equal to 
(if (member function (default-value hook)) 'override 'local)

So, unless I am missing something, I believe my suggested changes
would not force you to rewrite every detail of your code.  Just the one
small change above would suffice.  (Again, unless I am missing
something.)


What do you think?

Sincerely,

Luc Teirlinck.


       



reply via email to

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