Function: tuareg--kill-ocaml-on-opam-switch

tuareg--kill-ocaml-on-opam-switch is a natively compiled function defined in tuareg.el.

Signature

(tuareg--kill-ocaml-on-opam-switch)

Documentation

Kill the OCaml toplevel before the opam switch changes.

This function is for the opam-switch-mode hook opam-switch-before-change-opam-switch-hook, which runs just before the user changes the opam switch through opam-switch-mode.

Source Code

;; Defined in /nix/store/6mbh851dhnag8f92qfrlh9ckldzwf6c6-emacs-packages-deps/share/emacs/site-lisp/elpa/tuareg-20260626.936/tuareg.el
(defun tuareg--kill-ocaml-on-opam-switch ()
  "Kill the OCaml toplevel before the opam switch changes.
This function is for the `opam-switch-mode' hook
`opam-switch-before-change-opam-switch-hook', which runs just
before the user changes the opam switch through `opam-switch-mode'."
  (when tuareg-kill-ocaml-on-opam-switch
    (tuareg-kill-ocaml)))