unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Sebastian Wiesner <lunaryorn@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Derived modes and mode hooks
Date: Sat, 09 Mar 2013 10:56:52 -0500	[thread overview]
Message-ID: <jwvmwuc6036.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CALf2awR5-+1rWz_M0rXJswT=LJnKrUMe-XsHqd5Mhgoz=TF+vA@mail.gmail.com> (Sebastian Wiesner's message of "Sat, 9 Mar 2013 15:06:00 +0100")

> Is this right?  If so, how can `body-of-foo-mode` forcibly overrule
> settings made in `text-mode-hook`?

It can't (well, if it really really wants to, it can add some code to
its own foo-mode-hook which is run after text-mode-hook).

A function added to a mode hook takes precedence, because it's presumably
a user choice, whereas body-of-foo-mode is the choice of code's author.

If the user doesn't want auto-fill-mode in foo-mode, she can add to
foo-mode-hook to turn auto-fill-mode off, or she can change her
text-mode-hook to test (derived-mode-p 'foo-mode) before enabling
auto-fill-mode.


        Stefan



  parent reply	other threads:[~2013-03-09 15:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-09 14:06 Derived modes and mode hooks Sebastian Wiesner
2013-03-09 14:31 ` Xue Fuqiao
2013-03-09 14:43   ` Sebastian Wiesner
2013-03-09 15:56 ` Stefan Monnier [this message]
2013-03-09 16:25   ` Sebastian Wiesner
2013-03-09 16:43     ` Eli Zaretskii
2013-03-09 17:03       ` Sebastian Wiesner
2013-03-09 17:51         ` Eli Zaretskii
2013-03-09 18:58           ` Sebastian Wiesner
2013-03-09 19:31             ` Eli Zaretskii
2013-03-09 19:49               ` Sebastian Wiesner
2013-03-09 20:22                 ` chad
2013-03-10  5:53     ` Stefan Monnier
2013-03-10 15:34       ` Sebastian Wiesner

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=jwvmwuc6036.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=lunaryorn@gmail.com \
    /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).