From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Wiesner Newsgroups: gmane.emacs.devel Subject: Re: Derived modes and mode hooks Date: Sat, 9 Mar 2013 18:03:17 +0100 Message-ID: References: <836210y156.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1362848620 4838 80.91.229.3 (9 Mar 2013 17:03:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Mar 2013 17:03:40 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 09 18:04:00 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UENBe-0007tB-Lz for ged-emacs-devel@m.gmane.org; Sat, 09 Mar 2013 18:03:58 +0100 Original-Received: from localhost ([::1]:58028 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UENBI-0002Gd-KF for ged-emacs-devel@m.gmane.org; Sat, 09 Mar 2013 12:03:36 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UENBA-000247-JG for emacs-devel@gnu.org; Sat, 09 Mar 2013 12:03:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UENB5-0004vr-QL for emacs-devel@gnu.org; Sat, 09 Mar 2013 12:03:28 -0500 Original-Received: from mail-qc0-x234.google.com ([2607:f8b0:400d:c01::234]:55607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UENB0-0004uS-8C; Sat, 09 Mar 2013 12:03:18 -0500 Original-Received: by mail-qc0-f180.google.com with SMTP id v28so952361qcm.25 for ; Sat, 09 Mar 2013 09:03:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=8ZeEc6TN7ZmofxWWYsWpeSHQBPnGHFsoGQJOUuizcco=; b=AeNrqqX2VLRgjaj+c9jwRUduGUXkMmBpLtW+VzQNQ4S3b6m4+z+BRjj+zCsKG/vx0Z 4aPFdYDeUzmAnAsLbcTD2igA78iFUTZ80PbCSsBQmEUJ/X847YPzemLIv73x3x9CRFeK maeqJ2rhZRyic5vKeZBiRqkhVZftuqqe5EP4GeVOhxf7aY60+9+9XI8hs6bAy2ZjoouE ZAotkgIgOe/yBtOUfh5z9GPu6PIzoSrnf4uPqvHXWoAVZSp/eZSRM9g+ZEico/LYTpB2 Tui/oXXh1E6hbTTa0A6Bg4aNqUEZW+36zQTZOTK1cD86Ib3CzblOxyyuezoOUeDaEw61 TkLQ== X-Received: by 10.229.202.204 with SMTP id ff12mr2174056qcb.25.1362848597774; Sat, 09 Mar 2013 09:03:17 -0800 (PST) Original-Received: by 10.224.111.147 with HTTP; Sat, 9 Mar 2013 09:03:17 -0800 (PST) In-Reply-To: <836210y156.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c01::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:157670 Archived-At: 2013/3/9 Eli Zaretskii : >> Date: Sat, 9 Mar 2013 17:25:09 +0100 >> From: Sebastian Wiesner >> Cc: emacs-devel >> >> 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. In order to completely disable automatic filling I'd add a function which simply returns t to this list? That sounds like a nasty hack to me. Also this only handles the case of auto-fill-mode=E2=80=A6 By the way, I did not talk about filling HTML, but I guess it just wasn't your =E2=80=9Cbloody business=E2=80=9D to read my mail carefully, wa= s it? >> > 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. I'm talking overriding customization *in the special case*, that a customization for a *parent mode* (which the user most likely did without caring for, or even knowing of, a specific derived mode) is *not reasonably applicable* in a derived mode, for the sake of convenience for the users of the derived mode. But please ignore this objection of mine, I rather thank you wholeheartedly for ignoring this specific special case and instead giving me the perfect excuse of an Emacs authority stating that it's not my =E2=80=9Cbloody business=E2=80=9D to care for my user's needs. In c= ase any user of my mode foolishly fails to understand this special notion of Emacs development, may I forward her to your mail address, for special guidance on the latest and greatest Emacs development practices?