From c174f9be70855e89f606547cfa5471942d238038 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sat, 21 Dec 2024 20:57:40 +0300 Subject: support external Scintilla lexer libraries and Scintillua in particular * @ES/SCI_SETILEXER/lib^@name/ now opens the lexer in library . * You need to define the environment variable $SCITECO_SCINTILLUA_LEXERS to point to the lexers/ subdirectory (containing the *.lua files). Perhaps this should default to the dirname of ? * The semantics of SCI_NAMEOFSTYLE have been changed: It now returns style ids when given style names, so you can actually write Scintillua lexer *.tes files. This will be superfluous if we had a way to return strings from Scintilla messages into Q-Registers, e.g. 23@EPq/SCI_NAMEOFSTYLE/. * We now depend on gmodule as well, but it should always be part of glib. It does not change the library dependencies of any package. It might result in gmodule shared libraries to be bundled in the Win32 and Mac OS packages if they weren't already. --- src/error.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/error.h') diff --git a/src/error.h b/src/error.h index c51f528..021f759 100644 --- a/src/error.h +++ b/src/error.h @@ -17,6 +17,7 @@ #pragma once #include +#include #include "sciteco.h" #include "string-utils.h" @@ -53,6 +54,7 @@ typedef enum { TECO_ERROR_MEMLIMIT, TECO_ERROR_CLIPBOARD, TECO_ERROR_WIN32, + TECO_ERROR_MODULE, /** Interrupt current operation */ TECO_ERROR_INTERRUPTED, @@ -164,6 +166,13 @@ teco_error_win32_set(GError **error, const gchar *prefix, gint err) } #endif +static inline void +teco_error_module_set(GError **error, const gchar *prefix) +{ + g_set_error(error, TECO_ERROR, TECO_ERROR_MODULE, "%s: %s", + prefix, g_module_error()); +} + static inline void teco_error_interrupted_set(GError **error) { -- cgit v1.2.3