Fix package-quickstart breakage

* lisp/emacs-lisp/package.el (package-quickstart-refresh): Work
around syntax-ppss now clobbering match data (but it's not clear
whether that's supposed to be allowed) (bug#55447).
This commit is contained in:
Lars Ingebrigtsen 2022-05-17 11:48:12 +02:00
parent 608afd6e4e
commit dc239872cc

View file

@ -4288,7 +4288,7 @@ activations need to be changed, such as when `package-load-list' is modified."
(insert-file-contents file)
;; Fixup the special #$ reader form and throw away comments.
(while (re-search-forward "#\\$\\|^;\\(.*\n\\)" nil 'move)
(unless (nth 8 (syntax-ppss))
(unless (ppss-string-terminator (save-match-data (syntax-ppss)))
(replace-match (if (match-end 1) "" pfile) t t)))
(unless (bolp) (insert "\n"))
(insert ")\n")))