[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should yaml-ts-mode inherit from prog-mode?
From: |
Eli Zaretskii |
Subject: |
Re: Should yaml-ts-mode inherit from prog-mode? |
Date: |
Mon, 20 Mar 2023 18:53:20 +0200 |
> From: Rudolf Schlatte <rudi@constantly.at>
> Date: Mon, 20 Mar 2023 15:37:05 +0100
>
> Let me try one last argument for making the switch to prog-mode. Put
> the following yaml fragment into a file and hit M-q ("fill-paragraph").
> This destroys the yaml structure:
>
> Before fill-paragraph:
>
> jobs:
> check:
> runs-on: ubuntu-latest
> strategy:
> fail-fast: false
> matrix:
> emacs_version:
> - 27.1
> - 27.2
> - 28.1
> - 28.2
>
> After fill-paragraph:
>
> jobs: check: runs-on: ubuntu-latest strategy: fail-fast: false matrix:
> emacs_version: - 27.1 - 27.2 - 28.1 - 28.2
This just means that yaml-ts-mode should be fixed by defining an
appropriate fill-paragraph-function. Many descendants of prog-mode
define such functions, so being a descendant of prog-mode doesn't
magically make M-q DTRT for a mode.
> I'd argue that many commands offered by text-mode would have to be
> audited or adapted to be meaningful in a yaml file; for example, what is
> `forward-sentence' supposed to do in the context of yaml?
What useful things does forward-sentence do in C mode or in Emacs Lisp
mode?
Anyway, this and other similar arguments were already brought up, I
believe. And other arguments were brought up in defense of the
opposite view. Which is why I think there's no strong justification
to make yaml-ts-mode a descendant of prog-mode, after we had it where
it is now for some time.
- Re: Should yaml-ts-mode inherit from prog-mode?, (continued)
Re: Should yaml-ts-mode inherit from prog-mode?, Romanos Skiadas, 2023/03/02
- Re: Should yaml-ts-mode inherit from prog-mode?, Richard Stallman, 2023/03/02
- Re: Should yaml-ts-mode inherit from prog-mode?, Romanos Skiadas, 2023/03/04
- Re: Should yaml-ts-mode inherit from prog-mode?, Randy Taylor, 2023/03/19
- Re: Should yaml-ts-mode inherit from prog-mode?, Eli Zaretskii, 2023/03/20
- Re: Should yaml-ts-mode inherit from prog-mode?, Rudolf Schlatte, 2023/03/20
- Re: Should yaml-ts-mode inherit from prog-mode?, Brian Cully, 2023/03/20
- Re: Should yaml-ts-mode inherit from prog-mode?,
Eli Zaretskii <=
- Re: Should yaml-ts-mode inherit from prog-mode?, Jostein Kjønigsen, 2023/03/21
- Re: Should yaml-ts-mode inherit from prog-mode?, Eli Zaretskii, 2023/03/21
- Re: Should yaml-ts-mode inherit from prog-mode?, Rudolf Schlatte, 2023/03/21
- Re: Should yaml-ts-mode inherit from prog-mode?, Yuri Khan, 2023/03/21
- Re: Should yaml-ts-mode inherit from prog-mode?, Rudolf Schlatte, 2023/03/21
- Re: Should yaml-ts-mode inherit from prog-mode?, Yuri Khan, 2023/03/22
Re: Should yaml-ts-mode inherit from prog-mode?, David Ongaro, 2023/03/21
Re: Should yaml-ts-mode inherit from prog-mode?, Randy Taylor, 2023/03/20
Re: Re: Should yaml-ts-mode inherit from prog-mode?, Pedro Andres Aranda Gutierrez, 2023/03/05
Re: Should yaml-ts-mode inherit from prog-mode?, Ongaro, 2023/03/11