diff options
| author | Ricardo Wurmus <rekado@elephly.net> | 2019-03-08 00:17:30 +0100 |
|---|---|---|
| committer | Ricardo Wurmus <rekado@elephly.net> | 2019-03-08 00:17:30 +0100 |
| commit | 95803946c7dbdff88db09fa5fe98e70d607712a7 (patch) | |
| tree | 9090f8b7072aca75fac8637ebe83c39b9d1d1b3d /etc/snippets | |
| parent | 933dad9156bfb05fc264fda01de351839403316b (diff) | |
etc: snippets: Prefill package name.
* etc/snippets/text-mode/guix-commit-message-add-package: Extract package
name from diff.
Diffstat (limited to 'etc/snippets')
| -rw-r--r-- | etc/snippets/text-mode/guix-commit-message-add-package | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/snippets/text-mode/guix-commit-message-add-package b/etc/snippets/text-mode/guix-commit-message-add-package index 1aebe8a7637..0dff2cbcf53 100644 --- a/etc/snippets/text-mode/guix-commit-message-add-package +++ b/etc/snippets/text-mode/guix-commit-message-add-package | |||
| @@ -3,6 +3,11 @@ | |||
| 3 | # key: add | 3 | # key: add |
| 4 | # condition: git-commit-mode | 4 | # condition: git-commit-mode |
| 5 | # -- | 5 | # -- |
| 6 | gnu: Add $1. | 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 | (thing-at-point 'sexp 'no-properties)))`}. | ||
| 7 | 12 | ||
| 8 | * `(car (magit-staged-files))` ($1): New variable. \ No newline at end of file | 13 | * `(car (magit-staged-files))` ($1): New variable. \ No newline at end of file |
