Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix REPL callbacks to use eval so newest world function is executed #19924

Merged
merged 1 commit into from
Jan 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions base/LineEdit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,8 @@ default_enter_cb(_) = true

write_prompt(terminal, s::PromptState) = write_prompt(terminal, s.p)
function write_prompt(terminal, p::Prompt)
prefix = isa(p.prompt_prefix,Function) ? p.prompt_prefix() : p.prompt_prefix
suffix = isa(p.prompt_suffix,Function) ? p.prompt_suffix() : p.prompt_suffix
prefix = isa(p.prompt_prefix,Function) ? eval(Expr(:call, p.prompt_prefix)) : p.prompt_prefix
suffix = isa(p.prompt_suffix,Function) ? eval(Expr(:call, p.prompt_suffix)) : p.prompt_suffix
write(terminal, prefix)
write(terminal, Base.text_colors[:bold])
write(terminal, p.prompt)
Expand Down Expand Up @@ -734,7 +734,7 @@ end
keymap_fcn(f::Void, c) = (s, p) -> return :ok
function keymap_fcn(f::Function, c)
return function (s, p)
r = f(s, p, c)
r = eval(Expr(:call,f,s, p, c))
if isa(r, Symbol)
return r
else
Expand Down