aboutsummaryrefslogtreecommitdiff
path: root/etc/snippets
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2021-12-24 01:33:14 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2022-01-19 20:47:03 +0100
commit2c9f13ba6379afdad8df82166ea512c35d25aa4a (patch)
treeb624b95d8b3256efcfc0508843a51daa6fbe64fc /etc/snippets
parentf758ede583ef9662963873750206540f58ff3c45 (diff)
downloadguix-2c9f13ba6379afdad8df82166ea512c35d25aa4a.tar
guix-2c9f13ba6379afdad8df82166ea512c35d25aa4a.tar.gz
etc: Match define-public only at line start.
The current regexp simply matches the first occurence, which more often than not points to the *previous* variable. * etc/snippets/text-mode/guix-commit-message-update-package ($1): Restrict match to beginning of line with optional indentation.
Diffstat (limited to 'etc/snippets')
-rw-r--r--etc/snippets/text-mode/guix-commit-message-update-package2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/snippets/text-mode/guix-commit-message-update-package b/etc/snippets/text-mode/guix-commit-message-update-package
index f187419aa2..b08df74a0b 100644
--- a/etc/snippets/text-mode/guix-commit-message-update-package
+++ b/etc/snippets/text-mode/guix-commit-message-update-package
@@ -8,7 +8,7 @@ gnu: ${1:`(with-temp-buffer
(magit-git-wash #'magit-diff-wash-diffs
"diff" "--staged")
(goto-char (point-min))
- (when (re-search-forward "(define-public \\(\\S-+\\)" nil 'noerror)
+ (when (re-search-forward "^[ ]*(define-public \\(\\S-+\\)" nil 'noerror)
(match-string-no-properties 1)))`}: Update to ${2:`(with-temp-buffer
(magit-git-wash #'magit-diff-wash-diffs
"diff" "--staged")