From 497a6a206ed22b5dad20279dc67edd5af687998a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Dec 2019 15:49:12 -0500 Subject: [PATCH] Fix 'wrong-number-of-arguments autoload 9' error in autoloads This error was caused by over-aggressive replacement of load-file-name in autoloads files. Instances of "load-file-name" would be replaced with a quoted file-path, even in strings and comments, which would break surrounding strings and docstrings. Mentioned in hlissner/doom-emacs@f8ff505 --- core/cli/autoloads.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 6bdc6d51d..55b66402e 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -232,7 +232,8 @@ it is nil, it will try to reload both." ;; `load-file-name' is meaningless in a concatenated ;; mega-autoloads file, so we replace references to it with the ;; file they came from. - (replace-match filestr t t)))) + (unless (doom-point-in-string-or-comment-p) + (replace-match filestr t t))))) (let ((load-file-name file) (load-path (append (list doom-private-dir)