all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sebastian Wiesner <lunaryorn@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Derived modes and mode hooks
Date: Sun, 10 Mar 2013 16:34:05 +0100	[thread overview]
Message-ID: <CALf2awRBybgymPD7z1JZ85GRkf-nrEpmbrtFKYV3xT7vCVx-9w@mail.gmail.com> (raw)
In-Reply-To: <jwvd2v74xo3.fsf-monnier+emacs@gnu.org>

2013/3/10 Stefan Monnier <monnier@iro.umontreal.ca>:
>> To give a concrete example for such a case:  The phpbb forum software
>> translates line breaks in the BB Code markup of posts into line breaks
>> in the HTML rendering, i.e. line breaks in the markup of a posting
>> directly affect its visual representation.  Hence, automatic filling
>> is a no-go, and I want to disable by default in this mode, even if the
>> user has enabled it generically by the common way of adding it to
>> "text-mode-hook".
>
> Yes, that's unfortunate.
>
> You're going to need to be inventive in order to reconcile the fact that
> you want to derive from text-mode while at the same time writing a mode
> that behaves differently from what text-mode expects.
>
> Eli's suggestion might work, tho it's admittedly crude.
> Maybe you can set normal-auto-fill-function buffer-locally.
> Or you can set auto-fill-mode-hook buffer-locally.
> Or you can set the fill-column to a very large number.
> Or (as mentioned) you can set phpbb-mode-hook's default to disable
> auto-fill-mode.
> There are probably other options.

Much thanks for your help.  I think I'll just add "turn-off-auto-fill"
to the mode hook.

Sebastian Wiesner



      reply	other threads:[~2013-03-10 15:34 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
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 [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALf2awRBybgymPD7z1JZ85GRkf-nrEpmbrtFKYV3xT7vCVx-9w@mail.gmail.com \
    --to=lunaryorn@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.