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: Stefan Monnier
Subject: Re: post-self-insert-hook being reset?
Date: Wed, 17 Jun 2015 21:43:51 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> I noticed that scala-mode is setting post-self-insert-hook to be a local
> variable,

Sounds like a bug.  You normally use the `local' arg of add-hook for that.
Worse: they make it buffer-local and then they don't actually change it,
it seems: "only pain, no gain".

> 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

One more thing: is the hook set to nil, or is your hook function being
removed (i.e. do other hook functions stay on that hook, or not)?  Also,
does this affect the global value of the hook, or also the buffer-local value?


        Stefan


reply via email to

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