emacs-devel
[Top][All Lists]
Advanced

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

Re: Derived modes and mode hooks


From: Stefan Monnier
Subject: Re: Derived modes and mode hooks
Date: Sun, 10 Mar 2013 00:53:04 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

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


        Stefan



reply via email to

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