guix-commit-message-add-cl-package 579 B

123456789101112131415
  1. # -*- mode: snippet -*-
  2. # name: guix-commit-message-add-cl-package
  3. # key: addcl
  4. # condition: git-commit-mode
  5. # --
  6. gnu: Add ${1:`(with-temp-buffer
  7. (magit-git-wash #'magit-diff-wash-diffs
  8. "diff" "--staged")
  9. (beginning-of-buffer)
  10. (when (search-forward "+(define-public " nil 'noerror)
  11. (replace-regexp-in-string
  12. "^sbcl-" ""
  13. (thing-at-point 'sexp 'no-properties))))`}.
  14. * `(car (magit-staged-files))` (cl-${1:$(replace-regexp-in-string "^cl-" "" yas-text)}, ecl-$1, sbcl-$1): New variables.