ocaml / tuareg

Emacs OCaml mode
GNU General Public License v3.0
360 stars 79 forks source link

Skip ;; even on a separate line (fixes #259) #261

Closed mattiase closed 3 years ago

mattiase commented 3 years ago

This allows repeated tuareg-eval-phrase to execute phrases in sequence without the user needing to do anything in-between.

mattiase commented 3 years ago

This PR is conservative to avoid unintended consequences. For instance, comments before the ;; still prevents the latter form being skipped over:

let _ = 1 (* comment *) ;;

or

let _ = 2
(* comment *)
;;

These cases seem to be rare.

Fourchaux commented 3 years ago

Well done. Thank you very much. :smiley:

The ( comment ) ;; are indeed very rare.

Chris00 commented 3 years ago

Thanks.