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: Fri, 02 Jun 2017 14:34:32 +0200 Message-ID: <1496406872.1818733.996544288.4194749A@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> <1496131500.1757184.992543904.7F3B36E0@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 1496406892 15376 195.159.176.226 (2 Jun 2017 12:34:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 2 Jun 2017 12:34:52 +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 Fri Jun 02 14:34:46 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 1dGlmu-0003aO-HP for ged-emacs-devel@m.gmane.org; Fri, 02 Jun 2017 14:34:45 +0200 Original-Received: from localhost ([::1]:49574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGlmz-0005Zf-Mo for ged-emacs-devel@m.gmane.org; Fri, 02 Jun 2017 08:34:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGlmq-0005WU-Jl for emacs-devel@gnu.org; Fri, 02 Jun 2017 08:34:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGlml-0001Np-QL for emacs-devel@gnu.org; Fri, 02 Jun 2017 08:34:40 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:59191) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dGlml-0001LV-7N for emacs-devel@gnu.org; Fri, 02 Jun 2017 08:34:35 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C471B2073F; Fri, 2 Jun 2017 08:34:32 -0400 (EDT) Original-Received: from web5 ([10.202.2.215]) by compute6.internal (MEProxy); Fri, 02 Jun 2017 08:34:32 -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=Cl57z+m9rlNDNl1h/p1r286rhw89CnKkqHwadw6TOA4=; b=gv6LYrjm6MhP VNCEe665hMhJzHxJOn1RE456DV9B8igPojJHsERJ5B4Ib+/cLScqXiNePmDKMIMc V/kUIIUDotUpfdbXUMLXFkvtG8E6Br5vf8FCaT1Clcg3DgZRfM9Stbtlgo8qxnlb Zww9N6VURgCfLQe3WzTo/ROuF2MMMYNqpCJzrfF3XjubfbrL6+0k234Z6Lf/c7rW W7uCFcCpUaQCmZMcsVYYfE6Wjm27LoYA4FdGBX+prG66avn94+dwxYuZAcyX4V2V qD2xRPWkfR/26Wsy7cWJZ19fij7YcLnobR56i9vYWV8fyLrNw5QyN3kw1EqFpGPC vGaeY17SIA== 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=Cl57z+m9rlNDNl1h/p1r286rhw89CnKkqHwadw6TOA4=; b=CSa8Fzhg60yy kpc6/cGvMrXrnU9/1yW9M1SsZ3uE7etH+AbmJXRRts/Od7wT0niXIs3U9taUvmkD 37a/YAnhGjpzy6UC5s8FTbKa1JvAF7vG9c6FHXbC9lFQsDKbC3asYgjX0kGExGjz 34gwTisJ0j2MI6sr2bNfVLTIz04NNN20kzinlaVgau7cBMV4JOa1xwZsOxjeDvL7 8zDP2UETC+gAtFWO1jInlI5l2YjsKzfqmtV09KJOjHF9oImYTPkOvN/Sp6KPpUCC DqTzKCTYfIQZTmcnWewzZ+kfUQ8sNB/dpihhJnmlp+ydyUkmk0ZYrHrtROeQkvPZ G2Wm2tWYuw== X-ME-Sender: Original-Received: by mailuser.nyi.internal (Postfix, from userid 99) id 9E9F69E27F; Fri, 2 Jun 2017 08:34:32 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface - ajax-48639608 In-Reply-To: <1496131500.1757184.992543904.7F3B36E0@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:215398 Archived-At: > > 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? One type of conflict is mode-state: For text-based modes I want to flyspell enabled, but for programming-related modes I want it disabled. Another type of conflict is keybindings: I like to plug in languagetool- related functionality on keys consistent with what I typically have in programming-modes. That means that targets of these bindings for these keys differ in text-mode and prog-mode. > > 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). That's an option too, and wouldn't really complicate my setup that much. Good idea! > I think that would be over-engineered. In which case we agree. -- Jostein