summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcodesoap <codesoap@mailbox.org>2019-06-25 17:48:24 +0200
committercodesoap <codesoap@mailbox.org>2019-06-25 19:16:47 +0200
commitca2741fe207b94dab5ca9e5d55df7bdf98ee457d (patch)
tree0eed864a5ae97cc83e6648c2f10681fff07f7587
parent196b38b2e0b8c8babfeffec786ef9ad948e976e6 (diff)
Rename ModuleLoad hook to ModuleLoaded
This clarifies, that the hook is run *after* the module is loaded.
-rw-r--r--doc/pages/changelog.asciidoc4
-rw-r--r--doc/pages/hooks.asciidoc4
-rw-r--r--rc/windowing/repl/tmux.kak2
-rw-r--r--rc/windowing/repl/x11.kak2
-rw-r--r--src/command_manager.cc2
-rw-r--r--src/hook_manager.hh4
6 files changed, 9 insertions, 9 deletions
diff --git a/doc/pages/changelog.asciidoc b/doc/pages/changelog.asciidoc
index 182b962e..72622a31 100644
--- a/doc/pages/changelog.asciidoc
+++ b/doc/pages/changelog.asciidoc
@@ -28,8 +28,8 @@ released versions.
`require-module` commands that allows for lazily loading language
support files with dependency resolution.
-* Added a new hook `ModuleLoad` which is run when a module is loaded,
- allowing for module specific configuration.
+* Added a new hook `ModuleLoaded` which is run after a module is
+ loaded, allowing for module specific configuration.
* Shell quoting of lists is not automatic anymore, `$kak_quoted_...`
makes it opt-in, and works for all option types.
diff --git a/doc/pages/hooks.asciidoc b/doc/pages/hooks.asciidoc
index 1bd252a0..67058ecd 100644
--- a/doc/pages/hooks.asciidoc
+++ b/doc/pages/hooks.asciidoc
@@ -176,8 +176,8 @@ name. Hooks with no description will always use an empty string.
*RawKey* `key`::
Triggered whenever a key is pressed by the user
-*ModuleLoad* `module`::
- Triggered when a module is evaluated by the first `require-module` call
+*ModuleLoaded* `module`::
+ Triggered after a module is evaluated by the first `require-module` call
Note that some hooks will not consider underlying scopes depending on what
context they are bound to be run into, e.g. the `BufWritePost` hook is a buffer
diff --git a/rc/windowing/repl/tmux.kak b/rc/windowing/repl/tmux.kak
index 291717db..94b832e3 100644
--- a/rc/windowing/repl/tmux.kak
+++ b/rc/windowing/repl/tmux.kak
@@ -1,7 +1,7 @@
# http://tmux.github.io/
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
-hook global ModuleLoad tmux %{
+hook global ModuleLoaded tmux %{
require-module tmux-repl
}
diff --git a/rc/windowing/repl/x11.kak b/rc/windowing/repl/x11.kak
index 908645d5..a1148ba5 100644
--- a/rc/windowing/repl/x11.kak
+++ b/rc/windowing/repl/x11.kak
@@ -1,4 +1,4 @@
-hook global ModuleLoad x11 %{
+hook global ModuleLoaded x11 %{
require-module x11-repl
}
diff --git a/src/command_manager.cc b/src/command_manager.cc
index 36f03ec4..dcf862ae 100644
--- a/src/command_manager.cc
+++ b/src/command_manager.cc
@@ -67,7 +67,7 @@ void CommandManager::load_module(StringView module_name, Context& context)
execute(module->value.commands, empty_context);
module->value.commands.clear();
- context.hooks().run_hook(Hook::ModuleLoad, module_name, context);
+ context.hooks().run_hook(Hook::ModuleLoaded, module_name, context);
}
struct parse_error : runtime_error
diff --git a/src/hook_manager.hh b/src/hook_manager.hh
index f1e6667b..71e9e2d1 100644
--- a/src/hook_manager.hh
+++ b/src/hook_manager.hh
@@ -57,7 +57,7 @@ enum class Hook
WinDisplay,
WinResize,
WinSetOption,
- ModuleLoad
+ ModuleLoaded
};
constexpr auto enum_desc(Meta::Type<Hook>)
@@ -103,7 +103,7 @@ constexpr auto enum_desc(Meta::Type<Hook>)
{Hook::WinDisplay, "WinDisplay"},
{Hook::WinResize, "WinResize"},
{Hook::WinSetOption, "WinSetOption"},
- {Hook::ModuleLoad, "ModuleLoad"}
+ {Hook::ModuleLoaded, "ModuleLoaded"}
});
}