Function: tuareg-smie--:=-disambiguate

tuareg-smie--:=-disambiguate is a natively compiled function defined in tuareg.el.

Signature

(tuareg-smie--:=-disambiguate)

Documentation

Return which kind of ":=" we've just found.

Point is not moved and should be right in front of the equality. Return values can be
  ":=" for assignment definition,
  "c=" for destructive equality constraint.

Source Code

;; Defined in /nix/store/6mbh851dhnag8f92qfrlh9ckldzwf6c6-emacs-packages-deps/share/emacs/site-lisp/elpa/tuareg-20260626.936/tuareg.el
(defun tuareg-smie--:=-disambiguate ()
  "Return which kind of \":=\" we've just found.
Point is not moved and should be right in front of the equality.
Return values can be
  \":=\" for assignment definition,
  \"c=\" for destructive equality constraint."
  (save-excursion
    (let* ((telltale '("type" "let" "module" "class" "and" "external"
                       "val" "method" "=" ":="
                       "if" "then" "else" "->" ";" ))
           (nearest (tuareg-smie--search-backward telltale)))
      (cond                             ;Issue #7
       ((and (member nearest '("type" "module"))
             (member (tuareg-smie--backward-token) '("with" "and"))) "c=")
       (t ":=")))))