diff mbox series

[bug#52763] etc: Match define-public only at line start.

Message ID 5c3dc22c35166190de3a5ce802131df4f718d73d.camel@gmail.com
State Accepted
Headers show
Series [bug#52763] etc: Match define-public only at line start. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Liliana Marie Prikler Dec. 24, 2021, 12:33 a.m. UTC
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.
---
 etc/snippets/text-mode/guix-commit-message-update-package | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ludovic Courtès Jan. 5, 2022, 10:25 p.m. UTC | #1
Hi,

Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:

> 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.

LGTM, thanks!

Ludo’.
Liliana Marie Prikler Jan. 19, 2022, 8:17 p.m. UTC | #2
Am Mittwoch, dem 05.01.2022 um 23:25 +0100 schrieb Ludovic Courtès:
> Hi,
> 
> Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:
> 
> > 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.
> 
> LGTM, thanks!
The manual says 14 days after no review, not 14 days after review. 
Pushed now :)
diff mbox series

Patch

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")