From: Jörg Behrmann Date: Tue, 24 Feb 2026 17:08:30 +0000 (+0100) Subject: emacs: add settings for Python modes X-Git-Tag: v261-rc1~126^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F40758%2Fhead;p=thirdparty%2Fsystemd.git emacs: add settings for Python modes Both python-mode and python-ts-mode are shipped by Emacs nowadays, with the latter being the more modern tree-sitter-based one. Even though they are similar, the newer one doesn't automatically take the older ones settings. --- diff --git a/.dir-locals.el b/.dir-locals.el index 6944406da07..47da56f9390 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -22,6 +22,14 @@ (meson-mode . ((meson-indent-basic . 8))) (sh-mode . ((sh-indentation . 4))) (awk-mode . ((c-basic-offset . 8))) + (python-mode . ((indent-tabs-mode . nil) + (tab-width . 4) + (fill-column . 109) + (python-indent-def-block-scale . 1))) + (python-ts-mode . ((indent-tabs-mode . nil) + (tab-width . 4) + (fill-column . 109) + (python-indent-def-block-scale . 1))) (nil . ((indent-tabs-mode . nil) (tab-width . 8) (fill-column . 79))) )