Skip to content

Commit 23f6656

Browse files
authored
Improve variable names (#209)
1 parent 7afb325 commit 23f6656

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

R/conditions.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ sanitize_call <- function(cnd) {
5454
if (identical(cnd$call, quote(withVisible(do)))) {
5555
cnd$call <- NULL
5656
}
57-
if (identical(cnd$call, quote(eval(as.call(list(cb)), envir)))) {
57+
if (identical(cnd$call, quote(eval(as.call(list(context)), envir)))) {
5858
cnd$call <- NULL
5959
}
6060

R/evaluate.R

+3-4
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ evaluate <- function(input,
121121
envir <- list2env(envir, parent = enclos %||% parent.frame())
122122
}
123123
local_inject_funs(envir)
124-
125-
124+
126125
# Handlers for warnings, errors and messages
127126
user_handlers <- output_handler$calling_handlers
128127
evaluate_handlers <- condition_handlers(
@@ -134,7 +133,7 @@ evaluate <- function(input,
134133
# The user's condition handlers have priority over ours
135134
handlers <- c(user_handlers, evaluate_handlers)
136135

137-
cb <- function() {
136+
context <- function() {
138137
do <- NULL # silence R CMD check note
139138

140139
for (tle in tles) {
@@ -174,7 +173,7 @@ evaluate <- function(input,
174173

175174
# Here we use `eval()` to create an unwinding scope for `envir`.
176175
# We call ourselves back immediately once the scope is created.
177-
eval(as.call(list(cb)), envir)
176+
eval(as.call(list(context)), envir)
178177
watcher$capture_output()
179178

180179
# Always capture last plot, even if incomplete

0 commit comments

Comments
 (0)