fix(org): don't change tab-width in org-mode
Recently, org-mode made a non-standard tab-width an error state. Unfortunately, it's way too easy for users to accidentally change it (e.g. with editorconfig, indiscriminate setter hooks, or other packages), and since there is zero reason to ever want a non-standard tab-width in org-mode, I not only exclude it from dtrt-indent as a global default (i.e. not only as part of :lang org), but I add a late org-mode-hook hook to reset tab-width, just in case.
This commit is contained in:
parent
183ab38926
commit
2757a97a30
2 changed files with 11 additions and 4 deletions
|
@ -2,7 +2,12 @@
|
|||
;;; Commentary:
|
||||
;;; Code:
|
||||
|
||||
(defvar doom-detect-indentation-excluded-modes '(pascal-mode so-long-mode)
|
||||
(defvar doom-detect-indentation-excluded-modes
|
||||
'(pascal-mode
|
||||
so-long-mode
|
||||
;; Automatic indent detection in org files is meaningless. Not to mention, a
|
||||
;; non-standard `tab-width' causes an error in org-mode.
|
||||
org-mode)
|
||||
"A list of major modes where indentation shouldn't be auto-detected.")
|
||||
|
||||
(defvar-local doom-inhibit-indent-detection nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue