fix: wrong-number-of-args error on dtrt-indent-mode

doom--fix-broken-smie-modes-a forces dtrt-indent-mode to expect exactly
one argument so an error will be raised when the latter is turned on
without args programmatically in lisp.
This commit is contained in:
Daanturo 2021-11-07 07:53:17 +07:00 committed by GitHub
parent bac7ccb970
commit b4cc1c84d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -499,7 +499,7 @@ files, so this replace calls to `pp' with the much faster `prin1'."
(push '(t tab-width) dtrt-indent-hook-generic-mapping-list) (push '(t tab-width) dtrt-indent-hook-generic-mapping-list)
(defvar dtrt-indent-run-after-smie) (defvar dtrt-indent-run-after-smie)
(defadvice! doom--fix-broken-smie-modes-a (fn arg) (defadvice! doom--fix-broken-smie-modes-a (fn &optional arg)
"Some smie modes throw errors when trying to guess their indentation, like "Some smie modes throw errors when trying to guess their indentation, like
`nim-mode'. This prevents them from leaving Emacs in a broken state." `nim-mode'. This prevents them from leaving Emacs in a broken state."
:around #'dtrt-indent-mode :around #'dtrt-indent-mode