summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-07-01 11:15:03 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-07-01 11:15:03 -0400
commit3737a8efcf3a705c99a807e9c8574a89036dc3f3 (patch)
tree81d74520fd1fcdb4e7fc24c05bb71d5c882579a6 /lisp
parent39a61a22ed89dee97a0bc61c07b4cae3ab7f98ae (diff)
downloademacs-3737a8efcf3a705c99a807e9c8574a89036dc3f3.tar.gz
* lisp/vc/log-edit.el (log-edit-goto-eoh): New function.
(log-edit--match-first-line): Use it. Fixes: debbugs:17861
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/vc/log-edit.el8
2 files changed, 12 insertions, 1 deletions
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 <monnier@iro.umontreal.ca>
+
+ * vc/log-edit.el (log-edit-goto-eoh): New function.
+ (log-edit--match-first-line): Use it (bug#17861).
+
2014-07-01 Glenn Morris <rgm@gnu.org>
* 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)