From: Richard Stallman <rms@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: rudalics@gmx.at, emacs-devel@gnu.org
Subject: Re: define-derived-mode runs parent mode hook after evaluating body
Date: Sun, 22 Jul 2007 14:37:22 -0400 [thread overview]
Message-ID: <E1ICgJ0-0005jy-8V@fencepost.gnu.org> (raw)
In-Reply-To: <jwvlkd9uoh8.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Sat, 21 Jul 2007 23:08:33 -0400)
> 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
Ah, yes. Those cases have not disappeared, and we do still need to
delay the mode hooks. Although delaying mode hook would give the
desired results in this case, we can't solve the problem that way.
So what should we recommend in a case like this?
One possible recommendation is that the hook function should test
major-mode and do nothing if it is not `text-mode'. That way it won't
affect the derived modes at all. Or it could test (memq major-mode
LIST-OF-OK-MODES) or (memq major-mode LIST-OF-EXCEPTIONS).
next prev parent reply other threads:[~2007-07-22 18:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-20 9:00 define-derived-mode runs parent mode hook after evaluating body martin rudalics
2007-07-20 16:09 ` Stefan Monnier
2007-07-21 16:54 ` Richard Stallman
2007-07-22 3:08 ` Stefan Monnier
2007-07-22 18:37 ` Richard Stallman [this message]
2007-07-20 16:11 ` Stefan Monnier
2007-07-21 9:21 ` martin rudalics
2007-07-22 18:36 ` Stefan Monnier
2007-07-22 21:22 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1ICgJ0-0005jy-8V@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).