[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nxml-mode: Derive from prog-mode instead of text-mode
From: |
Stefan Monnier |
Subject: |
Re: nxml-mode: Derive from prog-mode instead of text-mode |
Date: |
Wed, 31 May 2017 07:52:01 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
> 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
- Re: nxml-mode: Derive from prog-mode instead of text-mode, (continued)
- Re: nxml-mode: Derive from prog-mode instead of text-mode, Yuri Khan, 2017/05/17
- Re: nxml-mode: Derive from prog-mode instead of text-mode, Stefan Monnier, 2017/05/17
- RE: nxml-mode: Derive from prog-mode instead of text-mode, Drew Adams, 2017/05/17
- Re: nxml-mode: Derive from prog-mode instead of text-mode, Stefan Monnier, 2017/05/17
- Re: nxml-mode: Derive from prog-mode instead of text-mode, Johan Bockgård, 2017/05/17
- Re: nxml-mode: Derive from prog-mode instead of text-mode, Stefan Monnier, 2017/05/16
- Re: nxml-mode: Derive from prog-mode instead of text-mode, Eli Zaretskii, 2017/05/16
- Re: nxml-mode: Derive from prog-mode instead of text-mode, Jostein Kjønigsen, 2017/05/16
- Re: nxml-mode: Derive from prog-mode instead of text-mode, Jostein Kjønigsen, 2017/05/24
- Re: nxml-mode: Derive from prog-mode instead of text-mode, Jostein Kjønigsen, 2017/05/30
- Re: nxml-mode: Derive from prog-mode instead of text-mode,
Stefan Monnier <=
- Re: nxml-mode: Derive from prog-mode instead of text-mode, Stefan Monnier, 2017/05/16
Re: nxml-mode: Derive from prog-mode instead of text-mode, Rolf Ade, 2017/05/10