 (defun lean-cmd-check (line-number line)
   "Check whether the text editor and Lean have the 'same view' of the current file + modifications"
   `(CHECK ,line-number ,line))
+
+(defun lean-cmd-set (option-name option-value)
+  "Set a Lean option [option-name] with [option-value].
+
+[option-name] must be a valid Lean option. Any option that can be
+set using the command set_option in a ‘.lean’ file is supported."
+  `(SET ,option-name ,option-value))
+
+(defun lean-cmd-eval (lean-cmd)
+  "Evaluates a Lean command [lean-cmd].
+
+It has the effect of evaluating a command in the end of the current file"
+  `(EVAL ,lean-cmd))
 
 ;; Type
 ;; ====

  (cl-second check-cmd))
(defun lean-cmd-check-get-line (check-cmd)
  (cl-third check-cmd))

;; -- Test
(cl-assert (string= (lean-cmd-load-get-file-name (lean-cmd-load "nat.lean"))

(cl-assert (string= (lean-cmd-check-get-line
                     (lean-cmd-replace 34 "∀ (n : nat), ne (succ n) zero"))
                    "∀ (n : nat), ne (succ n) zero"))
(cl-assert (string= (lean-cmd-set-get-option-name
                     (lean-cmd-set "pp.implicit" "true"))
                    "pp.implicit"))
(cl-assert (string= (lean-cmd-set-get-option-value
                     (lean-cmd-set "pp.implicit" "true"))
                    "true"))
(cl-assert (string= (lean-cmd-eval-get-lean-cmd
                     (lean-cmd-eval "print 3"))
                    "print 3"))

;; to-string functions
;; ===================
