fix(lib): doom/bumpify-diff: skip non-package! forms

Would formerly error out if it tries to read invalid forms in misc files
included in bump commits.
This commit is contained in:
Henrik Lissner 2023-11-29 16:29:42 -05:00 committed by Yann Esposito (Yogsototh)
parent cd57ab3a22
commit a4794925f1
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646

View file

@ -239,13 +239,14 @@ Must be run from a magit diff buffer."
(unless (= (length before) (length after))
(user-error "Uneven number of packages being bumped"))
(dolist (p1 before)
(when (and (listp p1) (eq (car p1) 'package!))
(cl-destructuring-bind (package &key plist _beg _end &allow-other-keys) p1
(let ((p2 (cdr (assq package after))))
(if (null p2)
(push package errors)
(let ((bstr1 (doom--package-to-bump-string package plist))
(bstr2 (doom--package-to-bump-string package (plist-get p2 :plist))))
(cl-pushnew (format "%s -> %s" bstr1 bstr2) lines :test #'equal))))))
(cl-pushnew (format "%s -> %s" bstr1 bstr2) lines :test #'equal)))))))
(if (null lines)
(user-error "No bumps to bumpify")
(prog1 (funcall (if interactive #'kill-new #'identity)