follow OCaml's output in emacs
Ignore-this: 20e2a63a90783cbcfbe273732293188b darcs-hash:20120321131824-c41ad-cf97daa2d551f812603bc30f955a94d0e39478e1
This commit is contained in:
parent
543b99ab35
commit
4264dc3d92
|
@ -63,6 +63,12 @@ If nil, `utop-command' will be used without modification."
|
||||||
:type 'boolean
|
:type 'boolean
|
||||||
:group 'utop)
|
:group 'utop)
|
||||||
|
|
||||||
|
(defcustom utop-follow-output t
|
||||||
|
"Whether to follow OCaml's output while it is executing a
|
||||||
|
phrase."
|
||||||
|
:type 'boolean
|
||||||
|
:group 'utop)
|
||||||
|
|
||||||
(defcustom utop-prompt 'utop-default-prompt
|
(defcustom utop-prompt 'utop-default-prompt
|
||||||
"The function which create the prompt for utop."
|
"The function which create the prompt for utop."
|
||||||
:type 'function
|
:type 'function
|
||||||
|
@ -412,7 +418,10 @@ it is started."
|
||||||
(setq utop-prompt-min (+ utop-prompt-min (length line)))
|
(setq utop-prompt-min (+ utop-prompt-min (length line)))
|
||||||
(setq utop-prompt-max (+ utop-prompt-max (length line)))
|
(setq utop-prompt-max (+ utop-prompt-max (length line)))
|
||||||
;; Make everything before the end prompt read-only
|
;; Make everything before the end prompt read-only
|
||||||
(add-text-properties (point-min) utop-prompt-max utop-non-editable-properties))))
|
(add-text-properties (point-min) utop-prompt-max utop-non-editable-properties)))
|
||||||
|
;; If OCaml is executing a phrase, follow its output
|
||||||
|
(when (and utop-follow-output (eq utop-state 'wait))
|
||||||
|
(utop-goto-point-max-all-windows)))
|
||||||
|
|
||||||
(defun utop-insert-prompt (prompt)
|
(defun utop-insert-prompt (prompt)
|
||||||
"Insert the given prompt."
|
"Insert the given prompt."
|
||||||
|
|
Loading…
Reference in New Issue