guix-commit-message-rename-package 782 B

1234567891011121314151617181920
  1. # -*- mode: snippet -*-
  2. # name: guix-commit-message-rename-package
  3. # key: rename
  4. # condition: git-commit-mode
  5. # --
  6. gnu: ${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. (thing-at-point 'sexp 'no-properties)))`}: Rename package to ${2:`(with-temp-buffer
  12. (magit-git-wash #'magit-diff-wash-diffs
  13. "diff" "--staged")
  14. (beginning-of-buffer)
  15. (when (search-forward "+(define-public " nil 'noerror)
  16. (thing-at-point 'sexp 'no-properties)))`}.
  17. * `(car (magit-staged-files))` ($1): Define in terms of
  18. 'deprecated-package'.
  19. ($2): New variable, formerly known as "$1".