aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2020-12-04 18:19:39 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2020-12-04 18:19:39 +0100
commit39e8bc2ab8f755e05050f2dcbf07143e724d22ed (patch)
treedfc93f2f7c066023c9b9c7260ef6145a07c0b423 /etc
parentcae3e92f78b723cedd217cb9805fcdcc1035f434 (diff)
downloadguix-39e8bc2ab8f755e05050f2dcbf07143e724d22ed.tar.gz
guix-39e8bc2ab8f755e05050f2dcbf07143e724d22ed.zip
etc: snippets: Fix name extraction.
* etc/snippets/text-mode/guix-commit-message-add-package: Fix name extraction. This is a follow-up to 988a49c78ef19ad25cef543e2059a19db04bbd36.
Diffstat (limited to 'etc')
-rw-r--r--etc/snippets/text-mode/guix-commit-message-add-package6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/snippets/text-mode/guix-commit-message-add-package b/etc/snippets/text-mode/guix-commit-message-add-package
index e54a06de7e..7cebd4023a 100644
--- a/etc/snippets/text-mode/guix-commit-message-add-package
+++ b/etc/snippets/text-mode/guix-commit-message-add-package
@@ -6,8 +6,8 @@
gnu: Add ${1:`(with-temp-buffer
(magit-git-wash #'magit-diff-wash-diffs
"diff" "--staged")
- (beginning-of-buffer)
- (when (search-forward "+(define-public " nil 'noerror)
- (thing-at-point 'sexp 'no-properties)))`}.
+ (goto-char (point-min))
+ (when (re-search-forward "\\+(define-public \\(\\S-+\\)" nil 'noerror)
+ (match-string-no-properties 1)))`}.
* `(car (magit-staged-files))` ($1): New variable. \ No newline at end of file