diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2023-10-28 11:59:30 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2023-10-28 11:59:30 +0200 |
| commit | af2fdd67b04a1f62356f300ef8b74e7643e18000 (patch) | |
| tree | d139663e1068f60f804950bb3e550e39e391ec1a /lisp/git-commit.el | |
| parent | 72fbb3a579b7ddfedf2e587aaf949d397bfe0878 (diff) | |
git-commit: Avoid rx
Diffstat (limited to 'lisp/git-commit.el')
| -rw-r--r-- | lisp/git-commit.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/git-commit.el b/lisp/git-commit.el index 010bc12..9011fe1 100644 --- a/lisp/git-commit.el +++ b/lisp/git-commit.el @@ -121,7 +121,6 @@ (require 'log-edit) (require 'ring) -(require 'rx) (require 'server) (require 'transient) (require 'with-editor) @@ -1082,10 +1081,11 @@ Added to `font-lock-extend-region-functions'." (1 'git-commit-comment-action t t) (2 'git-commit-comment-file t))) ;; "commit HASH" - (eval . `(,(rx bol "commit " (1+ alnum) eol) + (eval . '("^commit [[:alnum:]]+$" (0 'git-commit-trailer-value))) ;; `git-commit-comment-headings' (but not in commented lines) - (eval . `(,(rx-to-string `(seq bol (or ,@git-commit-comment-headings) (1+ blank) (1+ nonl) eol)) + (eval . `(,(format "\\(?:^%s[[:blank:]]+.+$\\)" + (regexp-opt git-commit-comment-headings)) (0 'git-commit-trailer-value))))) (defconst git-commit-font-lock-keywords-3 |
