Merge pull request #241 from Wilfred/fix-next-phrase

Fix utop-eval-phrase on recent tuareg-mode
This commit is contained in:
Rudi Grinberg 2018-07-07 05:49:18 +07:00 committed by GitHub
commit 48100fcf76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -272,9 +272,19 @@ modes you need to set these variables:
" major-mode))))
choices))
(defun utop-tuareg-next-phrase ()
"Move to the next phrase after point."
(let* ((pos (tuareg--after-double-colon))
(pos (if pos pos (point)))
(phrase (tuareg-discover-phrase pos)))
(when phrase
(goto-char (caddr phrase))
(tuareg--skip-double-colon)
(tuareg-skip-blank-and-comments))))
(defun utop-compat-next-phrase-beginning ()
(funcall
(utop-compat-resolve '(tuareg-next-phrase
(utop-compat-resolve '(utop-tuareg-next-phrase
typerex-skip-to-end-of-phrase
caml-skip-to-end-of-phrase
reason-next-phrase))))