add lines that contains errors to history in emacs

Ignore-this: 12a4a9bb9aaa6559543ec5dcfcb7bfc4

darcs-hash:20120215170433-c41ad-bfe19305a59bdd895ef47f061bee9f2f04b8893a
This commit is contained in:
Jeremie Dimino 2012-02-15 18:04:33 +01:00
parent d2e0e79dd4
commit 057f6d81bf
1 changed files with 1 additions and 0 deletions

View File

@ -492,6 +492,7 @@ module Emacs(M : sig end) = struct
ignore (Toploop.execute_phrase true Format.std_formatter phrase)
| UTop.Error (locs, msg) ->
send "accept" (String.concat "," (List.map (fun (a, b) -> Printf.sprintf "%d,%d" a b) locs));
if add_to_history then LTerm_history.add UTop.history input;
List.iter (send "stderr") (split_at ~trim:true '\n' msg)
let rec loop () =