diff options
-rw-r--r-- | etc/snippets/text-mode/guix-commit-message-add-package | 6 |
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 |