* [PATCH] [gdb] Add sh-mode entry in .dir-locals.el
@ 2026-09-01 9:17 Tom de Vries
2026-09-01 9:23 ` Tom de Vries
0 siblings, 1 reply; 3+ messages in thread
From: Tom de Vries @ 2026-09-01 9:17 UTC (permalink / raw)
To: gdb-patches
Emacs supports .editorconfig starting version 30, but it's disabled by
default.
It's good to handle the case that .editorconfig is not used (older emacs, not
explicitly enabled).
Configure sh-mode by adding an entry in gdb/.dir-locals.el.
---
gdb/.dir-locals.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gdb/.dir-locals.el b/gdb/.dir-locals.el
index 8dd894c70d5..d5aceea498b 100644
--- a/gdb/.dir-locals.el
+++ b/gdb/.dir-locals.el
@@ -41,4 +41,8 @@
(eval . (c-set-offset 'brace-list-open 0))
(eval . (c-set-offset 'innamespace 0))
))
+ (sh-mode . ((indent-tabs-mode . t)
+ (tab-width . 8)
+ (sh-basic-offset . 4) ;; Supported from v22.1 onwards.
+ (sh-indentation . 4))) ;; For older versions.
)
base-commit: 2e9a026c2cd76b09f863ba877a1c492ebda76ee0
--
2.51.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [gdb] Add sh-mode entry in .dir-locals.el
2026-09-01 9:17 [PATCH] [gdb] Add sh-mode entry in .dir-locals.el Tom de Vries
@ 2026-09-01 9:23 ` Tom de Vries
2026-09-01 15:36 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Tom de Vries @ 2026-09-01 9:23 UTC (permalink / raw)
To: gdb-patches
On 9/1/26 11:17 AM, Tom de Vries wrote:
> Emacs supports .editorconfig starting version 30, but it's disabled by
> default.
>
> It's good to handle the case that .editorconfig is not used (older emacs, not
> explicitly enabled).
>
> Configure sh-mode by adding an entry in gdb/.dir-locals.el.
I forgot, the same change is needed in gdbsupport and gdbserver.
Thanks,
- Tom
> ---
> gdb/.dir-locals.el | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/gdb/.dir-locals.el b/gdb/.dir-locals.el
> index 8dd894c70d5..d5aceea498b 100644
> --- a/gdb/.dir-locals.el
> +++ b/gdb/.dir-locals.el
> @@ -41,4 +41,8 @@
> (eval . (c-set-offset 'brace-list-open 0))
> (eval . (c-set-offset 'innamespace 0))
> ))
> + (sh-mode . ((indent-tabs-mode . t)
> + (tab-width . 8)
> + (sh-basic-offset . 4) ;; Supported from v22.1 onwards.
> + (sh-indentation . 4))) ;; For older versions.
> )
>
> base-commit: 2e9a026c2cd76b09f863ba877a1c492ebda76ee0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-01 15:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-01 9:17 [PATCH] [gdb] Add sh-mode entry in .dir-locals.el Tom de Vries
2026-09-01 9:23 ` Tom de Vries
2026-09-01 15:36 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox