2017-12-15 22:10:54 +00:00
|
|
|
# -*- mode: snippet -*-
|
|
|
|
# name: guix-commit-message-add-package
|
|
|
|
# key: add
|
|
|
|
# condition: git-commit-mode
|
|
|
|
# --
|
2019-03-07 23:17:30 +00:00
|
|
|
gnu: Add ${1:`(with-temp-buffer
|
|
|
|
(magit-git-wash #'magit-diff-wash-diffs
|
|
|
|
"diff" "--staged")
|
2020-12-04 17:19:39 +00:00
|
|
|
(goto-char (point-min))
|
|
|
|
(when (re-search-forward "\\+(define-public \\(\\S-+\\)" nil 'noerror)
|
|
|
|
(match-string-no-properties 1)))`}.
|
2017-12-15 22:10:54 +00:00
|
|
|
|
|
|
|
* `(car (magit-staged-files))` ($1): New variable.
|