From 057f6d81bf317e1537f59ae3f526cc1cd25884b9 Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Wed, 15 Feb 2012 18:04:33 +0100 Subject: [PATCH] add lines that contains errors to history in emacs Ignore-this: 12a4a9bb9aaa6559543ec5dcfcb7bfc4 darcs-hash:20120215170433-c41ad-bfe19305a59bdd895ef47f061bee9f2f04b8893a --- src/lib/uTop_main.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/uTop_main.ml b/src/lib/uTop_main.ml index b2687ac..6db9cf8 100644 --- a/src/lib/uTop_main.ml +++ b/src/lib/uTop_main.ml @@ -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 () =