emacs-devel
[Top][All Lists]
Advanced

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

Re: define-derived-mode runs parent mode hook after evaluating body


From: Stefan Monnier
Subject: Re: define-derived-mode runs parent mode hook after evaluating body
Date: Sat, 21 Jul 2007 23:08:33 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

>> Is it really useful/needed to delay the hook of the parent mode in a
>> derived mode until after evaluating the body?

>     Yes.  It took a good bit of effort to do it, so yes, it is useful/needed.

> Do you remember the sort of problems which we solved with this?

Customizations that need to modify variable settings based on the
major-mode's value (e.g. add an element to a list).
Or customizations that depend on the major mode's variable settings
(e.g. font-lock-mode, which if turned ON too early tends to use the
font-lock-keywords of the parent mode rather than the child's, although
this particular case was worked around specifically because just fixing
define-derived-mode wasn't sufficient).


        Stefan




reply via email to

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