diff --git a/NEWS.md b/NEWS.md index 13f3637a430c1..780ec83515d5a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -52,6 +52,7 @@ Standard library changes * `Base.julia_cmd` now propagates the `--inline=(yes|no)` flag ([#29858]). * New `DateTime(::Date, ::Time)` constructor ([#29754]). * `isdiag` and `isposdef` for `Diagonal` and `UniformScaling` ([#29638]). + * New `edit(m::Module)` method which opens the main source file for module `m` ([#29636]). Compiler/Runtime improvements ----------------------------- diff --git a/stdlib/InteractiveUtils/src/editless.jl b/stdlib/InteractiveUtils/src/editless.jl index d929a35a840f1..c8ea1662400bb 100644 --- a/stdlib/InteractiveUtils/src/editless.jl +++ b/stdlib/InteractiveUtils/src/editless.jl @@ -87,10 +87,11 @@ end edit(module) Edit the definition of a function, optionally specifying a tuple of types to indicate which -method to edit. +method to edit. For modules, open the main source file. The module needs to be loaded with +`using` or `import` first. -For modules, open the main source file. The module needs to be loaded with `using` or -`import` first. +!!! compat "Julia 1.1" + `edit` on modules requires at least Julia 1.1. The editor can be changed by setting `JULIA_EDITOR`, `VISUAL` or `EDITOR` as an environment variable.