fix(lib): update doom/set-indent-width for dtrt-indent

dtrt-indent-hook-mapping-list entries now accept lists of variables.
This updates doom/set-indent-width to accommodate that.

Ref: jscheid/dtrt-indent@1986ad4e60
This commit is contained in:
Henrik Lissner 2022-03-31 16:33:54 +02:00
parent fdf817aaea
commit cf362bc1a0
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -315,9 +315,10 @@ editorconfig or dtrt-indent installed."
(let (editorconfig-lisp-use-default-indent)
(editorconfig-set-indentation nil width)))
((require 'dtrt-indent nil t)
(when-let (var (nth 2 (assq major-mode dtrt-indent-hook-mapping-list)))
(doom-log "Updated %s = %d" var width)
(set var width))))
(when-let (vars (nth 2 (assq major-mode dtrt-indent-hook-mapping-list)))
(dolist (var (doom-enlist var))
(doom-log "Updated %s = %d" var width)
(set var width)))))
(message "Changed indentation to %d" width))