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
This commit is contained in:
Henrik Lissner 2019-12-30 15:49:12 -05:00
parent 9698235aff
commit 497a6a206e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -232,7 +232,8 @@ it is nil, it will try to reload both."
;; `load-file-name' is meaningless in a concatenated ;; `load-file-name' is meaningless in a concatenated
;; mega-autoloads file, so we replace references to it with the ;; mega-autoloads file, so we replace references to it with the
;; file they came from. ;; 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) (let ((load-file-name file)
(load-path (load-path
(append (list doom-private-dir) (append (list doom-private-dir)