From 3737a8efcf3a705c99a807e9c8574a89036dc3f3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 1 Jul 2014 11:15:03 -0400 Subject: [PATCH] * lisp/vc/log-edit.el (log-edit-goto-eoh): New function. (log-edit--match-first-line): Use it. Fixes: debbugs:17861 --- lisp/ChangeLog | 5 +++++ lisp/vc/log-edit.el | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8f4aa0c608e..017c7adad28 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-07-01 Stefan Monnier + + * vc/log-edit.el (log-edit-goto-eoh): New function. + (log-edit--match-first-line): Use it (bug#17861). + 2014-07-01 Glenn Morris * vc/log-edit.el (log-edit-hook): Add missing :version. diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index 2e09af86d22..1d75411ec1f 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -357,9 +357,15 @@ The first subexpression is the actual text of the field.") (set-match-data (list start (point))) (point)))) +(defun log-edit-goto-eoh () ;FIXME: Almost rfc822-goto-eoh! + (goto-char (point-min)) + (when (re-search-forward + "^\\([^[:alpha:]]\\|[[:alnum:]-]+[^[:alnum:]-:]\\)" nil 'move) + (goto-char (match-beginning 0)))) + (defun log-edit--match-first-line (limit) (let ((start (point))) - (rfc822-goto-eoh) + (log-edit-goto-eoh) (skip-chars-forward "\n") (and (< start (line-end-position)) (< (point) limit) -- 2.11.4.GIT