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 21:31:48 +0200 Message-ID: <83wqtgwesb.fsf@gnu.org> References: <836210y156.fsf@gnu.org> <831uboxy0r.fsf@gnu.org> Reply-To: Eli Zaretskii 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 1362857557 16532 80.91.229.3 (9 Mar 2013 19:32:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Mar 2013 19:32:37 +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 20:32:59 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 1UEPVp-00078j-98 for ged-emacs-devel@m.gmane.org; Sat, 09 Mar 2013 20:32:57 +0100 Original-Received: from localhost ([::1]:32979 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEPVT-0001QG-90 for ged-emacs-devel@m.gmane.org; Sat, 09 Mar 2013 14:32:35 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEPVI-0001Od-RV for emacs-devel@gnu.org; Sat, 09 Mar 2013 14:32:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UEPVB-0003D4-JG for emacs-devel@gnu.org; Sat, 09 Mar 2013 14:32:24 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:51059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEPVB-0003CW-91 for emacs-devel@gnu.org; Sat, 09 Mar 2013 14:32:17 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MJE00B00RIBLC00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Sat, 09 Mar 2013 21:32:00 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MJE00B2IRLB1FH0@a-mtaout20.012.net.il>; Sat, 09 Mar 2013 21:32:00 +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.166 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:157677 Archived-At: > Date: Sat, 9 Mar 2013 19:58:11 +0100 > From: Sebastian Wiesner > Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org >=20 > 2013/3/9 Eli Zaretskii : > >> In order to completely disable automatic filling I'd add a funct= ion > >> which simply returns t to this list? > > > > That's one possibility; I'm sure there are others, less radical o= nes. > > > >> That sounds like a nasty hack to me. > > > > I don't see why. It is certainly not as nasty as overriding user > > customizations. >=20 > So your proposed solution effectively inhibits auto filling and thu= s > also *effectively overrides* the user's customization, but in a > convoluted way, abusing a variable which is obviously intended for = a > different purpose, and which most likely only few users even know > about. >=20 > Yet you actually *prefer* this crude way of effectively overriding = the > user's customization over simply disabling the mode, *the* obvious = way > of inhibiting auto filling, more over clearly indicated to the user= by > the absence of the corresponding entry in the mode line. >=20 > Did I get that correctly? No. I did say I'm sure there are less radical ways of doing this, didn't I? > > The whole business of inheriting from a mode makes sense only whe= n the > > child mode is compatible with its parent. >=20 > I wonder how you define =E2=80=9Ccompatible=E2=80=9D, for I cannot = see any applicable > definition of this term that would make plain "text-mode" and an > advanced mode like AUCTeX' "latex-mode" =E2=80=9Ccompatible=E2=80= =9D. They behave > completely different, and I doubt that any *user* of AUCTeX would > actually call them =E2=80=9Ccompatible=E2=80=9D. They are "compatible" because TeX documents are plain text documents, albeit with markup. > I hitherto thought the main point of derived modes was simply to al= low > re-use of code Reuse doesn't make sense if you need to disable most of the inherited code. Might as well write your mode from scratch in that case. > I do not want to *change* the user's customization. The user's > customization will still be in effect, where it makes sense, i.e. i= n > other modes derived from text-mode. Customizations made to FOO-mode-hook are supposed to be in effect in any mode which inherits from FOO. In any case, you misunderstand what I meant: I meant not to modify th= e hook itself. It is okay to make the same effect in other ways.