guix-commit-message-add-package 466 B

12345678910111213
  1. # -*- mode: snippet -*-
  2. # name: guix-commit-message-add-package
  3. # key: add
  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. (goto-char (point-min))
  10. (when (re-search-forward "\\+(define-public \\(\\S-+\\)" nil 'noerror)
  11. (match-string-no-properties 1)))`}.
  12. * `(car (magit-staged-files))` ($1): New variable.