help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: post-self-insert-hook being reset?


From: Sam Halliday
Subject: Re: post-self-insert-hook being reset?
Date: Wed, 17 Jun 2015 13:46:37 -0700 (PDT)
User-agent: G2/1.0

On Wednesday, 17 June 2015 18:15:21 UTC+1, Stefan Monnier  wrote:
> > There are a class of hooks (post-command-hook, after-change-functions)
> > that nil themselves on error.
> 
> Actually, these have been refined since to only remove the offending
> function rather than set themselves straight to nil.
> And they emit a warning when that happens.
> 
> > I guess post-self-insert-hook  is one of these.
> 
> That was a good guess, but:
> 
>    src/cmds.c:  run_hook (Qpost_self_insert_hook);
> 
> so, no, it's run "in the normal way".  'Must be something else.

Thanks Stefan.

Is there anything else that could be removing the member? The only place I can 
see where the list is wiped is the lisp/subr.el function when reading a 
password and I don't think that's relevant. And I can't see anywhere where a 
single hook is removed.

I noticed that scala-mode is setting post-self-insert-hook to be a local 
variable, but that doesn't explain why this specific post-self-insert-hook is 
being wiped from all major modes. 
https://github.com/hvesalai/scala-mode2/blob/master/scala-mode2.el#L92

I'm not seeing any errors in the *Messages* buffer.

Best regards,
Sam


reply via email to

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