[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nxml-mode: Derive from prog-mode instead of text-mode

From: Jostein Kjønigsen
Subject: Re: nxml-mode: Derive from prog-mode instead of text-mode
Date: Fri, 02 Jun 2017 14:34:32 +0200

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]