Skip to content

Commit

Permalink
rename clear to workspace, which seems apt since it makes a new
Browse files Browse the repository at this point in the history
workspace, and I find it hard to explain the function without using
that word.
  • Loading branch information
JeffBezanson committed Jul 14, 2014
1 parent 7c7d30a commit fd6a7e9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ REPL improvements
* Tab-substitution of LaTeX math symbols (e.g. `\alpha` by `α`) ([#6911]).
This also works in IJulia and in Emacs ([#6920]).

* `clear` function for obtaining a fresh workspace ([#1195]).
* `workspace()` function for obtaining a fresh workspace ([#1195]).

Library improvements
--------------------
Expand Down
2 changes: 1 addition & 1 deletion base/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ export
versioninfo,
which,
whos,
clear,
workspace,

# loading source files
evalfile,
Expand Down
2 changes: 1 addition & 1 deletion base/interactiveutil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ function download(url::String)
download(url, filename)
end

function clear()
function workspace()
last = Core.Main
b = last.Base
ccall(:jl_new_main_module, Any, ())
Expand Down
2 changes: 1 addition & 1 deletion doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Getting Around
Print information about the version of Julia in use. If the ``verbose`` argument
is true, detailed system information is shown as well.

.. function:: clear()
.. function:: workspace()

Replace the top-level module (``Main``) with a new one, providing a clean workspace.
The previous ``Main`` module is made available as ``LastMain``. A previously-loaded
Expand Down

0 comments on commit fd6a7e9

Please sign in to comment.