Age | Commit message (Collapse) | Author |
|
|
|
In Python raw strings, newlines can't be escaped with a backslash. If
you do that, both the backslash and the newline become part of the
string. This meant that the regex for constants both started and ended
with a newline which caused every other constant to be skipped.
|
|
|
|
|
|
The plugin API function config_new_option accepts null as the
default_value and/or value however the scripting APIs (except for lua)
didn't allow sending null as a parameter value, so it was impossible to
use it this way. This allows sending a null value for these parameters.
Lua already supported sending in nil for these parameters and it works
as expected, so nothing is changed for this plugin.
For Guile you can now send in #nil, for JavaScript null or undefined,
for Perl undef, for PHP NULL, for Python None, for Ruby nil and for Tcl
$::weechat::WEECHAT_NULL.
In all of these languages except Tcl this is the special value
indicating a missing value. However Tcl only has one type, string, so it
doesn't have a null value. Therefore I created a constant with the value
`\uFFFF\uFFFF\uFFFFWEECHAT_NULL\uFFFF\uFFFF\uFFFF` which is used
instead. This is very unlikely to appear unintentionally. Using the
unicode code point \uFFFF was suggested on
https://wiki.tcl-lang.org/page/null.
I tested this with these scripts:
https://gist.github.com/trygveaa/f91977dde5d2876d502bf55fbf9b50cc
|
|
|
|
|
|
function ngettext
|
|
free content, add function printf_y_date_tags (closes #1746)
|
|
prnt_date_tags
|
|
|
|
|
|
|
|
|
|
|
|
(issue #1285)
The 4 directories (which can be the same):
- config: configuration files, certificates
- data: log/upgrade files, local plugins, scripts, xfer files
- cache: script repository, scripts downloaded (temporary location)
- runtime: FIFO pipe, relay UNIX sockets
|
|
reference)
|
|
|
|
|
|
|
|
Related: #1461
Some scripts (eg weechat-matrix) ship directories that need to be
imported from the script.
Rather than globally installing the python packages to python's
`site-packages` the directories can be installed alongside the script in
`WEECHAT_SHAREDIR/python`.
This change adds that directory to the `$PYTHONPATH` to import
successfully.
|
|
|
|
completion_{get_string|list_add}
Old functions are kept for compatibility reasons.
|
|
|
|
(issue #1484)
|
|
converted to a Python dict (closes #1463)
|
|
|
|
cmake documentation is absolutely atrocious, and I don't know why they
mention all the wrong things to use, and the cargo cult of successfully
writing a cmake build definition (copy-pasting what works from other
projects) also uses all the wrong things. But it turns out it is
possible to correctly link a PkgConfig target despite all that, at
least, *iff* you use cmake >= 3.13. I've chosen option 2, which is to
vendor in cmake >= 3.13's FindPkgConfig module in the previous commit.
Using IMPORTED_TARGET GLOBAL in a pkg-config check will result in a
proper linker target being created. For comparison, this is like using
meson's dependency() target, except meson forces you to do this by
default. The result is that the build system's internal representation
of how to link something, is used instead of manually passing build
flags defined in variables.
This is an important distinction to make, because cmake does not have a
list datatype, and instead turns lists into strings separated by ';'
which are indistinguishable from, like, strings which contain ';'
characters. When you pass the resulting list-which-isn't-really-a-list
to link an executable/library, you either need to preprocess the
variable to replace ';' with ' ' (just in case there are multiple
elements) or use cmake functions which magically know to do this
themselves -- or at least, I assume there are cmake functions that
correctly handle so-called "lists", or there would be no need for
"lists" to exist.
The IMPORTED_TARGET will define a bunch of INTERFACE_* properties which
do seem to do exactly this. The resulting build definition should
actually, correctly, link python, thereby fixing #1398 in a better way.
|
|
string is not UTF-8 valid (issue #1220, closes #1389)
|
|
|
|
|
|
fixes incorrect (non)detection of libpython3.Ym.so due to PEP 3149 since
python's officially exported build flags know how to correctly link to
python.
|
|
|
|
Allows for custom LIBDIR to specified with cmake builds. WEECHAT_LIBDIR
is used for a custom Weechat directory, or set from LIBDIR (as LIBDIR
used to be set).
|
|
|
|
options
This option is OFF by default and should be enabled only for tests, to measure
test coverage.
|
|
(closes #1322)
|
|
|
|
|
|
|
|
|
|
|
|
lua and guile)
When there was a call to a hook callback during the eval, the output buffer was
cleared too late, and displayed multiple times in the buffer.
This commit clears the buffer even before we display it (this display can
trigger a hook callback).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Related to commit 8fbbe8b0d509df26ff86ca8cd7fe4b2205c6d15e.
|