From a7c56a74ab9d48f4a94f611bfa552c52507fee5d Mon Sep 17 00:00:00 2001 From: Randy Lai Date: Tue, 14 Mar 2017 15:33:17 -0400 Subject: [PATCH 1/3] use newest world callback on_done --- base/LineEdit.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/LineEdit.jl b/base/LineEdit.jl index 23772de428ca1..3d11e5417b934 100644 --- a/base/LineEdit.jl +++ b/base/LineEdit.jl @@ -1577,7 +1577,7 @@ function run_interface(terminal, m::ModalInterface) @static if is_unix(); ccall(:jl_repl_raise_sigtstp, Cint, ()); end buf, ok, suspend = prompt!(terminal, m, s) end - mode(state(s, s.current_mode)).on_done(s, buf, ok) + eval(Expr(:call, mode(state(s, s.current_mode)).on_done, s, buf, ok)) end end From cfcbdc92050c78a89b72431959a3dc4b4dac3ae5 Mon Sep 17 00:00:00 2001 From: Randy Lai Date: Thu, 16 Mar 2017 19:14:04 -0400 Subject: [PATCH 2/3] use QuoteNode to prevent parameters being expanded --- base/LineEdit.jl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/base/LineEdit.jl b/base/LineEdit.jl index 3d11e5417b934..c7ae81a81deac 100644 --- a/base/LineEdit.jl +++ b/base/LineEdit.jl @@ -1577,7 +1577,14 @@ function run_interface(terminal, m::ModalInterface) @static if is_unix(); ccall(:jl_repl_raise_sigtstp, Cint, ()); end buf, ok, suspend = prompt!(terminal, m, s) end - eval(Expr(:call, mode(state(s, s.current_mode)).on_done, s, buf, ok)) + eval(Main, + Expr(:body, + Expr(:return, + Expr(:call, + mode(state(s, s.current_mode)).on_done, + QuoteNode(s), + QuoteNode(buf), + QuoteNode(ok))))) end end From 6b28503ebd2ce399fc6746f43c0b306b337efe35 Mon Sep 17 00:00:00 2001 From: Randy Lai Date: Thu, 16 Mar 2017 19:30:24 -0400 Subject: [PATCH 3/3] also quote on_done --- base/LineEdit.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/LineEdit.jl b/base/LineEdit.jl index c7ae81a81deac..e1e7bedb75098 100644 --- a/base/LineEdit.jl +++ b/base/LineEdit.jl @@ -1581,7 +1581,7 @@ function run_interface(terminal, m::ModalInterface) Expr(:body, Expr(:return, Expr(:call, - mode(state(s, s.current_mode)).on_done, + QuoteNode(mode(state(s, s.current_mode)).on_done), QuoteNode(s), QuoteNode(buf), QuoteNode(ok)))))