diff options
| author | Curt Brune <curt@brune.net> | 2025-02-16 19:19:29 -0800 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2025-02-17 18:22:48 +0100 |
| commit | 8c27c910cab356173165d03edc9fb7b494574d51 (patch) | |
| tree | 159e738aa475a1604278f00eee32528711312ba3 /lisp/git-commit.el | |
| parent | 4a01405bf1b6cdcaafabcbf7692a1ad0f67ea7b5 (diff) | |
git-commit-font-lock-keywords-1: Make trailer regex matches lax
The `git-commit--trailer-regexp' regex is written so that either groups
1 and 2 will match or groups 3 and 4 will match, but it is impossible
for all 4 groups to match.
This patch updates the font-lock regex checker to be lax about whether
or not the group matched. Without this patch we have errors like:
Error during redisplay: (jit-lock-function 77) signaled
(error "No match 3 in highlight (3 'git-commit-trailer-token)")
Signed-off-by: Curt Brune <curt@brune.net>
Make-it-so: Jonas Bernoulli <jonas@bernoul.li>
Diffstat (limited to 'lisp/git-commit.el')
| -rw-r--r-- | lisp/git-commit.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/git-commit.el b/lisp/git-commit.el index aa5413f..1c62cd3 100644 --- a/lisp/git-commit.el +++ b/lisp/git-commit.el @@ -1048,10 +1048,10 @@ Added to `font-lock-extend-region-functions'." (defconst git-commit-font-lock-keywords-1 '(;; Trailers (eval . `(,(git-commit--trailer-regexp) - (1 'git-commit-trailer-token) - (2 'git-commit-trailer-value) - (3 'git-commit-trailer-token) - (4 'git-commit-trailer-value))) + (1 'git-commit-trailer-token nil t) + (2 'git-commit-trailer-value nil t) + (3 'git-commit-trailer-token nil t) + (4 'git-commit-trailer-value nil t))) ;; Summary (eval . `(,(git-commit-summary-regexp) (1 'git-commit-summary))) |
