guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: etc: Match define-public only at line start.


From: guix-commits
Subject: 01/03: etc: Match define-public only at line start.
Date: Wed, 19 Jan 2022 14:48:36 -0500 (EST)

lilyp pushed a commit to branch master
in repository guix.

commit 2c9f13ba6379afdad8df82166ea512c35d25aa4a
Author: Liliana Marie Prikler <liliana.prikler@gmail.com>
AuthorDate: Fri Dec 24 01:33:14 2021 +0100

    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.
---
 etc/snippets/text-mode/guix-commit-message-update-package | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]