From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Stefan Monnier <monnier@iro.umontreal.ca>
Newsgroups: gmane.emacs.devel
Subject: Re: nxml-mode: Derive from prog-mode instead of text-mode
Date: Wed, 31 May 2017 07:52:01 -0400
Message-ID: <jwvbmq9gsaj.fsf-monnier+gmane.emacs.devel@gnu.org>
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>
	<CAArVCkR+jKEu49=H9CQ6jfhV890DQGfZgdVw9=R0KuDfEc_zVw@mail.gmail.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>
	<1496131500.1757184.992543904.7F3B36E0@webmail.messagingengine.com>
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: blaine.gmane.org 1496231577 20669 195.159.176.226 (31 May 2017 11:52:57 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 31 May 2017 11:52:57 +0000 (UTC)
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
To: emacs-devel@gnu.org
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 31 13:52:54 2017
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
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 <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1dG2BI-0005At-Mk
	for ged-emacs-devel@m.gmane.org; Wed, 31 May 2017 13:52:52 +0200
Original-Received: from localhost ([::1]:58693 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1dG2BO-0004oB-62
	for ged-emacs-devel@m.gmane.org; Wed, 31 May 2017 07:52:58 -0400
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42694)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ged-emacs-devel@m.gmane.org>) id 1dG2Af-0004gM-T0
	for emacs-devel@gnu.org; Wed, 31 May 2017 07:52:14 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ged-emacs-devel@m.gmane.org>) id 1dG2Ab-0003D8-W1
	for emacs-devel@gnu.org; Wed, 31 May 2017 07:52:13 -0400
Original-Received: from [195.159.176.226] (port=42907 helo=blaine.gmane.org)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <ged-emacs-devel@m.gmane.org>)
	id 1dG2Ab-0003Cq-O7
	for emacs-devel@gnu.org; Wed, 31 May 2017 07:52:09 -0400
Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2)
	(envelope-from <ged-emacs-devel@m.gmane.org>) id 1dG2AT-00034p-8q
	for emacs-devel@gnu.org; Wed, 31 May 2017 13:52:01 +0200
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 25
Original-X-Complaints-To: usenet@blaine.gmane.org
Cancel-Lock: sha1:PWwPhEASa4H7Zu/LFDtROMZd/GU=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 195.159.176.226
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-devel/>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org
Original-Sender: "Emacs-devel" <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.devel:215368
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/215368>

> 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?

It would run both hooks, and inherit from both keymaps, yes.

> I can't speak for the "officially" intended uses of these hooks
> ofcourse, but for me these two are in direct conflict.

Can you give us some examples of conflicts?

> 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.

You can also test (derived-mode-p 'prog-mode) in your text-mode-hook in
order to only run some code for the text-only-mode (and vice-versa).

> At least not without a "different" text-mode-hook for "regular" text
> (literal-text-mode?), so that we can avoid these kinds of conflicts.

I think that would be over-engineered.


        Stefan