vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 74a0800df2bedc58c465a2124152010923caef3c
parent b42b5e5c0e35eebcb36d7ca49e45693b3a7d856f
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Fri, 24 Mar 2017 11:46:30 +0100

vis-lua: use better name for error handling function

Diffstat:
Mvis-lua.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vis-lua.c b/vis-lua.c @@ -221,7 +221,7 @@ static void stack_dump(lua_State *L, const char *format, ...) { #endif -static int error_function(lua_State *L) { +static int error_handler(lua_State *L) { Vis *vis = lua_touserdata(L, lua_upvalueindex(1)); if (vis->errorhandler) return 1; @@ -240,7 +240,7 @@ static int pcall(Vis *vis, lua_State *L, int nargs, int nresults) { /* insert a custom error function below all arguments */ int msgh = lua_gettop(L) - nargs; lua_pushlightuserdata(L, vis); - lua_pushcclosure(L, error_function, 1); + lua_pushcclosure(L, error_handler, 1); lua_insert(L, msgh); int ret = lua_pcall(L, nargs, nresults, msgh); lua_remove(L, msgh);