GNU bug report logs -
#73991
EditorConfig bundled with Emacs 30 does not set tab-width
Previous Next
Full log
View this message in rfc822 format
> In Emacs 30.0.91, the debugger does not respond when watching the variable.
You can get the same behavior with
indent_size = tab
tab_width = 4
BTW, I think the patch below is in order: if the user sets
"indent_size=tab", which means that the "indentation step" should be
equal to `tab-width`, then we should default `indent-tabs-mode` to
t (which in EditorConfig parlance means to default `indent_style` to
`tab`).
Can I push this to `emacs-30` or do you, dear maintainers, prefer that
I push it to `master`?
Stefan
diff --git a/lisp/editorconfig.el b/lisp/editorconfig.el
index c21e12559a6..478d94a2dc1 100644
--- a/lisp/editorconfig.el
+++ b/lisp/editorconfig.el
@@ -437,6 +437,11 @@ editorconfig--get-indentation
(when tab_width
(setq tab_width (string-to-number tab_width)))
+ ;; When users choose `indent_size=tab', they most likely prefer
+ ;; `indent_style=tab' as well.
+ (when (and (null style) (equal size "tab"))
+ (setq style "tab"))
+
(setq size
(cond ((editorconfig-string-integer-p size)
(string-to-number size))
This bug report was last modified 227 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.