From 56c227bfc62bd4c38d964539c718bc4301abaae7 Mon Sep 17 00:00:00 2001 From: Leonidas Zhak <70497898+LeonidasZhak@users.noreply.github.com> Date: Sun, 7 Jun 2026 02:43:26 +0800 Subject: [PATCH 1/2] docs: document cli_progress_sleep() in C API reference Fixes #806. Add roxygen documentation for cli_progress_sleep() in the progress C API header, matching the style of adjacent entries. --- inst/include/cli/progress.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/inst/include/cli/progress.h b/inst/include/cli/progress.h index 809fad8a1..79b4edde8 100644 --- a/inst/include/cli/progress.h +++ b/inst/include/cli/progress.h @@ -213,6 +213,22 @@ static R_INLINE void cli_progress_set_status(SEXP bar, const char *status); static R_INLINE void cli_progress_set_type(SEXP bar, const char *type); +//' ### `cli_progress_sleep()` +//' +//' ```c +//' void cli_progress_sleep(int s, long ns); +//' ``` +//' +//' Sleep for the specified amount of time. This function is mainly +//' useful in examples and tests, to simulate a computation that takes +//' some time. It respects the `CLI_SPEED_TIME` environment variable, +//' so automated tests can run faster. +//' +//' * `s`: number of seconds to sleep. +//' * `ns`: number of nanoseconds to sleep. + +static R_INLINE void cli_progress_sleep(int s, long ns); + //' ### `cli_progress_update()` //' //' ```c From 71e138abb50ac5ecae318b415fb0081fb9941bad Mon Sep 17 00:00:00 2001 From: Leonidas Zhak <70497898+LeonidasZhak@users.noreply.github.com> Date: Sun, 7 Jun 2026 04:17:53 +0800 Subject: [PATCH 2/2] docs: fix typos and grammar in roxygen documentation - Fix "remote it" -> "remove it" in ?stop_app (app.R) - Fix "These functions supports" -> "These functions support" in ?cli_h1 and ?cli_alert (cli.R) --- R/app.R | 2 +- R/cli.R | 4 ++-- man/cli_alert.Rd | 2 +- man/cli_h1.Rd | 2 +- man/start_app.Rd | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/R/app.R b/R/app.R index b3e065c54..0b9759f5c 100644 --- a/R/app.R +++ b/R/app.R @@ -17,7 +17,7 @@ cliappenv$pid <- Sys.getpid() #' @param .envir The environment to use, instead of the calling frame, #' to trigger the stop of the app. #' @param app App to stop. If `NULL`, the current default app is stopped. -#' Otherwise we find the supplied app in the app stack, and remote it, +#' Otherwise we find the supplied app in the app stack, and remove it, #' together with all the apps above it. #' @return #' `start_app` returns the new app, `default_app` returns the default app. diff --git a/R/cli.R b/R/cli.R index f3c036756..9942f06ff 100644 --- a/R/cli.R +++ b/R/cli.R @@ -280,7 +280,7 @@ cli_verbatim <- function(..., .envir = parent.frame()) { #' themes. #' @param .envir Environment to evaluate the glue expressions in. #' -#' @seealso These functions supports [inline markup][inline-markup]. +#' @seealso These functions support [inline markup][inline-markup]. #' @family functions supporting inline markup #' @export @@ -795,7 +795,7 @@ cli_li <- function( #' @param wrap Whether to auto-wrap the text of the alert. #' @param .envir Environment to evaluate the glue expressions in. #' -#' @seealso These functions supports [inline markup][inline-markup]. +#' @seealso These functions support [inline markup][inline-markup]. #' @family functions supporting inline markup #' @export diff --git a/man/cli_alert.Rd b/man/cli_alert.Rd index f1fb84be3..24a63d5dc 100644 --- a/man/cli_alert.Rd +++ b/man/cli_alert.Rd @@ -124,7 +124,7 @@ cli_alert_info("Data columns: \{.val \{names(mtcars)\}\}.", wrap = TRUE) } } \seealso{ -These functions supports \link[=inline-markup]{inline markup}. +These functions support \link[=inline-markup]{inline markup}. Other functions supporting inline markup: \code{\link[=cli_abort]{cli_abort()}}, diff --git a/man/cli_h1.Rd b/man/cli_h1.Rd index 2c11b9856..e13b913db 100644 --- a/man/cli_h1.Rd +++ b/man/cli_h1.Rd @@ -43,7 +43,7 @@ cli_h3("Header \{.emph 3\}") }} } \seealso{ -These functions supports \link[=inline-markup]{inline markup}. +These functions support \link[=inline-markup]{inline markup}. Other functions supporting inline markup: \code{\link[=cli_abort]{cli_abort()}}, diff --git a/man/start_app.Rd b/man/start_app.Rd index b8fd2a6b0..44ea5d1ff 100644 --- a/man/start_app.Rd +++ b/man/start_app.Rd @@ -29,7 +29,7 @@ is destroyed.} to trigger the stop of the app.} \item{app}{App to stop. If \code{NULL}, the current default app is stopped. -Otherwise we find the supplied app in the app stack, and remote it, +Otherwise we find the supplied app in the app stack, and remove it, together with all the apps above it.} } \value{