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

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

bug#8781: bug#8730: bug#8781: 24.0.50; unload-feature don't restore defa


From: Stefan Monnier
Subject: bug#8781: bug#8730: bug#8781: 24.0.50; unload-feature don't restore default key
Date: Thu, 02 Jun 2011 09:26:59 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>>> 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





reply via email to

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