From 6791f912b3574a51b2df2de7dcfd9196409a0290 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Fri, 30 Nov 2018 01:49:03 +0100 Subject: [PATCH] News and compat annotation for #29636 (edit(::Module)). --- NEWS.md | 1 + stdlib/InteractiveUtils/src/editless.jl | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index 476daa617d4d9..46c97665512e4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -66,6 +66,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.