Skip to content

Commit 3052b39

Browse files
lionel-jennybc
andauthored
Apply suggestions from code review
Co-authored-by: Jennifer (Jenny) Bryan <jenny.f.bryan@gmail.com>
1 parent 861a035 commit 3052b39

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* `local_tempfile()` gains a lines argument so, if desired, you can pre-fill
4242
the temporary file with some data.
4343

44-
* `defer()` all `local_` functions now work when run inside of a
44+
* `defer()` and all `local_*()` functions now work when run inside of a
4545
`.Rmd`. Note that they are executed at the very end of the session,
4646
after the output has been collected, so you won't see any printed
4747
side-effects (#187). The same applies with interactive knitting,

R/compat-defer.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ setup_handlers <- function(envir) {
4545
if (is_interactive()) {
4646
message(
4747
sprintf("Setting deferred event(s) on the global environment.\n"),
48-
" * Will be run automatically when session ends\n",
48+
" * Will be run automatically when session ends.\n",
4949
" * Execute (and clear) with `withr::deferred_run()`.\n",
5050
" * Clear (without executing) with `withr::deferred_clear()`."
5151
)
@@ -65,6 +65,7 @@ setup_handlers <- function(envir) {
6565
in_knitr <- function(envir) {
6666
knitr_in_progress() && identical(knitr::knit_global(), envir)
6767
}
68+
6869
is_top_level_global_env <- function(envir) {
6970
if (!identical(envir, globalenv())) {
7071
return(FALSE)

0 commit comments

Comments
 (0)