diff mbox series

[RFC] .editorconfig: update the automatic mode setting for Emacs

Message ID 20210305144839.6558-1-alex.bennee@linaro.org
State New
Headers show
Series [RFC] .editorconfig: update the automatic mode setting for Emacs | expand

Commit Message

Alex Bennée March 5, 2021, 2:48 p.m. UTC
It seems the editor specific keywords have been deprecated in the main
editorconfig plugin:

  https://github.com/editorconfig/editorconfig-emacs#file-type-file_type_ext-file_type_emacs

Update the keywords to the suggested one and point users at the
extension.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 .editorconfig | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

Comments

Peter Maydell March 5, 2021, 2:52 p.m. UTC | #1
On Fri, 5 Mar 2021 at 14:50, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> It seems the editor specific keywords have been deprecated in the main
> editorconfig plugin:
>
>   https://github.com/editorconfig/editorconfig-emacs#file-type-file_type_ext-file_type_emacs
>
> Update the keywords to the suggested one and point users at the
> extension.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  .editorconfig | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/.editorconfig b/.editorconfig
> index 22681d91c6..22656e849d 100644
> --- a/.editorconfig
> +++ b/.editorconfig
> @@ -4,6 +4,11 @@
>  # plugin.
>  #
>  # Check https://editorconfig.org for details.
> +#
> +# Emacs: you need https://github.com/10sr/editorconfig-custom-majormode-el
> +# to automatically enable the appropriate major-mode for your files
> +# that aren't already caught by your exiting config.

"existing".

-- PMM
Marc-André Lureau March 5, 2021, 3:21 p.m. UTC | #2
Hi

On Fri, Mar 5, 2021 at 6:49 PM Alex Bennée <alex.bennee@linaro.org> wrote:

> It seems the editor specific keywords have been deprecated in the main
> editorconfig plugin:
>
>
> https://github.com/editorconfig/editorconfig-emacs#file-type-file_type_ext-file_type_emacs
>
> Update the keywords to the suggested one and point users at the
> extension.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
>

Right, today I had to make some emacs configuration changes related to
editorconfig & mode (editorconfig-file-type-emacs-whitelist no longer
exists).

Installed the editorconfig-custom-majormode.el and checked it worked.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

---
>  .editorconfig | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/.editorconfig b/.editorconfig
> index 22681d91c6..22656e849d 100644
> --- a/.editorconfig
> +++ b/.editorconfig
> @@ -4,6 +4,11 @@
>  # plugin.
>  #
>  # Check https://editorconfig.org for details.
> +#
> +# Emacs: you need
> https://github.com/10sr/editorconfig-custom-majormode-el
> +# to automatically enable the appropriate major-mode for your files
> +# that aren't already caught by your exiting config.
> +#
>
>  root = true
>
> @@ -15,17 +20,17 @@ charset = utf-8
>  [*.mak]
>  indent_style = tab
>  indent_size = 8
> -file_type_emacs = makefile
> +emacs_mode = makefile
>
>  [Makefile*]
>  indent_style = tab
>  indent_size = 8
> -file_type_emacs = makefile
> +emacs_mode = makefile
>
>  [*.{c,h,c.inc,h.inc}]
>  indent_style = space
>  indent_size = 4
> -file_type_emacs = c
> +emacs_mode = c
>
>  [*.sh]
>  indent_style = space
> @@ -34,11 +39,11 @@ indent_size = 4
>  [*.{s,S}]
>  indent_style = tab
>  indent_size = 8
> -file_type_emacs = asm
> +emacs_mode = asm
>
>  [*.{vert,frag}]
> -file_type_emacs = glsl
> +emacs_mode = glsl
>
>  [*.json]
>  indent_style = space
> -file_type_emacs = python
> +emacs_mode = python
> --
> 2.20.1
>
>
>
diff mbox series

Patch

diff --git a/.editorconfig b/.editorconfig
index 22681d91c6..22656e849d 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -4,6 +4,11 @@ 
 # plugin.
 #
 # Check https://editorconfig.org for details.
+#
+# Emacs: you need https://github.com/10sr/editorconfig-custom-majormode-el
+# to automatically enable the appropriate major-mode for your files
+# that aren't already caught by your exiting config.
+#
 
 root = true
 
@@ -15,17 +20,17 @@  charset = utf-8
 [*.mak]
 indent_style = tab
 indent_size = 8
-file_type_emacs = makefile
+emacs_mode = makefile
 
 [Makefile*]
 indent_style = tab
 indent_size = 8
-file_type_emacs = makefile
+emacs_mode = makefile
 
 [*.{c,h,c.inc,h.inc}]
 indent_style = space
 indent_size = 4
-file_type_emacs = c
+emacs_mode = c
 
 [*.sh]
 indent_style = space
@@ -34,11 +39,11 @@  indent_size = 4
 [*.{s,S}]
 indent_style = tab
 indent_size = 8
-file_type_emacs = asm
+emacs_mode = asm
 
 [*.{vert,frag}]
-file_type_emacs = glsl
+emacs_mode = glsl
 
 [*.json]
 indent_style = space
-file_type_emacs = python
+emacs_mode = python