From 8307b8f184d59f69b66292ae1137997caa50cb15 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Tue, 10 Nov 2020 10:02:44 +0100 Subject: etc: snippets: Fix package name extraction. * etc/snippets/text-mode/guix-commit-message-add-package: Properly extract name when the diff contains a very short `define-public ...` above the actual new package. This can happen when the above package is a small inherited definition or cl/ecl package. --- etc/snippets/text-mode/guix-commit-message-add-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/snippets/text-mode/guix-commit-message-add-package b/etc/snippets/text-mode/guix-commit-message-add-package index 0dff2cbcf5..e54a06de7e 100644 --- a/etc/snippets/text-mode/guix-commit-message-add-package +++ b/etc/snippets/text-mode/guix-commit-message-add-package @@ -7,7 +7,7 @@ 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) + (when (search-forward "+(define-public " nil 'noerror) (thing-at-point 'sexp 'no-properties)))`}. * `(car (magit-staged-files))` ($1): New variable. \ No newline at end of file -- cgit 1.4.1