From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Derived modes and mode hooks Date: Sat, 09 Mar 2013 18:43:33 +0200 Message-ID: <836210y156.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1362847440 27530 80.91.229.3 (9 Mar 2013 16:44:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Mar 2013 16:44:00 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Sebastian Wiesner Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 09 17:44:25 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 1UEMsh-0008EM-OH for ged-emacs-devel@m.gmane.org; Sat, 09 Mar 2013 17:44:23 +0100 Original-Received: from localhost ([::1]:50310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEMsL-00045s-LJ for ged-emacs-devel@m.gmane.org; Sat, 09 Mar 2013 11:44:01 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEMsD-00045h-5O for emacs-devel@gnu.org; Sat, 09 Mar 2013 11:43:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UEMs8-0006c8-AF for emacs-devel@gnu.org; Sat, 09 Mar 2013 11:43:53 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:51030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEMs7-0006bx-U6 for emacs-devel@gnu.org; Sat, 09 Mar 2013 11:43:48 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MJE00000JKTEB00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Sat, 09 Mar 2013 18:43:46 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MJE0003WJSX84E0@a-mtaout23.012.net.il>; Sat, 09 Mar 2013 18:43:46 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 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:157668 Archived-At: > 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. > 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.