diff options
| author | Stefan Monnier | 2014-07-01 11:15:03 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-07-01 11:15:03 -0400 |
| commit | 3737a8efcf3a705c99a807e9c8574a89036dc3f3 (patch) | |
| tree | 81d74520fd1fcdb4e7fc24c05bb71d5c882579a6 | |
| parent | 39a61a22ed89dee97a0bc61c07b4cae3ab7f98ae (diff) | |
| download | emacs-3737a8efcf3a705c99a807e9c8574a89036dc3f3.tar.gz emacs-3737a8efcf3a705c99a807e9c8574a89036dc3f3.zip | |
* lisp/vc/log-edit.el (log-edit-goto-eoh): New function.
(log-edit--match-first-line): Use it.
Fixes: debbugs:17861
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/vc/log-edit.el | 8 |
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 @@ | |||
| 1 | 2014-07-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * vc/log-edit.el (log-edit-goto-eoh): New function. | ||
| 4 | (log-edit--match-first-line): Use it (bug#17861). | ||
| 5 | |||
| 1 | 2014-07-01 Glenn Morris <rgm@gnu.org> | 6 | 2014-07-01 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * vc/log-edit.el (log-edit-hook): Add missing :version. | 8 | * 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.") | |||
| 357 | (set-match-data (list start (point))) | 357 | (set-match-data (list start (point))) |
| 358 | (point)))) | 358 | (point)))) |
| 359 | 359 | ||
| 360 | (defun log-edit-goto-eoh () ;FIXME: Almost rfc822-goto-eoh! | ||
| 361 | (goto-char (point-min)) | ||
| 362 | (when (re-search-forward | ||
| 363 | "^\\([^[:alpha:]]\\|[[:alnum:]-]+[^[:alnum:]-:]\\)" nil 'move) | ||
| 364 | (goto-char (match-beginning 0)))) | ||
| 365 | |||
| 360 | (defun log-edit--match-first-line (limit) | 366 | (defun log-edit--match-first-line (limit) |
| 361 | (let ((start (point))) | 367 | (let ((start (point))) |
| 362 | (rfc822-goto-eoh) | 368 | (log-edit-goto-eoh) |
| 363 | (skip-chars-forward "\n") | 369 | (skip-chars-forward "\n") |
| 364 | (and (< start (line-end-position)) | 370 | (and (< start (line-end-position)) |
| 365 | (< (point) limit) | 371 | (< (point) limit) |