aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-04-01 00:35:21 +0200
committerGitHub <noreply@github.com>2022-04-01 00:35:21 +0200
commit80d4d6b486c62d750b9a08ed5ed888d9a5d3ac48 (patch)
treefe79699c43e768863f1242f165866789dc0c490a /src
parent38ba2a75fcbb3a893bf8b22838ed06fec6228509 (diff)
parent9d40b2fda96709a8219369316a5768ca4b689e4f (diff)
downloadrneovim-80d4d6b486c62d750b9a08ed5ed888d9a5d3ac48.tar.gz
rneovim-80d4d6b486c62d750b9a08ed5ed888d9a5d3ac48.tar.bz2
rneovim-80d4d6b486c62d750b9a08ed5ed888d9a5d3ac48.zip
Merge pull request #17938 from ggandor/autocmd-api-names
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 f896671287..57f392f98e 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>
@@ -568,7 +568,7 @@ void nvim_del_autocmd(Integer id, Error *err)
/// - 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:
@@ -711,7 +711,8 @@ void nvim_del_augroup_by_name(String name, Error *err)
});
}
-/// 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
@@ -723,7 +724,7 @@ void nvim_del_augroup_by_name(String name, Error *err)
/// - 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";