all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Sebastian Wiesner <lunaryorn@gmail.com>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Derived modes and mode hooks
Date: Sat, 09 Mar 2013 18:43:33 +0200	[thread overview]
Message-ID: <836210y156.fsf@gnu.org> (raw)
In-Reply-To: <CALf2awS83tb8mCYPVgYu2m7j=qWe57xdizJjYVNVGyYvMjpEaw@mail.gmail.com>

> Date: Sat, 9 Mar 2013 17:25:09 +0100
> From: Sebastian Wiesner <lunaryorn@gmail.com>
> Cc: emacs-devel <emacs-devel@gnu.org>
> 
> 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	other threads:[~2013-03-09 16:43 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 [this message]
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

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

  git send-email \
    --in-reply-to=836210y156.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=lunaryorn@gmail.com \
    --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.