Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Run re-search-forward for git diff with noerror=t.

This ensures the rest of git-commit-mode (e.g., run-mode-hooks) will
successfully run even if no git diff was found.

Signed-off-by: Adeodato Simó <dato@net.com.org.es>
  • Loading branch information...
commit ec88948e06f787fcc1c3b9951930ef00b25d0b8a 1 parent 3e2d104
@dato authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  git-commit.el
View
2  git-commit.el
@@ -513,7 +513,7 @@ NOTE defaults to `current-prefix-arg'."
"Add font lock on diff."
(save-excursion
(goto-char (point-min))
- (when (re-search-forward "^diff --git")
+ (when (re-search-forward "^diff --git" nil t)
(let ((beg (match-beginning 0)))
(let* ((buffer (current-buffer))
(font-lock-verbose nil)
Please sign in to comment.
Something went wrong with that request. Please try again.