From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?Q?Jostein=20Kj=C3=B8nigsen?= Newsgroups: gmane.emacs.devel Subject: Re: nxml-mode: Derive from prog-mode instead of text-mode Date: Tue, 30 May 2017 10:05:00 +0200 Message-ID: <1496131500.1757184.992543904.7F3B36E0@webmail.messagingengine.com> References: <1494412509.2069441.971865104.0646ACD6@webmail.messagingengine.com> <8337ccbrar.fsf@gnu.org> <1494439153.1311720.972341016.7C2EC66A@webmail.messagingengine.com> <83o9v0a66q.fsf@gnu.org> <1494487799.3240345.972964808.43DA610E@webmail.messagingengine.com> <87r2zqvmy9.fsf@pokyo> <1494930855.4131543.978121176.7BB5246B@webmail.messagingengine.com> <83y3tw63ap.fsf@gnu.org> <1494961376.1006215.978713264.44871586@webmail.messagingengine.com> <1495615846.16883.986870960.75A217AB@webmail.messagingengine.com> Reply-To: jostein@kjonigsen.net NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1496131517 12043 195.159.176.226 (30 May 2017 08:05:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 May 2017 08:05:17 +0000 (UTC) To: monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 30 10:05:13 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFc9Q-0002wr-DP for ged-emacs-devel@m.gmane.org; Tue, 30 May 2017 10:05:13 +0200 Original-Received: from localhost ([::1]:52056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFc9V-0007e8-Mq for ged-emacs-devel@m.gmane.org; Tue, 30 May 2017 04:05:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFc9L-0007XX-2C for emacs-devel@gnu.org; Tue, 30 May 2017 04:05:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFc9H-0003s6-U5 for emacs-devel@gnu.org; Tue, 30 May 2017 04:05:07 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:45473) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dFc9H-0003rP-Av for emacs-devel@gnu.org; Tue, 30 May 2017 04:05:03 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D779620880; Tue, 30 May 2017 04:05:00 -0400 (EDT) Original-Received: from web5 ([10.202.2.215]) by compute6.internal (MEProxy); Tue, 30 May 2017 04:05:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :reply-to:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=oJ+29zCRufl2+vL9SNeSr25tMZ6LoUciN333d9ADmCQ=; b=DQ9ZDieoUs81 seVSGbNrsFHonYPDIaXzifObUajDJHXdgtzzZGT6vi/6ce7qUFmyg/xS2Te9yqsm wLjvNeTWICWiemieyuBpze7BHSLwxV5YGRYUBkN+YkmUzpiqM8NQDzi/Mzv5h0bQ 4KdRQegniX0V2lVvtun//o/fuTqOG5g4iFA9Ofaq5KKFYpqHdUVMQliDp3Yu1JW5 RJJ3E8YbK5vIl9MfcafhLTal+/voV8PcYheogQOLN4p9UPp02esCHHolSVSNB5ZW FF3yhPpqZeEsK8eE5mlfCO1GEWIiwmsVZnVfFJM3HAcEbFVF8NCJVQ3QTqYuNX7+ kVgR8mjjBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :reply-to:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=oJ+29zCRufl2+vL9SNeSr25tMZ6LoUciN333d9ADmCQ=; b=iOZfDTe2+d68 NBLgyVUDdiNDnb+JtV7PcpFeyJYFhRetvjv60tQwXqGPrL1wSZ95RmbGE+g7qtr9 gJZnuwGZN/LU4/i856W+Y0qKrgE4/QZF7tSfB5v7JSILP0bvOoq5DGQkaxG+fWxL pUiITu7x6Wdg6rsw1+XdNkjrMKVDiq8MqO67ByqLm3YU00MPKQoBY/EJfsbnAbXk 2FHcY6vHPUK/xLjKUg0A6MBpFy4ZonLVPRFA0oLnR9CUQK7upqwcDD3ks/MErz9g 2Sf1Y0odacNuQlORKlNCLw5TmUQ2ubxHPyRUOhX+r4pBUr2r7FnDumqqYU8WT40W 81XbFjlXPw== X-ME-Sender: Original-Received: by mailuser.nyi.internal (Postfix, from userid 99) id B81AA9E23E; Tue, 30 May 2017 04:05:00 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface - ajax-345b0d7d In-Reply-To: <1495615846.16883.986870960.75A217AB@webmail.messagingengine.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.25 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:215347 Archived-At: > I think the best option is to create a new structured-text-mode which > inherits from both text-mode and prog-mode (and then have nxml-mode > inherit from that mode). > > Those users who want to enable some functionality in text-mode but not > in structured-text-mode can always use (derived-mode-p > 'structured-text-mode) in the hook function. > > > Stefan Would this mean that structured-text-mode would activate all customization and hooks which users may have setup for both text-mode and prog-mode? I can't speak for the "officially" intended uses of these hooks ofcourse, but for me these two are in direct conflict. With this setup, I would have to use structured-text-mode-hook to explicitly cancel out text-mode hook and potentially re-set prog-mode-hook settings. While I'm all OK with structured-text-mode as a concept, I think deriving it from both text-mode and prog-mode would be an error. At least not without a "different" text-mode-hook for "regular" text (literal-text-mode?), so that we can avoid these kinds of conflicts. So I just tried to sketch out what that would look like in a inheritance-tree, and it did honestly end up a bit messy. Basically if we're to go that far, IMO not deriving in the first place might actually be both simpler and better. -- Jostein