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: Eli Zaretskii
Subject: Re: Derived modes and mode hooks
Date: Sat, 09 Mar 2013 18:43:33 +0200

> Date: Sat, 9 Mar 2013 17:25:09 +0100
> From: Sebastian Wiesner <address@hidden>
> Cc: emacs-devel <address@hidden>
> 
> 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".

See fill-nobreak-predicate.  You can use that, and then automatic
filling will work correctly for HTML.

> I cannot do so now, but instead have to burden the user with the
> responsibility to get the customization right for my mode.

No, you don't, see above.

> > 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.
> 
> I am not talking about users here, I am talking about the needs of
> major mode *authors*, who may wish to disable dangerous settings in
> their modes, even if that includes overruling some of the user's
> customizations for *more generic* modes.

It is not any bloody business of a mode author to override
customizations of users.



reply via email to

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