Subject: Re: bug#5327: 23.1; unload-feature-special-hooks add fill-nobreak-predicate
From: Juanma Barranquero <[email-masked]>
To: Kevin Ryde <[email-masked]>
Cc: [email-masked]
Date: Mon, 11 Jul 2011 18:25:01 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

On Wed, Jan 6, 2010 at 00:38, Kevin Ryde <[email-masked]> wrote:

>    M-x sgml-mode
>    M-x unload-feature sgml-mode
>    type in a long line to be filled
>    M-q
>    => Symbol's function definition is void: sgml-fill-nobreak

`fill-nobreak-predicate' was set locally, so it would be removed when
the mode for the buffer was changed. Previously, `unload-feature'
failed to do so unless the mode package's FEATURE-unload-function,
assuming one existed, did by itself. Since revno:104702
`unload-feature' does so automatically, so the above case should work
(i.e, unloading sgml-mode will change the buffer's major mode to
text-mode).

That said, I'll add that variable and some of the others you mentioned
to `unload-feature-special-hooks' because it's better to be safe than
sorry. But, what would be nice is some way to identify hook variables
in a generic way, instead of special-casing still more of them. :-(

>   find-directory-functions
>   auto-coding-functions

OK.

>   compile-command-default-functions

I cannot find that one in the Emacs sources.

    Juanma