Subject: Re: bug#8781: bug#8730: bug#8781: 24.0.50; unload-feature don't restore default key

From: Stefan Monnier <[email-masked]>
Date: Thu, 02 Jun 2011 09:26:59 -0300

>>> Try the following patch. It sets [pj]ython-mode buffers to
>>> (default-value 'major-mode), and inferior-python-mode buffers to the
>>> parent of this mode (comint).
>> I guess this part could be part of the generic unload-feature code.
> How can we reliably determine that a symbol represents a major mode
> name?

We don't have to do it for all cases, but recognizing major modes
defined by define-derived-mode is easy: check the
`derived-mode-parent' property.

> Or are you proposing to go through the buffer list and checking
> whether their major modes are defined in the package being unloaded?

Ah, yes, indeed, that's another solution that would work as well.

        Stefan