Last active
December 25, 2020 13:16
-
-
Save tarsius/ee51369ee7e07821e45e123f4067a5db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(dolist (dir (directory-files "elpa" t "^[^.]")) | |
(let ((name (file-name-nondirectory dir))) | |
(when (string-match "\\(.+\\)-[^-]+\\'" name) | |
(let ((file (expand-file-name (concat (match-string 1 name) "-pkg.el") dir))) | |
(with-temp-file file | |
(save-excursion (insert-file-contents file)) | |
(when (looking-at "(define-package \\([^\" ]+\\)") | |
(message "Fixing %s..." file) | |
(replace-match "\"\\1\"" t nil nil 1) | |
(message "Fixing %s...done" file))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This assumes that the default installation location is used. If you use something else, then you have to replace the
"elpa"
with whatever is correct in your case.