aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGyörgy Andorka <gyorgy.andorka@protonmail.com>2022-03-31 19:13:22 +0200
committerChristian Clason <c.clason@uni-graz.at>2022-03-31 23:58:47 +0200
commit9d40b2fda96709a8219369316a5768ca4b689e4f (patch)
tree5050036b5fbac906b99b3d48f6baa4de71c436ec /src
parentea8ad79990ac67644680b66d8fc0e68c5eb70a87 (diff)
downloadrneovim-9d40b2fda96709a8219369316a5768ca4b689e4f.tar.gz
rneovim-9d40b2fda96709a8219369316a5768ca4b689e4f.tar.bz2
rneovim-9d40b2fda96709a8219369316a5768ca4b689e4f.zip
refactor(api)!: use singular/plural consistently in the autocmd API
Diffstat (limited to 'src')
-rw-r--r--src/nvim/api/autocmd.c9
-rw-r--r--src/nvim/api/keysets.lua4
2 files changed, 7 insertions, 6 deletions
diff --git a/src/nvim/api/autocmd.c b/src/nvim/api/autocmd.c
index 482aa80f1e..00a418367f 100644
--- a/src/nvim/api/autocmd.c
+++ b/src/nvim/api/autocmd.c
@@ -36,7 +36,7 @@
// Used to delete autocmds from nvim_del_autocmd
static int64_t next_autocmd_id = 1;
-/// Get autocommands that match the requirements passed to {opts}.
+/// Get all autocommands that match the corresponding {opts}.
///
/// These examples will get autocommands matching ALL the given criteria:
/// <pre>
@@ -562,7 +562,7 @@ void nvim_del_autocmd(Integer id)
/// - group: (string|int) The augroup name or id.
/// - NOTE: If not passed, will only delete autocmds *not* in any group.
///
-void nvim_clear_autocmd(Dict(clear_autocmd) *opts, Error *err)
+void nvim_clear_autocmds(Dict(clear_autocmds) *opts, Error *err)
FUNC_API_SINCE(9)
{
// TODO(tjdevries): Future improvements:
@@ -697,7 +697,8 @@ void nvim_del_augroup_by_name(String name)
augroup_del(name.data, false);
}
-/// Execute an autocommand |autocmd-execute|.
+/// Execute all autocommands for {event} that match the corresponding
+/// {opts} |autocmd-execute|.
/// @param event (String|Array) The event or events to execute
/// @param opts Dictionary of autocommand options:
/// - group (string|integer) optional: the autocommand group name or
@@ -709,7 +710,7 @@ void nvim_del_augroup_by_name(String name)
/// - modeline (bool) optional: defaults to true. Process the
/// modeline after the autocommands |<nomodeline>|.
/// @see |:doautocmd|
-void nvim_exec_autocmd(Object event, Dict(exec_autocmd) *opts, Error *err)
+void nvim_exec_autocmds(Object event, Dict(exec_autocmds) *opts, Error *err)
FUNC_API_SINCE(9)
{
int au_group = AUGROUP_ALL;
diff --git a/src/nvim/api/keysets.lua b/src/nvim/api/keysets.lua
index 520bb7fbc6..8ad4dae928 100644
--- a/src/nvim/api/keysets.lua
+++ b/src/nvim/api/keysets.lua
@@ -123,7 +123,7 @@ return {
"nocombine";
};
-- Autocmds
- clear_autocmd = {
+ clear_autocmds = {
"buffer";
"event";
"group";
@@ -139,7 +139,7 @@ return {
"once";
"pattern";
};
- exec_autocmd = {
+ exec_autocmds = {
"buffer";
"group";
"modeline";