From 26a5ad72e161f53151e78580a62bcd0757a7bf40 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 3 Sep 2025 23:13:59 +0200 Subject: [PATCH] fix(cli): autoloads: type error parsing autoloads Prevent rare edge cases where FORM is an atom, causing `cadr` to throw a type error. Might explain some cases of `doom sync` doing nothing after '> Generating N init files...'. Amend: c014950f6d65 --- lisp/lib/autoloads.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/lib/autoloads.el b/lisp/lib/autoloads.el index 34a18bf46..0f578eaa0 100644 --- a/lisp/lib/autoloads.el +++ b/lisp/lib/autoloads.el @@ -60,7 +60,7 @@ hoist buggy forms into autoloads.") ;; HACK: Remove modifications to `auto-mode-alist' and ;; `interpreter-mode-alist' in *-ts-mode package. They are applied ;; twice and often overwrite user or module configuration. - ((equal (list (car form) (cadr form)) '(when (treesit-available-p))) + ((equal (list func (car (cdr-safe form))) '(when (treesit-available-p))) (setf (nth 2 form) (cl-loop for form in (nth 2 form) if (or (not (eq (car-safe form) 'add-to-list))