diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 33b0261eb..2a92ead24 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -226,8 +226,11 @@ one wants that.") ;; `load-file-name' is meaningless in a concatenated ;; mega-autoloads file, so we replace references to it with the ;; file they came from. - (unless (doom-point-in-string-or-comment-p) - (replace-match filestr t t))))) + (or (save-excursion + (let ((ppss (syntax-ppss))) + (or (nth 3 ppss) + (nth 4 ppss)))) + (replace-match filestr t t))))) (let ((load-file-name file) (load-path (append (list doom-private-dir)