]> code.delx.au - gnu-emacs/commitdiff
* lisp/vc/log-edit.el (log-edit-goto-eoh): New function.
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 1 Jul 2014 15:15:03 +0000 (11:15 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 1 Jul 2014 15:15:03 +0000 (11:15 -0400)
(log-edit--match-first-line): Use it.

Fixes: debbugs:17861
lisp/ChangeLog
lisp/vc/log-edit.el

index 8f4aa0c608e64cd869159be23297ce0e74736ddd..017c7adad28b7f10e7191690163d682ed1823999 100644 (file)
@@ -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.
index 2e09af86d22b3bf3b56c2cf9a2e4ee261c3db2f8..1d75411ec1f8161e75e0feab4240abd7768f7838 100644 (file)
@@ -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)