Remove (provide ...) forms from package autoloads

This commit is contained in:
Henrik Lissner 2018-06-14 03:06:49 +02:00
parent 6571c9eabf
commit 8c4d8d739b
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -509,7 +509,7 @@ This should be run whenever your `doom!' block or update your packages."
(when (file-exists-p file)
(insert "(let ((load-file-name " (prin1-to-string (abbreviate-file-name file)) "))\n")
(insert-file-contents file)
(while (re-search-forward "^\\(?:;;\\(.*\n\\)\\|\n\\)" nil t)
(while (re-search-forward "^\\(?:;;\\(.*\n\\)\\|\n\\|(provide '[^\n]+\\)" nil t)
(unless (nth 8 (syntax-ppss))
(replace-match "" t t)))
(unless (bolp) (insert "\n"))