spell: rename "aspell" plugin to "spell" (issue #1299)

The following things have been renamed:

- file aspell.conf -> spell.conf
- options aspell.* -> spell.*
- bar item aspell_dict -> spell_dict
- bar item and local variable aspell_suggest -> spell_suggest
- info aspell_dict -> spell_dict
v2.8-utf8proc
Sébastien Helleu 2019-01-27 14:59:22 +01:00
parent e8159298ad
commit 57aa9e060e
96 changed files with 2070 additions and 2011 deletions

View File

@ -88,8 +88,6 @@ option(ENABLE_NLS "Enable Native Language Support" ON)
option(ENABLE_GNUTLS "Enable SSLv3/TLS support" ON) option(ENABLE_GNUTLS "Enable SSLv3/TLS support" ON)
option(ENABLE_LARGEFILE "Enable Large File Support" ON) option(ENABLE_LARGEFILE "Enable Large File Support" ON)
option(ENABLE_ALIAS "Enable Alias plugin" ON) option(ENABLE_ALIAS "Enable Alias plugin" ON)
option(ENABLE_ASPELL "Enable Aspell plugin" ON)
option(ENABLE_ENCHANT "Enable Enchant lib for Aspell plugin" OFF)
option(ENABLE_BUFLIST "Enable Buflist plugin" ON) option(ENABLE_BUFLIST "Enable Buflist plugin" ON)
option(ENABLE_CHARSET "Enable Charset plugin" ON) option(ENABLE_CHARSET "Enable Charset plugin" ON)
option(ENABLE_EXEC "Enable Exec plugin" ON) option(ENABLE_EXEC "Enable Exec plugin" ON)
@ -109,6 +107,8 @@ option(ENABLE_TCL "Enable Tcl scripting language" ON)
option(ENABLE_GUILE "Enable Scheme (guile) scripting language" ON) option(ENABLE_GUILE "Enable Scheme (guile) scripting language" ON)
option(ENABLE_JAVASCRIPT "Enable JavaScript scripting language" ON) option(ENABLE_JAVASCRIPT "Enable JavaScript scripting language" ON)
option(ENABLE_PHP "Enable PHP scripting language" ON) option(ENABLE_PHP "Enable PHP scripting language" ON)
option(ENABLE_SPELL "Enable Spell checker plugin" ON)
option(ENABLE_ENCHANT "Enable Enchant lib for Spell checker plugin" OFF)
option(ENABLE_TRIGGER "Enable Trigger plugin" ON) option(ENABLE_TRIGGER "Enable Trigger plugin" ON)
option(ENABLE_XFER "Enable Xfer plugin" ON) option(ENABLE_XFER "Enable Xfer plugin" ON)
option(ENABLE_MAN "Enable build of man page" OFF) option(ENABLE_MAN "Enable build of man page" OFF)

View File

@ -18,9 +18,13 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
[[v2.5]] [[v2.5]]
== Version 2.5 (under dev) == Version 2.5 (under dev)
New features::
* spell: rename aspell plugin to spell (issue #1299)
Bug fixes:: Bug fixes::
* aspell: fix detection of nick followed by the nick completer (issue #1306, issue #1307) * spell: fix detection of nick followed by the nick completer (issue #1306, issue #1307)
Build:: Build::

View File

@ -50,7 +50,7 @@ Following packages are optional:
* for i18n: gettext * for i18n: gettext
* for SSL: gnutls, ca-certificates * for SSL: gnutls, ca-certificates
* for spell checking: aspell * for spell checking: aspell or enchant
* for scripting: python, perl, ruby, lua, tcl, guile, libv8 (javascript), php * for scripting: python, perl, ruby, lua, tcl, guile, libv8 (javascript), php
* for building doc and man page: asciidoctor * for building doc and man page: asciidoctor
* for building tests: C++ compiler, CppUTest * for building tests: C++ compiler, CppUTest

View File

@ -17,6 +17,23 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
(file _ChangeLog.adoc_ in sources). (file _ChangeLog.adoc_ in sources).
[[v2.5]]
== Version 2.5 (under dev)
[[v2.5_aspell_plugin_renamed]]
=== Aspell plugin renamed to Spell
The "aspell" plugin has been renamed to "spell".
Consequently, the following things have been renamed as well:
* file _aspell.conf_ renamed to _spell.conf_; the content of the
file has not changed, so you can just rename the file to keep your changes
* options _aspell.*_ have been renamed to _spell.*_
* bar item _aspell_dict_ renamed to _spell_dict_
* bar item _aspell_suggest_ renamed to _spell_suggest_
* info _aspell_dict_ renamed to _spell_dict_
[[v2.4]] [[v2.4]]
== Version 2.4 (2019-02-17) == Version 2.4 (2019-02-17)

View File

@ -108,7 +108,6 @@ AH_VERBATIM([HAVE_ASPELL_VERSION_STRING], [#undef HAVE_ASPELL_VERSION_STRING])
AH_VERBATIM([HAVE_ENCHANT_GET_VERSION], [#undef HAVE_ENCHANT_GET_VERSION]) AH_VERBATIM([HAVE_ENCHANT_GET_VERSION], [#undef HAVE_ENCHANT_GET_VERSION])
AH_VERBATIM([HAVE_GUILE_GMP_MEMORY_FUNCTIONS], [#undef HAVE_GUILE_GMP_MEMORY_FUNCTIONS]) AH_VERBATIM([HAVE_GUILE_GMP_MEMORY_FUNCTIONS], [#undef HAVE_GUILE_GMP_MEMORY_FUNCTIONS])
AH_VERBATIM([PLUGIN_ALIAS], [#undef PLUGIN_ALIAS]) AH_VERBATIM([PLUGIN_ALIAS], [#undef PLUGIN_ALIAS])
AH_VERBATIM([PLUGIN_ASPELL], [#undef PLUGIN_ASPELL])
AH_VERBATIM([PLUGIN_BUFLIST], [#undef PLUGIN_BUFLIST]) AH_VERBATIM([PLUGIN_BUFLIST], [#undef PLUGIN_BUFLIST])
AH_VERBATIM([PLUGIN_CHARSET], [#undef PLUGIN_CHARSET]) AH_VERBATIM([PLUGIN_CHARSET], [#undef PLUGIN_CHARSET])
AH_VERBATIM([PLUGIN_EXEC], [#undef PLUGIN_EXEC]) AH_VERBATIM([PLUGIN_EXEC], [#undef PLUGIN_EXEC])
@ -126,6 +125,7 @@ AH_VERBATIM([PLUGIN_PHP], [#undef PLUGIN_PHP])
AH_VERBATIM([PLUGIN_TCL], [#undef PLUGIN_TCL]) AH_VERBATIM([PLUGIN_TCL], [#undef PLUGIN_TCL])
AH_VERBATIM([PLUGIN_GUILE], [#undef PLUGIN_GUILE]) AH_VERBATIM([PLUGIN_GUILE], [#undef PLUGIN_GUILE])
AH_VERBATIM([PLUGIN_JAVASCRIPT], [#undef PLUGIN_JAVASCRIPT]) AH_VERBATIM([PLUGIN_JAVASCRIPT], [#undef PLUGIN_JAVASCRIPT])
AH_VERBATIM([PLUGIN_SPELL], [#undef PLUGIN_SPELL])
AH_VERBATIM([PLUGIN_TRIGGER], [#undef PLUGIN_TRIGGER]) AH_VERBATIM([PLUGIN_TRIGGER], [#undef PLUGIN_TRIGGER])
AH_VERBATIM([PLUGIN_XFER], [#undef PLUGIN_XFER]) AH_VERBATIM([PLUGIN_XFER], [#undef PLUGIN_XFER])
AH_VERBATIM([TESTS], [#undef TESTS]) AH_VERBATIM([TESTS], [#undef TESTS])
@ -141,8 +141,6 @@ AC_ARG_ENABLE(headless, [ --disable-headless turn off headless binary
AC_ARG_ENABLE(gnutls, [ --disable-gnutls turn off gnutls support (default=compiled if found)],enable_gnutls=$enableval,enable_gnutls=yes) AC_ARG_ENABLE(gnutls, [ --disable-gnutls turn off gnutls support (default=compiled if found)],enable_gnutls=$enableval,enable_gnutls=yes)
AC_ARG_ENABLE(largefile, [ --disable-largefile turn off Large File Support (default=on)],enable_largefile=$enableval,enable_largefile=yes) AC_ARG_ENABLE(largefile, [ --disable-largefile turn off Large File Support (default=on)],enable_largefile=$enableval,enable_largefile=yes)
AC_ARG_ENABLE(alias, [ --disable-alias turn off Alias plugin (default=compiled)],enable_alias=$enableval,enable_alias=yes) AC_ARG_ENABLE(alias, [ --disable-alias turn off Alias plugin (default=compiled)],enable_alias=$enableval,enable_alias=yes)
AC_ARG_ENABLE(aspell, [ --disable-aspell turn off Aspell plugin (default=compiled)],enable_aspell=$enableval,enable_aspell=yes)
AC_ARG_ENABLE(enchant, [ --enable-enchant turn on Enchant lib for Aspell plugin (default=off)],enable_enchant=$enableval,enable_enchant=no)
AC_ARG_ENABLE(buflist, [ --disable-buflist turn off Buflist plugin (default=compiled)],enable_buflist=$enableval,enable_buflist=yes) AC_ARG_ENABLE(buflist, [ --disable-buflist turn off Buflist plugin (default=compiled)],enable_buflist=$enableval,enable_buflist=yes)
AC_ARG_ENABLE(charset, [ --disable-charset turn off Charset plugin (default=compiled)],enable_charset=$enableval,enable_charset=yes) AC_ARG_ENABLE(charset, [ --disable-charset turn off Charset plugin (default=compiled)],enable_charset=$enableval,enable_charset=yes)
AC_ARG_ENABLE(exec, [ --disable-exec turn off Exec plugin (default=compiled)],enable_exec=$enableval,enable_exec=yes) AC_ARG_ENABLE(exec, [ --disable-exec turn off Exec plugin (default=compiled)],enable_exec=$enableval,enable_exec=yes)
@ -162,6 +160,8 @@ AC_ARG_ENABLE(tcl, [ --disable-tcl turn off Tcl script plugi
AC_ARG_ENABLE(guile, [ --disable-guile turn off Guile (scheme) script plugin (default=compiled if found)],enable_guile=$enableval,enable_guile=yes) AC_ARG_ENABLE(guile, [ --disable-guile turn off Guile (scheme) script plugin (default=compiled if found)],enable_guile=$enableval,enable_guile=yes)
AC_ARG_ENABLE(javascript, [ --disable-javascript turn off JavaScript script plugin (default=compiled if found)],enable_javascript=$enableval,enable_javascript=yes) AC_ARG_ENABLE(javascript, [ --disable-javascript turn off JavaScript script plugin (default=compiled if found)],enable_javascript=$enableval,enable_javascript=yes)
AC_ARG_ENABLE(php, [ --disable-php turn off PHP script plugin (default=compiled if found)],enable_php=$enableval,enable_php=yes) AC_ARG_ENABLE(php, [ --disable-php turn off PHP script plugin (default=compiled if found)],enable_php=$enableval,enable_php=yes)
AC_ARG_ENABLE(spell, [ --disable-spell turn off Spell checker plugin (default=compiled)],enable_spell=$enableval,enable_spell=yes)
AC_ARG_ENABLE(enchant, [ --enable-enchant turn on Enchant lib for Spell checker plugin (default=off)],enable_enchant=$enableval,enable_enchant=no)
AC_ARG_ENABLE(trigger, [ --disable-trigger turn off Trigger plugin (default=compiled)],enable_trigger=$enableval,enable_trigger=yes) AC_ARG_ENABLE(trigger, [ --disable-trigger turn off Trigger plugin (default=compiled)],enable_trigger=$enableval,enable_trigger=yes)
AC_ARG_ENABLE(xfer, [ --disable-xfer turn off Xfer (file transfer) plugin (default=compiled)],enable_xfer=$enableval,enable_xfer=yes) AC_ARG_ENABLE(xfer, [ --disable-xfer turn off Xfer (file transfer) plugin (default=compiled)],enable_xfer=$enableval,enable_xfer=yes)
AC_ARG_WITH(tclconfig, [ --with-tclconfig=DIR directory containing tcl configuration (tclConfig.sh)],tclconfig=$withval,tclconfig='') AC_ARG_WITH(tclconfig, [ --with-tclconfig=DIR directory containing tcl configuration (tclConfig.sh)],tclconfig=$withval,tclconfig='')
@ -322,79 +322,6 @@ else
not_asked="$not_asked alias" not_asked="$not_asked alias"
fi fi
# ---------------------------------- aspell ------------------------------------
if test "x$enable_aspell" = "xyes" ; then
ac_found_enchant_lib="no"
if test "x$enable_enchant" = "xyes" ; then
PKG_CHECK_MODULES(ENCHANT, [enchant], ac_found_enchant_lib="yes", ac_found_enchant_lib="no")
fi
if test "x$ac_found_enchant_lib" = "xyes" ; then
CFLAGS="$CFLAGS -DUSE_ENCHANT"
ASPELL_LIB_USED="enchant"
# check if function enchant_get_version() exists
ac_save_CFLAGS="$CFLAGS"
ac_save_LDFLAGS="$LDFLAGS"
CFLAGS="$CFLAGS $ENCHANT_CFLAGS"
LDFLAGS="$LDFLAGS $ENCHANT_LIBS"
AC_CACHE_CHECK([for enchant_get_version() support], ac_cv_have_enchant_get_version, [
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[ #include <enchant.h>]],
[[ const char *version = enchant_get_version(); ]])],
[ ac_have_enchant_get_version="yes" ],
[ ac_have_enchant_get_version="no" ])])
CFLAGS="$ac_save_CFLAGS"
LDFLAGS="$ac_save_LDFLAGS"
if test "x$ac_have_enchant_get_version" = "xyes"; then
AC_DEFINE(HAVE_ENCHANT_GET_VERSION)
fi
else
ASPELL_CFLAGS=""
ASPELL_LFLAGS=""
AC_CHECK_HEADER(aspell.h,ac_found_aspell_header="yes",ac_found_aspell_header="no")
AC_CHECK_LIB(aspell,new_aspell_speller,ac_found_aspell_lib="yes",ac_found_aspell_lib="no")
AC_MSG_CHECKING(for aspell headers and libraries)
if test "x$ac_found_aspell_header" = "xno" -o "x$ac_found_aspell_lib" = "xno" ; then
AC_MSG_RESULT(no)
AC_MSG_WARN([
*** Aspell headers and/or libraries couldn't be found on your system.
*** Try to install them with your software package manager.
*** WeeChat will be built without Aspell support.])
enable_aspell="no"
not_found="$not_found aspell"
else
AC_MSG_RESULT(yes)
ASPELL_LFLAGS="$ASPELL_LFLAGS -laspell"
ASPELL_LIB_USED="aspell"
# check if function aspell_version_string() exists
ac_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $ASPELL_LFLAGS"
AC_CACHE_CHECK([for aspell_version_string() support], ac_cv_have_aspell_version_string, [
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[ #include <aspell.h>]],
[[ const char *version = aspell_version_string(); ]])],
[ ac_have_aspell_version_string="yes" ],
[ ac_have_aspell_version_string="no" ])])
LDFLAGS="$ac_save_LDFLAGS"
if test "x$ac_have_aspell_version_string" = "xyes"; then
AC_DEFINE(HAVE_ASPELL_VERSION_STRING)
fi
fi
fi
else
not_asked="$not_asked aspell"
fi
if test "x$enable_aspell" = "xyes" ; then
AC_SUBST(ASPELL_CFLAGS)
AC_SUBST(ASPELL_LFLAGS)
AC_DEFINE(PLUGIN_ASPELL)
fi
# --------------------------------- buflist ------------------------------------ # --------------------------------- buflist ------------------------------------
if test "x$enable_buflist" = "xyes" ; then if test "x$enable_buflist" = "xyes" ; then
@ -1053,6 +980,79 @@ if test "x$enable_php" = "xyes" ; then
AC_DEFINE(PLUGIN_PHP) AC_DEFINE(PLUGIN_PHP)
fi fi
# ----------------------------------- spell ------------------------------------
if test "x$enable_spell" = "xyes" ; then
ac_found_enchant_lib="no"
if test "x$enable_enchant" = "xyes" ; then
PKG_CHECK_MODULES(ENCHANT, [enchant], ac_found_enchant_lib="yes", ac_found_enchant_lib="no")
fi
if test "x$ac_found_enchant_lib" = "xyes" ; then
CFLAGS="$CFLAGS -DUSE_ENCHANT"
SPELL_LIB_USED="enchant"
# check if function enchant_get_version() exists
ac_save_CFLAGS="$CFLAGS"
ac_save_LDFLAGS="$LDFLAGS"
CFLAGS="$CFLAGS $ENCHANT_CFLAGS"
LDFLAGS="$LDFLAGS $ENCHANT_LIBS"
AC_CACHE_CHECK([for enchant_get_version() support], ac_cv_have_enchant_get_version, [
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[ #include <enchant.h>]],
[[ const char *version = enchant_get_version(); ]])],
[ ac_have_enchant_get_version="yes" ],
[ ac_have_enchant_get_version="no" ])])
CFLAGS="$ac_save_CFLAGS"
LDFLAGS="$ac_save_LDFLAGS"
if test "x$ac_have_enchant_get_version" = "xyes"; then
AC_DEFINE(HAVE_ENCHANT_GET_VERSION)
fi
else
ASPELL_CFLAGS=""
ASPELL_LFLAGS=""
AC_CHECK_HEADER(aspell.h,ac_found_aspell_header="yes",ac_found_aspell_header="no")
AC_CHECK_LIB(aspell,new_aspell_speller,ac_found_aspell_lib="yes",ac_found_aspell_lib="no")
AC_MSG_CHECKING(for aspell headers and libraries)
if test "x$ac_found_aspell_header" = "xno" -o "x$ac_found_aspell_lib" = "xno" ; then
AC_MSG_RESULT(no)
AC_MSG_WARN([
*** Aspell headers and/or libraries couldn't be found on your system.
*** Try to install them with your software package manager.
*** WeeChat will be built without Aspell support.])
enable_spell="no"
not_found="$not_found spell"
else
AC_MSG_RESULT(yes)
ASPELL_LFLAGS="$ASPELL_LFLAGS -laspell"
SPELL_LIB_USED="aspell"
# check if function aspell_version_string() exists
ac_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $ASPELL_LFLAGS"
AC_CACHE_CHECK([for aspell_version_string() support], ac_cv_have_aspell_version_string, [
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[ #include <aspell.h>]],
[[ const char *version = aspell_version_string(); ]])],
[ ac_have_aspell_version_string="yes" ],
[ ac_have_aspell_version_string="no" ])])
LDFLAGS="$ac_save_LDFLAGS"
if test "x$ac_have_aspell_version_string" = "xyes"; then
AC_DEFINE(HAVE_ASPELL_VERSION_STRING)
fi
fi
fi
else
not_asked="$not_asked spell"
fi
if test "x$enable_spell" = "xyes" ; then
AC_SUBST(ASPELL_CFLAGS)
AC_SUBST(ASPELL_LFLAGS)
AC_DEFINE(PLUGIN_SPELL)
fi
# --------------------------------- trigger ------------------------------------ # --------------------------------- trigger ------------------------------------
if test "x$enable_trigger" = "xyes" ; then if test "x$enable_trigger" = "xyes" ; then
@ -1390,7 +1390,6 @@ AM_CONDITIONAL(HAVE_EAT_NEWLINE_GLITCH, test "$enable_eatnewlineglitch" = "yes")
AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes") AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
AM_CONDITIONAL(HEADLESS, test "$enable_headless" = "yes") AM_CONDITIONAL(HEADLESS, test "$enable_headless" = "yes")
AM_CONDITIONAL(PLUGIN_ALIAS, test "$enable_alias" = "yes") AM_CONDITIONAL(PLUGIN_ALIAS, test "$enable_alias" = "yes")
AM_CONDITIONAL(PLUGIN_ASPELL, test "$enable_aspell" = "yes")
AM_CONDITIONAL(PLUGIN_BUFLIST, test "$enable_buflist" = "yes") AM_CONDITIONAL(PLUGIN_BUFLIST, test "$enable_buflist" = "yes")
AM_CONDITIONAL(PLUGIN_CHARSET, test "$enable_charset" = "yes") AM_CONDITIONAL(PLUGIN_CHARSET, test "$enable_charset" = "yes")
AM_CONDITIONAL(PLUGIN_EXEC, test "$enable_exec" = "yes") AM_CONDITIONAL(PLUGIN_EXEC, test "$enable_exec" = "yes")
@ -1408,6 +1407,7 @@ AM_CONDITIONAL(PLUGIN_TCL, test "$enable_tcl" = "yes")
AM_CONDITIONAL(PLUGIN_GUILE, test "$enable_guile" = "yes") AM_CONDITIONAL(PLUGIN_GUILE, test "$enable_guile" = "yes")
AM_CONDITIONAL(PLUGIN_JAVASCRIPT, test "$enable_javascript" = "yes") AM_CONDITIONAL(PLUGIN_JAVASCRIPT, test "$enable_javascript" = "yes")
AM_CONDITIONAL(PLUGIN_PHP, test "$enable_php" = "yes") AM_CONDITIONAL(PLUGIN_PHP, test "$enable_php" = "yes")
AM_CONDITIONAL(PLUGIN_SPELL, test "$enable_spell" = "yes")
AM_CONDITIONAL(PLUGIN_TRIGGER, test "$enable_trigger" = "yes") AM_CONDITIONAL(PLUGIN_TRIGGER, test "$enable_trigger" = "yes")
AM_CONDITIONAL(PLUGIN_XFER, test "$enable_xfer" = "yes") AM_CONDITIONAL(PLUGIN_XFER, test "$enable_xfer" = "yes")
AM_CONDITIONAL(TESTS, test "$enable_tests" = "yes") AM_CONDITIONAL(TESTS, test "$enable_tests" = "yes")
@ -1429,7 +1429,6 @@ AC_OUTPUT([Makefile
src/core/Makefile src/core/Makefile
src/plugins/Makefile src/plugins/Makefile
src/plugins/alias/Makefile src/plugins/alias/Makefile
src/plugins/aspell/Makefile
src/plugins/buflist/Makefile src/plugins/buflist/Makefile
src/plugins/charset/Makefile src/plugins/charset/Makefile
src/plugins/exec/Makefile src/plugins/exec/Makefile
@ -1447,6 +1446,7 @@ AC_OUTPUT([Makefile
src/plugins/guile/Makefile src/plugins/guile/Makefile
src/plugins/javascript/Makefile src/plugins/javascript/Makefile
src/plugins/php/Makefile src/plugins/php/Makefile
src/plugins/spell/Makefile
src/plugins/trigger/Makefile src/plugins/trigger/Makefile
src/plugins/xfer/Makefile src/plugins/xfer/Makefile
src/gui/Makefile src/gui/Makefile
@ -1479,9 +1479,6 @@ listplugins=""
if test "x$enable_alias" = "xyes"; then if test "x$enable_alias" = "xyes"; then
listplugins="$listplugins alias" listplugins="$listplugins alias"
fi fi
if test "x$enable_aspell" = "xyes"; then
listplugins="$listplugins aspell($ASPELL_LIB_USED)"
fi
if test "x$enable_buflist" = "xyes"; then if test "x$enable_buflist" = "xyes"; then
listplugins="$listplugins buflist" listplugins="$listplugins buflist"
fi fi
@ -1533,6 +1530,9 @@ fi
if test "x$enable_php" = "xyes"; then if test "x$enable_php" = "xyes"; then
listplugins="$listplugins php($PHP_VERSION)" listplugins="$listplugins php($PHP_VERSION)"
fi fi
if test "x$enable_spell" = "xyes"; then
listplugins="$listplugins spell($SPELL_LIB_USED)"
fi
if test "x$enable_trigger" = "xyes"; then if test "x$enable_trigger" = "xyes"; then
listplugins="$listplugins trigger" listplugins="$listplugins trigger"
fi fi

View File

@ -35,11 +35,11 @@ Files: src/core/wee-completion.c
src/core/wee-log.c src/core/wee-log.c
src/core/wee-utf8.c src/core/wee-utf8.c
src/core/weechat.h src/core/weechat.h
src/plugins/aspell/weechat-aspell-config.c src/plugins/spell/spell-config.c
src/plugins/aspell/weechat-aspell-config.h src/plugins/spell/spell-config.h
src/plugins/aspell/weechat-aspell-speller.c src/plugins/spell/spell-speller.c
src/plugins/aspell/weechat-aspell-speller.h src/plugins/spell/spell-speller.h
src/plugins/aspell/weechat-aspell.h src/plugins/spell/spell.h
src/plugins/irc/irc-command.c src/plugins/irc/irc-command.c
src/plugins/irc/irc.h src/plugins/irc/irc.h
Copyright: 2006, Emmanuel Bouthenot <kolter@openics.org> Copyright: 2006, Emmanuel Bouthenot <kolter@openics.org>
@ -51,12 +51,12 @@ Copyright: 2005-2010, Emmanuel Bouthenot <kolter@openics.org>
2012, Simon Arlott 2012, Simon Arlott
License: GPL-3+ License: GPL-3+
Files: src/plugins/aspell/weechat-aspell-bar-item.c Files: src/plugins/spell/spell-bar-item.c
src/plugins/aspell/weechat-aspell-bar-item.h src/plugins/spell/spell-bar-item.h
Copyright: 2012, Nils Görs <weechatter@arcor.de> Copyright: 2012, Nils Görs <weechatter@arcor.de>
License: GPL-3+ License: GPL-3+
Files: src/plugins/aspell/weechat-aspell.c Files: src/plugins/spell/spell.c
Copyright: 2006, Emmanuel Bouthenot <kolter@openics.org> Copyright: 2006, Emmanuel Bouthenot <kolter@openics.org>
2012, Nils Görs <weechatter@arcor.de> 2012, Nils Görs <weechatter@arcor.de>
License: GPL-3+ License: GPL-3+

View File

@ -1,6 +1,6 @@
usr/lib/*/weechat/plugins/aspell.so
usr/lib/*/weechat/plugins/exec.so usr/lib/*/weechat/plugins/exec.so
usr/lib/*/weechat/plugins/fifo.so usr/lib/*/weechat/plugins/fifo.so
usr/lib/*/weechat/plugins/relay.so usr/lib/*/weechat/plugins/relay.so
usr/lib/*/weechat/plugins/script.so usr/lib/*/weechat/plugins/script.so
usr/lib/*/weechat/plugins/spell.so
usr/lib/*/weechat/plugins/trigger.so usr/lib/*/weechat/plugins/trigger.so

View File

@ -10,9 +10,6 @@ $HOME/.weechat/sec.conf::
$HOME/.weechat/alias.conf:: $HOME/.weechat/alias.conf::
configurační soubor pro _alias_ plugin configurační soubor pro _alias_ plugin
$HOME/.weechat/aspell.conf::
konfigurační soubor pro _aspell_ plugin
$HOME/.weechat/buflist.conf:: $HOME/.weechat/buflist.conf::
konfigurační soubor pro _buflist_ plugin konfigurační soubor pro _buflist_ plugin
@ -61,6 +58,9 @@ $HOME/.weechat/ruby.conf::
$HOME/.weechat/script.conf:: $HOME/.weechat/script.conf::
konfigurační soubor pro _script_ plugin konfigurační soubor pro _script_ plugin
$HOME/.weechat/spell.conf::
konfigurační soubor pro _spell_ plugin
$HOME/.weechat/tcl.conf:: $HOME/.weechat/tcl.conf::
konfigurační soubor pro _tcl_ plugin konfigurační soubor pro _tcl_ plugin

View File

@ -10,10 +10,6 @@
| alias | alias_value | Wert von Alias | alias | alias_value | Wert von Alias
| aspell | aspell_dicts | Auflistung der installierten Wörterbücher
| aspell | aspell_langs | Liste aller Sprachen die durch Aspell unterstützt werden
| exec | exec_commands_ids | IDs (Nummern und Namen) von ausgeführten Befehlen | exec | exec_commands_ids | IDs (Nummern und Namen) von ausgeführten Befehlen
| fset | fset_options | Konfigurationsdateien, Sektionen, Optionen und Worte von Optionen | fset | fset_options | Konfigurationsdateien, Sektionen, Optionen und Worte von Optionen
@ -86,6 +82,10 @@
| script | script_tags | Schlagwortliste für Skripten im Repositorium | script | script_tags | Schlagwortliste für Skripten im Repositorium
| spell | spell_dicts | list of installed dictionaries
| spell | spell_langs | list of all languages supported
| tcl | tcl_script | Liste der Skripten | tcl | tcl_script | Liste der Skripten
| trigger | trigger_hook_arguments | Standardargumente für einen Hook | trigger | trigger_hook_arguments | Standardargumente für einen Hook

View File

@ -6,8 +6,6 @@
|=== |===
| Erweiterung | Name | Beschreibung | Argumente | Erweiterung | Name | Beschreibung | Argumente
| aspell | aspell_dict | durch Kommata getrennte Liste von Wörterbüchern, die in diesem Buffer genutzt werden sollen | Buffer-Pointer ("0x12345678") oder der vollständige Buffername ("irc.freenode.#weechat")
| fifo | fifo_filename | Name der FIFO-Pipe | - | fifo | fifo_filename | Name der FIFO-Pipe | -
| guile | guile_eval | Evaluierung des Quelltextes | Quelltext welcher ausgeführt werden soll | guile | guile_eval | Evaluierung des Quelltextes | Quelltext welcher ausgeführt werden soll
@ -74,6 +72,8 @@
| ruby | ruby_version | Version des verwendeten Interpreters | - | ruby | ruby_version | Version des verwendeten Interpreters | -
| spell | spell_dict | durch Kommata getrennte Liste von Wörterbüchern, die in diesem Buffer genutzt werden sollen | Buffer-Pointer ("0x12345678") oder der vollständige Buffername ("irc.freenode.#weechat")
| tcl | tcl_eval | Evaluierung des Quelltextes | Quelltext welcher ausgeführt werden soll | tcl | tcl_eval | Evaluierung des Quelltextes | Quelltext welcher ausgeführt werden soll
| tcl | tcl_interpreter | Name des verwendeten Interpreters | - | tcl | tcl_interpreter | Name des verwendeten Interpreters | -

View File

@ -6,7 +6,7 @@
. logger (14000) . logger (14000)
. exec (13000) . exec (13000)
. trigger (12000) . trigger (12000)
. aspell (11000) . spell (11000)
. alias (10000) . alias (10000)
. buflist (9000) . buflist (9000)
. fifo (8000) . fifo (8000)

View File

@ -1,32 +0,0 @@
//
// This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND!
//
[[command_aspell_aspell]]
* `+aspell+`: Konfiguration für Aspell-Erweiterung
----
/aspell enable|disable|toggle
listdict
setdict <dict>[,<dict>...]
deldict
addword [<dict>] <word>
enable: Aspell wird aktiviert
disable: Aspell wird deaktiviert
toggle: Aspell Funktionalität umschalten
listdict: die, auf dem System, installierten Wörterbücher werden aufgelistet
setdict: Wörterbuch für den aktuellen Buffer einstellen (mehrere Wörterbücher müssen durch Kommata getrennt werden)
deldict: Wörterbuch für den aktuellen Buffer entfernen
addword: fügt ein Wort in das persönliche Wörterbuch von Aspell hinzu
Eingaben die mit '/' beginnen werden nicht überprüft, davon ausgenommen sind einige Befehle (siehe /set aspell.check.commands).
Um sich eine Liste von Vorschlägen in einer Bar anzeigen zu lassen nutzt man das Item "aspell_suggest".
Um Aspell auf alle Buffer anzuwenden sollte die Einstellung "default_dict" genutzt und Aspell aktiviert werden:
/set aspell.check.default_dict "de_DE-neu"
/aspell enable
Die Standardtastaturbelegung zum Umschalten der Aspell Funktionalität lautet alt-s.
----

View File

@ -0,0 +1,32 @@
//
// This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND!
//
[[command_spell_spell]]
* `+spell+`: spell plugin configuration
----
/spell enable|disable|toggle
listdict
setdict <dict>[,<dict>...]
deldict
addword [<dict>] <word>
enable: enable spell checker
disable: disable spell checker
toggle: toggle spell checker
listdict: show installed dictionaries
setdict: set dictionary for current buffer (multiple dictionaries can be separated by a comma)
deldict: delete dictionary used on current buffer
addword: add a word in personal dictionary
Input line beginning with a '/' is not checked, except for some commands (see /set spell.check.commands).
To enable spell checker on all buffers, use option "default_dict", then enable spell checker, for example:
/set spell.check.default_dict "en"
/spell enable
To display a list of suggestions in a bar, use item "spell_suggest".
Default key to toggle spell checker is alt-s.
----

View File

@ -2,80 +2,80 @@
// This file is auto-generated by script docgen.py. // This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND! // DO NOT EDIT BY HAND!
// //
* [[option_aspell.check.commands]] *aspell.check.commands* * [[option_spell.check.commands]] *spell.check.commands*
** Beschreibung: pass:none[durch Kommata getrennte Liste der Befehle, für die eine Rechtschreibprüfung gelten soll (Rechtschreibprüfung ist für andere Befehle deaktiviert)] ** Beschreibung: pass:none[durch Kommata getrennte Liste der Befehle, für die eine Rechtschreibprüfung gelten soll (Rechtschreibprüfung ist für andere Befehle deaktiviert)]
** Typ: Zeichenkette ** Typ: Zeichenkette
** Werte: beliebige Zeichenkette ** Werte: beliebige Zeichenkette
** Standardwert: `+"ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic"+` ** Standardwert: `+"ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic"+`
* [[option_aspell.check.default_dict]] *aspell.check.default_dict* * [[option_spell.check.default_dict]] *spell.check.default_dict*
** Beschreibung: pass:none[Voreingestelltes Wörterbuch (oder durch Kommata getrennte Liste der Wörterbücher) welche(s) genutzt werden soll, sofern kein Wörterbuch für einen Buffer definiert wurde. Wird kein Wörterbuch angegeben dann ist Aspell in allen Buffer deaktiviert, außer es wird für einen Buffer explizit ein Wörterbuch angegeben] ** Beschreibung: pass:none[default dictionary (or comma separated list of dictionaries) to use when buffer has no dictionary defined (leave blank to disable spell checker on buffers for which you didn't explicitly enabled it)]
** Typ: Zeichenkette ** Typ: Zeichenkette
** Werte: beliebige Zeichenkette ** Werte: beliebige Zeichenkette
** Standardwert: `+""+` ** Standardwert: `+""+`
* [[option_aspell.check.during_search]] *aspell.check.during_search* * [[option_spell.check.during_search]] *spell.check.during_search*
** Beschreibung: pass:none[Überprüfe Wörter während im Buffer nach einem Text gesucht wird] ** Beschreibung: pass:none[Überprüfe Wörter während im Buffer nach einem Text gesucht wird]
** Typ: boolesch ** Typ: boolesch
** Werte: on, off ** Werte: on, off
** Standardwert: `+off+` ** Standardwert: `+off+`
* [[option_aspell.check.enabled]] *aspell.check.enabled* * [[option_spell.check.enabled]] *spell.check.enabled*
** Beschreibung: pass:none[Aspell wird für die Eingabezeile aktiviert] ** Beschreibung: pass:none[enable spell checker for command line]
** Typ: boolesch ** Typ: boolesch
** Werte: on, off ** Werte: on, off
** Standardwert: `+off+` ** Standardwert: `+off+`
* [[option_aspell.check.real_time]] *aspell.check.real_time* * [[option_spell.check.real_time]] *spell.check.real_time*
** Beschreibung: pass:none[Eine Korrektur findet während der Texteingabe statt (da dies langsamer ist, ist diese Funktion standardmäßig deaktiviert. Wörter werden erst überprüft sobald ein Leerzeichen dem vorangegangenen Wort folgt)] ** Beschreibung: pass:none[Eine Korrektur findet während der Texteingabe statt (da dies langsamer ist, ist diese Funktion standardmäßig deaktiviert. Wörter werden erst überprüft sobald ein Leerzeichen dem vorangegangenen Wort folgt)]
** Typ: boolesch ** Typ: boolesch
** Werte: on, off ** Werte: on, off
** Standardwert: `+off+` ** Standardwert: `+off+`
* [[option_aspell.check.suggestions]] *aspell.check.suggestions* * [[option_spell.check.suggestions]] *spell.check.suggestions*
** Beschreibung: pass:none[legt die Anzahl an Vorschlägen, für ein falsch geschriebenes Wort, fest. Die Vorschläge werden mittels der Bar-Item "aspell_suggest", für die jeweilige(n) Sprache(n), die für den Buffer augewählt wurden, angezeigt (-1 = deaktiviert die Funktion, 0 = zeigt alle verfügbaren Vorschläge, für alle ausgewählten Sprachen, an)] ** Beschreibung: pass:none[number of suggestions to display in bar item "spell_suggest" for each dictionary set in buffer (-1 = disable suggestions, 0 = display all possible suggestions in all languages)]
** Typ: integer ** Typ: integer
** Werte: -1 .. 2147483647 ** Werte: -1 .. 2147483647
** Standardwert: `+-1+` ** Standardwert: `+-1+`
* [[option_aspell.check.word_min_length]] *aspell.check.word_min_length* * [[option_spell.check.word_min_length]] *spell.check.word_min_length*
** Beschreibung: pass:none[Mindestlänge für ein Wort, welches auf Rechtschreibung überprüft werden soll (bei 0 werden alle Wörter überprüft)] ** Beschreibung: pass:none[Mindestlänge für ein Wort, welches auf Rechtschreibung überprüft werden soll (bei 0 werden alle Wörter überprüft)]
** Typ: integer ** Typ: integer
** Werte: 0 .. 2147483647 ** Werte: 0 .. 2147483647
** Standardwert: `+2+` ** Standardwert: `+2+`
* [[option_aspell.color.misspelled]] *aspell.color.misspelled* * [[option_spell.color.misspelled]] *spell.color.misspelled*
** Beschreibung: pass:none[Farbe in der ein Wort mit einem Rechtschreibfehler hervorgehoben werden soll (Eingabezeile)] ** Beschreibung: pass:none[Farbe in der ein Wort mit einem Rechtschreibfehler hervorgehoben werden soll (Eingabezeile)]
** Typ: Farbe ** Typ: Farbe
** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "/" für kursiv, "_" für unterstrichen ** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "/" für kursiv, "_" für unterstrichen
** Standardwert: `+lightred+` ** Standardwert: `+lightred+`
* [[option_aspell.color.suggestion]] *aspell.color.suggestion* * [[option_spell.color.suggestion]] *spell.color.suggestion*
** Beschreibung: pass:none[Textfarbe für die Vorschläge der Rechtsschreibkorrektur in der Bar-Item "aspell_suggest"] ** Beschreibung: pass:none[text color for suggestion on a misspelled word in bar item "spell_suggest"]
** Typ: Farbe ** Typ: Farbe
** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "/" für kursiv, "_" für unterstrichen ** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "/" für kursiv, "_" für unterstrichen
** Standardwert: `+default+` ** Standardwert: `+default+`
* [[option_aspell.color.suggestion_delimiter_dict]] *aspell.color.suggestion_delimiter_dict* * [[option_spell.color.suggestion_delimiter_dict]] *spell.color.suggestion_delimiter_dict*
** Beschreibung: pass:none[Textfarbe für das Trennzeichen, im Bar-Item "aspell_suggest", welches zwischen zwei Wörterbücher dargestellt wird] ** Beschreibung: pass:none[text color for delimiters displayed between two dictionaries in bar item "spell_suggest"]
** Typ: Farbe ** Typ: Farbe
** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "/" für kursiv, "_" für unterstrichen ** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "/" für kursiv, "_" für unterstrichen
** Standardwert: `+cyan+` ** Standardwert: `+cyan+`
* [[option_aspell.color.suggestion_delimiter_word]] *aspell.color.suggestion_delimiter_word* * [[option_spell.color.suggestion_delimiter_word]] *spell.color.suggestion_delimiter_word*
** Beschreibung: pass:none[Textfarbe für das Trennzeichen zwischen zwei Wörtern in der Bar-Item "aspell_suggest"] ** Beschreibung: pass:none[text color for delimiters displayed between two words in bar item "spell_suggest"]
** Typ: Farbe ** Typ: Farbe
** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "/" für kursiv, "_" für unterstrichen ** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "/" für kursiv, "_" für unterstrichen
** Standardwert: `+cyan+` ** Standardwert: `+cyan+`
* [[option_aspell.look.suggestion_delimiter_dict]] *aspell.look.suggestion_delimiter_dict* * [[option_spell.look.suggestion_delimiter_dict]] *spell.look.suggestion_delimiter_dict*
** Beschreibung: pass:none[Trennzeichen, im Bar-Item "aspell_suggest", welches zwischen zwei Wörterbücher dargestellt wird] ** Beschreibung: pass:none[delimiter displayed between two dictionaries in bar item "spell_suggest"]
** Typ: Zeichenkette ** Typ: Zeichenkette
** Werte: beliebige Zeichenkette ** Werte: beliebige Zeichenkette
** Standardwert: `+" / "+` ** Standardwert: `+" / "+`
* [[option_aspell.look.suggestion_delimiter_word]] *aspell.look.suggestion_delimiter_word* * [[option_spell.look.suggestion_delimiter_word]] *spell.look.suggestion_delimiter_word*
** Beschreibung: pass:none[Trennzeichen, im Bar-Item "aspell_suggest", welches zwischen zwei Wörtern dargestellt wird] ** Beschreibung: pass:none[delimiter displayed between two words in bar item "spell_suggest"]
** Typ: Zeichenkette ** Typ: Zeichenkette
** Werte: beliebige Zeichenkette ** Werte: beliebige Zeichenkette
** Standardwert: `+","+` ** Standardwert: `+","+`

View File

@ -10,9 +10,6 @@ $HOME/.weechat/sec.conf::
$HOME/.weechat/alias.conf:: $HOME/.weechat/alias.conf::
Konfigurationsdatei für _alias_ Erweiterung Konfigurationsdatei für _alias_ Erweiterung
$HOME/.weechat/aspell.conf::
Konfigurationsdatei für _aspell_ Erweiterung
$HOME/.weechat/buflist.conf:: $HOME/.weechat/buflist.conf::
Konfigurationsdatei für _buflist_ Erweiterung Konfigurationsdatei für _buflist_ Erweiterung
@ -61,6 +58,9 @@ $HOME/.weechat/ruby.conf::
$HOME/.weechat/script.conf:: $HOME/.weechat/script.conf::
Konfigurationsdatei für _script_ Erweiterung Konfigurationsdatei für _script_ Erweiterung
$HOME/.weechat/spell.conf::
Konfigurationsdatei für _spell_ Erweiterung
$HOME/.weechat/tcl.conf:: $HOME/.weechat/tcl.conf::
Konfigurationsdatei für _tcl_ Erweiterung Konfigurationsdatei für _tcl_ Erweiterung

View File

@ -1005,15 +1005,20 @@ $ cd ~/.weechat/script
$ curl -O https://weechat.org/files/plugins.xml.gz $ curl -O https://weechat.org/files/plugins.xml.gz
---- ----
[[aspell_dictionaries]] [[spell_dictionaries]]
=== Ich habe aspell Wörterbücher auf mein System installiert. Wie kann ich diese nutzen, ohne WeeChat neu starten zu müssen? === Ich habe aspell Wörterbücher auf mein System installiert. Wie kann ich diese nutzen, ohne WeeChat neu starten zu müssen?
Du braucht lediglich die aspell Erweiterung neu zu laden: Du braucht lediglich die spell Erweiterung neu zu laden:
---- ----
/plugin reload aspell /plugin reload spell
---- ----
// TRANSLATION MISSING
[NOTE]
With WeeChat ≤ 2.3, the "spell" plugin was named "aspell", so the command is:
`/plugin reload aspell`.
[[settings]] [[settings]]
== Einstellungen == Einstellungen
@ -1045,9 +1050,9 @@ Damit WeeChat weniger Speicher benötigt, solltest Du folgende Tipps umsetzen:
* nutze die aktuelle Version (man kann davon ausgehen das eine aktuelle Version * nutze die aktuelle Version (man kann davon ausgehen das eine aktuelle Version
weniger Speicherlecks besitzt, als eine vorherige Version) weniger Speicherlecks besitzt, als eine vorherige Version)
* lade keine Erweiterungen die Du nicht benötigst. Zum Beispiel: ASpell, Buflist, * lade keine Erweiterungen die Du nicht benötigst. Zum Beispiel: Buflist,
Fifo, Logger, Perl, Python, Ruby, Lua, Tcl, Guile, JavaScript, PHP, Xfer (wird für Fifo, Logger, Perl, Python, Ruby, Lua, Tcl, Guile, JavaScript, PHP, Spell, Xfer
DCC benötigst), siehe `/help weechat.plugin.autoload`. (wird für DCC benötigst), siehe `/help weechat.plugin.autoload`.
* installiere ausschließlich Skripten die Du auch nutzt * installiere ausschließlich Skripten die Du auch nutzt
* falls man SSL *NICHT* nutzt, sollte kein Zertifikat geladen werden. In diesem * falls man SSL *NICHT* nutzt, sollte kein Zertifikat geladen werden. In diesem
Fall, einfach den Eintrag in folgender Option leer lassen: Fall, einfach den Eintrag in folgender Option leer lassen:
@ -1067,7 +1072,7 @@ und zusätzlich diese Tipps beherzigen:
* die Sekundenanzeigen in der Statusbar sollte deaktiviert werden: * die Sekundenanzeigen in der Statusbar sollte deaktiviert werden:
`/set weechat.look.item_time_format "%H:%M"` (dies ist die Standardeinstellung) `/set weechat.look.item_time_format "%H:%M"` (dies ist die Standardeinstellung)
* die Echtzeit Rechtschreibkorrektur sollte deaktiviert werden (falls sie aktiviert wurde): * die Echtzeit Rechtschreibkorrektur sollte deaktiviert werden (falls sie aktiviert wurde):
`/set aspell.check.real_time off` `/set spell.check.real_time off`
* die Umgebungsvariable _TZ_ sollte gesetzt sein (zum Beispiel: `export TZ="Europe/Berlin"`). Dadurch wird * die Umgebungsvariable _TZ_ sollte gesetzt sein (zum Beispiel: `export TZ="Europe/Berlin"`). Dadurch wird
verhindert, dass auf die Datei _/etc/localtime_ häufig zugegriffen wird. verhindert, dass auf die Datei _/etc/localtime_ häufig zugegriffen wird.

View File

@ -114,7 +114,7 @@ zu kompilieren und welche Pakete optional genutzt werden können.
| gettext | | | Internationalisierung (Übersetzung der Mitteilungen; Hauptsprache ist englisch). | gettext | | | Internationalisierung (Übersetzung der Mitteilungen; Hauptsprache ist englisch).
| ca-certificates | | | Zertifikate für SSL Verbindungen. | ca-certificates | | | Zertifikate für SSL Verbindungen.
| libaspell-dev | libaspell-dev
∥ libenchant-dev | | | Aspell Erweiterung. ∥ libenchant-dev | | | Spell Erweiterung.
| python-dev | ≥ 2.6 ^(4)^ | | Python Erweiterung. | python-dev | ≥ 2.6 ^(4)^ | | Python Erweiterung.
| libperl-dev | | | Perl Erweiterung. | libperl-dev | | | Perl Erweiterung.
| ruby2.5, ruby2.5-dev | ≥ 1.8 | | Ruby Erweiterung. | ruby2.5, ruby2.5-dev | ≥ 1.8 | | Ruby Erweiterung.
@ -200,9 +200,6 @@ Liste von häufig verwendeten Optionen:
| ENABLE_ALIAS | `ON`, `OFF` | ON | | ENABLE_ALIAS | `ON`, `OFF` | ON |
kompiliert <<alias_plugin,Alias Erweiterung>>. kompiliert <<alias_plugin,Alias Erweiterung>>.
| ENABLE_ASPELL | `ON`, `OFF` | ON |
kompiliert <<aspell_plugin,Aspell Erweiterung>>.
| ENABLE_BUFLIST | `ON`, `OFF` | ON | | ENABLE_BUFLIST | `ON`, `OFF` | ON |
kompiliert <<buflist_plugin,Buflist Erweiterung>>. kompiliert <<buflist_plugin,Buflist Erweiterung>>.
@ -218,7 +215,7 @@ Liste von häufig verwendeten Optionen:
Dokumentation nicht auf der Homepage abrufen kann). Dokumentation nicht auf der Homepage abrufen kann).
| ENABLE_ENCHANT | `ON`, `OFF` | OFF | | ENABLE_ENCHANT | `ON`, `OFF` | OFF |
kompiliert <<aspell_plugin,Aspell plugin>> mittels Enchant. kompiliert <<spell_plugin,Spell plugin>> mittels Enchant.
| ENABLE_EXEC | `ON`, `OFF` | ON | | ENABLE_EXEC | `ON`, `OFF` | ON |
kompiliert <<exec_plugin,Exec Erweiterung>>. kompiliert <<exec_plugin,Exec Erweiterung>>.
@ -282,6 +279,9 @@ Liste von häufig verwendeten Optionen:
kompiliert <<scripts_plugins,Skripten-Erweiterungen>> (Python, Perl, Ruby, kompiliert <<scripts_plugins,Skripten-Erweiterungen>> (Python, Perl, Ruby,
Lua, Tcl, Guile, JavaScript, PHP). Lua, Tcl, Guile, JavaScript, PHP).
| ENABLE_SPELL | `ON`, `OFF` | ON |
kompiliert <<spell_plugin,Spell Erweiterung>>.
| ENABLE_TCL | `ON`, `OFF` | ON | | ENABLE_TCL | `ON`, `OFF` | ON |
kompiliert <<scripts_plugins,Tcl Erweiterung>>. kompiliert <<scripts_plugins,Tcl Erweiterung>>.
@ -572,7 +572,6 @@ Folgende Dateien befinden sich im WeeChat-Heimatverzeichnis:
| sec.conf | Konfigurationsdatei mit sensiblen Daten | *Ja, hoch sensibel*: diese Datei sollte niemals weitergegeben werden. | sec.conf | Konfigurationsdatei mit sensiblen Daten | *Ja, hoch sensibel*: diese Datei sollte niemals weitergegeben werden.
| plugins.conf | Konfigurationsdatei für Erweiterungen | möglich, hängt von der Erweiterung/Skript ab. | plugins.conf | Konfigurationsdatei für Erweiterungen | möglich, hängt von der Erweiterung/Skript ab.
| alias.conf | Konfigurationsdatei: Alias-Erweiterung | möglich, hängt von den Aliases ab. | alias.conf | Konfigurationsdatei: Alias-Erweiterung | möglich, hängt von den Aliases ab.
| aspell.conf | Konfiguration für _aspell_-Erweiterung | Nein.
| buflist.conf | Konfiguration für _buflist_-Erweiterung | Nein. | buflist.conf | Konfiguration für _buflist_-Erweiterung | Nein.
| charset.conf | Konfiguration für _charset_-Erweiterung | Nein. | charset.conf | Konfiguration für _charset_-Erweiterung | Nein.
| exec.conf | Konfiguration für _exec_-Erweiterung | Nein. | exec.conf | Konfiguration für _exec_-Erweiterung | Nein.
@ -589,6 +588,7 @@ Folgende Dateien befinden sich im WeeChat-Heimatverzeichnis:
| relay.conf | Konfiguration für _relay_-Erweiterung | Nein. | relay.conf | Konfiguration für _relay_-Erweiterung | Nein.
| ruby.conf | Konfiguration für _ruby_-Erweiterung | Nein. | ruby.conf | Konfiguration für _ruby_-Erweiterung | Nein.
| script.conf | Konfiguration für _script_-Erweiterung | Nein. | script.conf | Konfiguration für _script_-Erweiterung | Nein.
| spell.conf | Konfiguration für _spell_-Erweiterung | Nein.
| tcl.conf | Konfiguration für _tcl_-Erweiterung | Nein. | tcl.conf | Konfiguration für _tcl_-Erweiterung | Nein.
| trigger.conf | Konfiguration für _trigger_-Erweiterung | möglich, hängt von den Triggern ab. | trigger.conf | Konfiguration für _trigger_-Erweiterung | möglich, hängt von den Triggern ab.
| xfer.conf | Konfiguration für _xfer_-Erweiterung | Nein. | xfer.conf | Konfiguration für _xfer_-Erweiterung | Nein.
@ -710,8 +710,8 @@ andere Items die man nutzen kann (die aber nicht standardmäßig in einer Bar ak
[width="100%",cols="^3,^4,10",options="header"] [width="100%",cols="^3,^4,10",options="header"]
|=== |===
| Item | Beispiel | Beschreibung | Item | Beispiel | Beschreibung
| aspell_dict | `de,en` | zeigt an welche Wörterbücher für die Rechtschreibung im aktuellen Buffer genutzt werden. | spell_dict | `de,en` | zeigt an welche Wörterbücher für die Rechtschreibung im aktuellen Buffer genutzt werden.
| aspell_suggest | `Glück,Glocke,Block`| Vorschläge für ein falsch geschriebenes Wort. | spell_suggest | `Glück,Glocke,Block`| Vorschläge für ein falsch geschriebenes Wort.
| buffer_count | `10` | absolute Anzahl an geöffneten Buffern. | buffer_count | `10` | absolute Anzahl an geöffneten Buffern.
| buffer_short_name | `#test` | Kurzname des aktuellen Buffers. | buffer_short_name | `#test` | Kurzname des aktuellen Buffers.
| irc_channel | `#test` | aktueller IRC Channelname. | irc_channel | `#test` | aktueller IRC Channelname.
@ -1652,7 +1652,8 @@ und um eine Hilfe zu erhalten wie man es nutzt: `/help buffer_autoset`.
| kbd:[Alt+d] | löscht das Wort rechts vom Cursor (die Zeichenkette wird dabei in die interne Zwischenablage kopiert). | `/input delete_next_word` | kbd:[Alt+d] | löscht das Wort rechts vom Cursor (die Zeichenkette wird dabei in die interne Zwischenablage kopiert). | `/input delete_next_word`
| kbd:[Alt+k] | zeigt den Tastencode, einschließlich des eingebundenen Befehls, einer Tastenkombination an und fügt diesen in die Befehlszeile ein. | `/input grab_key_command` | kbd:[Alt+k] | zeigt den Tastencode, einschließlich des eingebundenen Befehls, einer Tastenkombination an und fügt diesen in die Befehlszeile ein. | `/input grab_key_command`
| kbd:[Alt+r] | komplette Eingabezeile lösche.n| `/input delete_line` | kbd:[Alt+r] | komplette Eingabezeile lösche.n| `/input delete_line`
| kbd:[Alt+s] | schaltet die Aspell Funktion an/aus. | `/mute aspell toggle` // TRANSLATION MISSING
| kbd:[Alt+s] | Toggle spell checker. | `/mute spell toggle`
|=== |===
[[key_bindings_buffers_windows]] [[key_bindings_buffers_windows]]
@ -2135,7 +2136,6 @@ Standarderweiterungen:
|=== |===
| Erweiterung | Beschreibung | Erweiterung | Beschreibung
| alias | definiert Alias für Befehle. | alias | definiert Alias für Befehle.
| aspell | Rechtschreibprüfung für Befehlszeile.
| buflist | Bar-Item mit der Liste aller Buffern. | buflist | Bar-Item mit der Liste aller Buffern.
| charset | Zeichensatz (de)-kodierung in Buffern. | charset | Zeichensatz (de)-kodierung in Buffern.
| exec | ausführen von externen Befehlen aus WeeChat heraus. | exec | ausführen von externen Befehlen aus WeeChat heraus.
@ -2153,6 +2153,7 @@ Standarderweiterungen:
| guile | Guile(scheme)-Skript API. | guile | Guile(scheme)-Skript API.
| javascript | JavaScript-Skript API. | javascript | JavaScript-Skript API.
| php | PHP-Skript API. | php | PHP-Skript API.
| spell | Rechtschreibprüfung für Befehlszeile.
| trigger | Veränderung von Text und Ausführen von Befehlen bei einem Ereignis, welche durch WeeChat oder eine Erweiterung ausgelöst werden. | trigger | Veränderung von Text und Ausführen von Befehlen bei einem Ereignis, welche durch WeeChat oder eine Erweiterung ausgelöst werden.
| xfer | Datentransfer und Direktchat. | xfer | Datentransfer und Direktchat.
|=== |===
@ -2193,16 +2194,16 @@ Sektionen in Datei _alias.conf_:
/set alias.completion.* | Vervollständigung für Alias. /set alias.completion.* | Vervollständigung für Alias.
|=== |===
[[aspell_plugin]] [[spell_plugin]]
=== Aspell === Spell
Mit der ASpell Erweiterung findet eine Rechtschreibprüfung Einzug in WeeChat. Mit der Spell Erweiterung findet eine Rechtschreibprüfung Einzug in WeeChat.
Dabei ist es möglich mehrere Wörterbücher für einen Buffer zu nutzen. Dabei ist es möglich mehrere Wörterbücher für einen Buffer zu nutzen.
Die Rechtschreibprüfung ist standardmäßig deaktiviert und kann mittels dem Die Rechtschreibprüfung ist standardmäßig deaktiviert und kann mittels dem
Tastenbefehl [Alt+s] umgeschaltet werden. Tastenbefehl [Alt+s] umgeschaltet werden.
[[aspell_dictionaries]] [[spell_dictionaries]]
==== Wörterbücher ==== Wörterbücher
Um die Rechtschreibprüfung nutzen zu können muss vorab ein Wörterbuch definiert werden, Um die Rechtschreibprüfung nutzen zu können muss vorab ein Wörterbuch definiert werden,
@ -2214,26 +2215,26 @@ die Wörter mit allen Wörterbüchern ab,
Um zum Beispiel Englisch und Deutsch zu nutzen: Um zum Beispiel Englisch und Deutsch zu nutzen:
---- ----
/set aspell.check.default_dict "en,de" /set spell.check.default_dict "en,de"
---- ----
Es ist möglich ein anderes Wörterbuch für einen speziellen Buffer zu verwenden, zum Es ist möglich ein anderes Wörterbuch für einen speziellen Buffer zu verwenden, zum
Beispiel in einem französischen Channel: Beispiel in einem französischen Channel:
---- ----
/aspell setdict fr /spell setdict fr
---- ----
Um einer Gruppe von Buffern das selbe Wörterbuch zuzuordnen, zum Beispiel das Um einer Gruppe von Buffern das selbe Wörterbuch zuzuordnen, zum Beispiel das
deutsche Wörterbuch für alle Channels auf dem freenode IRC Server: deutsche Wörterbuch für alle Channels auf dem freenode IRC Server:
---- ----
/set aspell.dict.irc.freenode de /set spell.dict.irc.freenode de
---- ----
Für weitere Informationen, siehe den Befehl <<command_aspell_aspell,/aspell>>. Für weitere Informationen, siehe den Befehl <<command_spell_spell,/spell>>.
[[aspell_speller_options]] [[spell_speller_options]]
==== Optionen für Rechtschreibprüfung ==== Optionen für Rechtschreibprüfung
Optionen für die Rechtschreibprüfung können definiert werden indem man die entsprechende Optionen für die Rechtschreibprüfung können definiert werden indem man die entsprechende
@ -2249,18 +2250,18 @@ $ aspell config
Um zum Beispiel die Option "ignore-case" einzuschalten: Um zum Beispiel die Option "ignore-case" einzuschalten:
---- ----
/set aspell.option.ignore-case "true" /set spell.option.ignore-case "true"
---- ----
[[aspell_suggestions]] [[spell_suggestions]]
==== Rechtschreibkorrektur ==== Rechtschreibkorrektur
Eine Rechtschreibkorrektur wird in der Bar-Item "aspell_suggest" angezeigt. Eine Rechtschreibkorrektur wird in der Bar-Item "spell_suggest" angezeigt.
Die Anzahl an Vorschlägen, für die Rechtschreibkorrektur, kann mit der Option Die Anzahl an Vorschlägen, für die Rechtschreibkorrektur, kann mit der Option
_aspell.check.suggestions_ bestimmt werden. _spell.check.suggestions_ bestimmt werden.
Um die Rechtschreibkorrektur zu aktivieren, muss für die Option _aspell.check.suggestions_ Um die Rechtschreibkorrektur zu aktivieren, muss für die Option _spell.check.suggestions_
ein Wert ≥ 0 eingestellt werden und das Bar-Item "aspell_suggest" zu einer Bar, zum ein Wert ≥ 0 eingestellt werden und das Bar-Item "spell_suggest" zu einer Bar, zum
Beispiel _status_, hinzufügt werden. Beispiel _status_, hinzufügt werden.
Beispiel der Rechtschreibkorrektur, mit einem deutschen Wörterbuch (`de`): Beispiel der Rechtschreibkorrektur, mit einem deutschen Wörterbuch (`de`):
@ -2279,30 +2280,30 @@ Beispiel der Rechtschreibkorrektur, mit zwei Wörterbüchern (`en,de`):
└─────────────────────────────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────────────────────────────┘
.... ....
[[aspell_commands]] [[spell_commands]]
==== Befehle ==== Befehle
include::autogen/user/aspell_commands.adoc[] include::autogen/user/spell_commands.adoc[]
[[aspell_options]] [[spell_options]]
==== Optionen ==== Optionen
Sektionen in Datei _aspell.conf_: Sektionen in Datei _spell.conf_:
[width="100%",cols="3m,6m,16",options="header"] [width="100%",cols="3m,6m,16",options="header"]
|=== |===
| Sektion | Steuerbefehl | Beschreibung | Sektion | Steuerbefehl | Beschreibung
| color | /set aspell.color.* | Farben. | color | /set spell.color.* | Farben.
| check | /set aspell.check.* | Optionen um Einstellungen an der Rechtschreibprüfung vorzunehmen. | check | /set spell.check.* | Optionen um Einstellungen an der Rechtschreibprüfung vorzunehmen.
| dict | <<command_aspell_aspell,/aspell setdict>> + | dict | <<command_spell_spell,/spell setdict>> +
/set aspell.dict.* | Wörterbücher für Buffer (Optionen können in Sektion hinzugefügt/entfernt werden). /set spell.dict.* | Wörterbücher für Buffer (Optionen können in Sektion hinzugefügt/entfernt werden).
| look | /set aspell.look.* | Erscheinungsbild. | look | /set spell.look.* | Erscheinungsbild.
| option | /set aspell.option.* | <<aspell_speller_options,Optionen für Rechtschreibprüfung>> (Optionen können in Sektion hinzugefügt/entfernt werden). | option | /set spell.option.* | <<spell_speller_options,Optionen für Rechtschreibprüfung>> (Optionen können in Sektion hinzugefügt/entfernt werden).
|=== |===
Optionen: Optionen:
include::autogen/user/aspell_options.adoc[] include::autogen/user/spell_options.adoc[]
[[buflist_plugin]] [[buflist_plugin]]
=== Buflist === Buflist

View File

@ -90,7 +90,6 @@ PLUGIN_LIST = {
'sec': 'o', 'sec': 'o',
'weechat': 'co', 'weechat': 'co',
'alias': '', 'alias': '',
'aspell': 'o',
'buflist': 'co', 'buflist': 'co',
'charset': 'o', 'charset': 'o',
'exec': 'o', 'exec': 'o',
@ -108,14 +107,13 @@ PLUGIN_LIST = {
'guile': 'o', 'guile': 'o',
'javascript': 'o', 'javascript': 'o',
'php': 'o', 'php': 'o',
'spell': 'o',
'trigger': 'o', 'trigger': 'o',
'xfer': 'co', 'xfer': 'co',
} }
# options to ignore # options to ignore
IGNORE_OPTIONS = ( IGNORE_OPTIONS = (
r'aspell\.dict\..*',
r'aspell\.option\..*',
r'charset\.decode\..*', r'charset\.decode\..*',
r'charset\.encode\..*', r'charset\.encode\..*',
r'irc\.msgbuffer\..*', r'irc\.msgbuffer\..*',
@ -126,6 +124,8 @@ IGNORE_OPTIONS = (
r'logger\.level\..*', r'logger\.level\..*',
r'logger\.mask\..*', r'logger\.mask\..*',
r'relay\.port\..*', r'relay\.port\..*',
r'spell\.dict\..*',
r'spell\.option\..*',
r'trigger\.trigger\..*', r'trigger\.trigger\..*',
r'weechat\.palette\..*', r'weechat\.palette\..*',
r'weechat\.proxy\..*', r'weechat\.proxy\..*',

View File

@ -10,10 +10,6 @@
| alias | alias_value | value of alias | alias | alias_value | value of alias
| aspell | aspell_dicts | list of aspell installed dictionaries
| aspell | aspell_langs | list of all languages supported by aspell
| exec | exec_commands_ids | ids (numbers and names) of executed commands | exec | exec_commands_ids | ids (numbers and names) of executed commands
| fset | fset_options | configuration files, sections, options and words of options | fset | fset_options | configuration files, sections, options and words of options
@ -86,6 +82,10 @@
| script | script_tags | tags of scripts in repository | script | script_tags | tags of scripts in repository
| spell | spell_dicts | list of installed dictionaries
| spell | spell_langs | list of all languages supported
| tcl | tcl_script | list of scripts | tcl | tcl_script | list of scripts
| trigger | trigger_hook_arguments | default arguments for a hook | trigger | trigger_hook_arguments | default arguments for a hook

View File

@ -6,8 +6,6 @@
|=== |===
| Plugin | Name | Description | Arguments | Plugin | Name | Description | Arguments
| aspell | aspell_dict | comma-separated list of dictionaries used in buffer | buffer pointer ("0x12345678") or buffer full name ("irc.freenode.#weechat")
| fifo | fifo_filename | name of FIFO pipe | - | fifo | fifo_filename | name of FIFO pipe | -
| guile | guile_eval | evaluation of source code | source code to execute | guile | guile_eval | evaluation of source code | source code to execute
@ -74,6 +72,8 @@
| ruby | ruby_version | version of the interpreter used | - | ruby | ruby_version | version of the interpreter used | -
| spell | spell_dict | comma-separated list of dictionaries used in buffer | buffer pointer ("0x12345678") or buffer full name ("irc.freenode.#weechat")
| tcl | tcl_eval | evaluation of source code | source code to execute | tcl | tcl_eval | evaluation of source code | source code to execute
| tcl | tcl_interpreter | name of the interpreter used | - | tcl | tcl_interpreter | name of the interpreter used | -

View File

@ -6,7 +6,7 @@
. logger (14000) . logger (14000)
. exec (13000) . exec (13000)
. trigger (12000) . trigger (12000)
. aspell (11000) . spell (11000)
. alias (10000) . alias (10000)
. buflist (9000) . buflist (9000)
. fifo (8000) . fifo (8000)

View File

@ -1,32 +0,0 @@
//
// This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND!
//
[[command_aspell_aspell]]
* `+aspell+`: aspell plugin configuration
----
/aspell enable|disable|toggle
listdict
setdict <dict>[,<dict>...]
deldict
addword [<dict>] <word>
enable: enable aspell
disable: disable aspell
toggle: toggle aspell
listdict: show installed dictionaries
setdict: set dictionary for current buffer (multiple dictionaries can be separated by a comma)
deldict: delete dictionary used on current buffer
addword: add a word in personal aspell dictionary
Input line beginning with a '/' is not checked, except for some commands (see /set aspell.check.commands).
To enable aspell on all buffers, use option "default_dict", then enable aspell, for example:
/set aspell.check.default_dict "en"
/aspell enable
To display a list of suggestions in a bar, use item "aspell_suggest".
Default key to toggle aspell is alt-s.
----

View File

@ -0,0 +1,32 @@
//
// This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND!
//
[[command_spell_spell]]
* `+spell+`: spell plugin configuration
----
/spell enable|disable|toggle
listdict
setdict <dict>[,<dict>...]
deldict
addword [<dict>] <word>
enable: enable spell checker
disable: disable spell checker
toggle: toggle spell checker
listdict: show installed dictionaries
setdict: set dictionary for current buffer (multiple dictionaries can be separated by a comma)
deldict: delete dictionary used on current buffer
addword: add a word in personal dictionary
Input line beginning with a '/' is not checked, except for some commands (see /set spell.check.commands).
To enable spell checker on all buffers, use option "default_dict", then enable spell checker, for example:
/set spell.check.default_dict "en"
/spell enable
To display a list of suggestions in a bar, use item "spell_suggest".
Default key to toggle spell checker is alt-s.
----

View File

@ -2,80 +2,80 @@
// This file is auto-generated by script docgen.py. // This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND! // DO NOT EDIT BY HAND!
// //
* [[option_aspell.check.commands]] *aspell.check.commands* * [[option_spell.check.commands]] *spell.check.commands*
** description: pass:none[comma separated list of commands for which spell checking is enabled (spell checking is disabled for all other commands)] ** description: pass:none[comma separated list of commands for which spell checking is enabled (spell checking is disabled for all other commands)]
** type: string ** type: string
** values: any string ** values: any string
** default value: `+"ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic"+` ** default value: `+"ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic"+`
* [[option_aspell.check.default_dict]] *aspell.check.default_dict* * [[option_spell.check.default_dict]] *spell.check.default_dict*
** description: pass:none[default dictionary (or comma separated list of dictionaries) to use when buffer has no dictionary defined (leave blank to disable aspell on buffers for which you didn't explicitly enabled it)] ** description: pass:none[default dictionary (or comma separated list of dictionaries) to use when buffer has no dictionary defined (leave blank to disable spell checker on buffers for which you didn't explicitly enabled it)]
** type: string ** type: string
** values: any string ** values: any string
** default value: `+""+` ** default value: `+""+`
* [[option_aspell.check.during_search]] *aspell.check.during_search* * [[option_spell.check.during_search]] *spell.check.during_search*
** description: pass:none[check words during text search in buffer] ** description: pass:none[check words during text search in buffer]
** type: boolean ** type: boolean
** values: on, off ** values: on, off
** default value: `+off+` ** default value: `+off+`
* [[option_aspell.check.enabled]] *aspell.check.enabled* * [[option_spell.check.enabled]] *spell.check.enabled*
** description: pass:none[enable aspell check for command line] ** description: pass:none[enable spell checker for command line]
** type: boolean ** type: boolean
** values: on, off ** values: on, off
** default value: `+off+` ** default value: `+off+`
* [[option_aspell.check.real_time]] *aspell.check.real_time* * [[option_spell.check.real_time]] *spell.check.real_time*
** description: pass:none[real-time spell checking of words (slower, disabled by default: words are checked only if there's delimiter after)] ** description: pass:none[real-time spell checking of words (slower, disabled by default: words are checked only if there's delimiter after)]
** type: boolean ** type: boolean
** values: on, off ** values: on, off
** default value: `+off+` ** default value: `+off+`
* [[option_aspell.check.suggestions]] *aspell.check.suggestions* * [[option_spell.check.suggestions]] *spell.check.suggestions*
** description: pass:none[number of suggestions to display in bar item "aspell_suggest" for each dictionary set in buffer (-1 = disable suggestions, 0 = display all possible suggestions in all languages)] ** description: pass:none[number of suggestions to display in bar item "spell_suggest" for each dictionary set in buffer (-1 = disable suggestions, 0 = display all possible suggestions in all languages)]
** type: integer ** type: integer
** values: -1 .. 2147483647 ** values: -1 .. 2147483647
** default value: `+-1+` ** default value: `+-1+`
* [[option_aspell.check.word_min_length]] *aspell.check.word_min_length* * [[option_spell.check.word_min_length]] *spell.check.word_min_length*
** description: pass:none[minimum length for a word to be spell checked (use 0 to check all words)] ** description: pass:none[minimum length for a word to be spell checked (use 0 to check all words)]
** type: integer ** type: integer
** values: 0 .. 2147483647 ** values: 0 .. 2147483647
** default value: `+2+` ** default value: `+2+`
* [[option_aspell.color.misspelled]] *aspell.color.misspelled* * [[option_spell.color.misspelled]] *spell.color.misspelled*
** description: pass:none[text color for misspelled words (input bar)] ** description: pass:none[text color for misspelled words (input bar)]
** type: color ** type: color
** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline ** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline
** default value: `+lightred+` ** default value: `+lightred+`
* [[option_aspell.color.suggestion]] *aspell.color.suggestion* * [[option_spell.color.suggestion]] *spell.color.suggestion*
** description: pass:none[text color for suggestion on a misspelled word in bar item "aspell_suggest"] ** description: pass:none[text color for suggestion on a misspelled word in bar item "spell_suggest"]
** type: color ** type: color
** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline ** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline
** default value: `+default+` ** default value: `+default+`
* [[option_aspell.color.suggestion_delimiter_dict]] *aspell.color.suggestion_delimiter_dict* * [[option_spell.color.suggestion_delimiter_dict]] *spell.color.suggestion_delimiter_dict*
** description: pass:none[text color for delimiters displayed between two dictionaries in bar item "aspell_suggest"] ** description: pass:none[text color for delimiters displayed between two dictionaries in bar item "spell_suggest"]
** type: color ** type: color
** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline ** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline
** default value: `+cyan+` ** default value: `+cyan+`
* [[option_aspell.color.suggestion_delimiter_word]] *aspell.color.suggestion_delimiter_word* * [[option_spell.color.suggestion_delimiter_word]] *spell.color.suggestion_delimiter_word*
** description: pass:none[text color for delimiters displayed between two words in bar item "aspell_suggest"] ** description: pass:none[text color for delimiters displayed between two words in bar item "spell_suggest"]
** type: color ** type: color
** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline ** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline
** default value: `+cyan+` ** default value: `+cyan+`
* [[option_aspell.look.suggestion_delimiter_dict]] *aspell.look.suggestion_delimiter_dict* * [[option_spell.look.suggestion_delimiter_dict]] *spell.look.suggestion_delimiter_dict*
** description: pass:none[delimiter displayed between two dictionaries in bar item "aspell_suggest"] ** description: pass:none[delimiter displayed between two dictionaries in bar item "spell_suggest"]
** type: string ** type: string
** values: any string ** values: any string
** default value: `+" / "+` ** default value: `+" / "+`
* [[option_aspell.look.suggestion_delimiter_word]] *aspell.look.suggestion_delimiter_word* * [[option_spell.look.suggestion_delimiter_word]] *spell.look.suggestion_delimiter_word*
** description: pass:none[delimiter displayed between two words in bar item "aspell_suggest"] ** description: pass:none[delimiter displayed between two words in bar item "spell_suggest"]
** type: string ** type: string
** values: any string ** values: any string
** default value: `+","+` ** default value: `+","+`

View File

@ -10,9 +10,6 @@ $HOME/.weechat/sec.conf::
$HOME/.weechat/alias.conf:: $HOME/.weechat/alias.conf::
configuration file for _alias_ plugin configuration file for _alias_ plugin
$HOME/.weechat/aspell.conf::
configuration file for _aspell_ plugin
$HOME/.weechat/buflist.conf:: $HOME/.weechat/buflist.conf::
configuration file for _buflist_ plugin configuration file for _buflist_ plugin
@ -61,6 +58,9 @@ $HOME/.weechat/ruby.conf::
$HOME/.weechat/script.conf:: $HOME/.weechat/script.conf::
configuration file for _script_ plugin configuration file for _script_ plugin
$HOME/.weechat/spell.conf::
configuration file for _spell_ plugin
$HOME/.weechat/tcl.conf:: $HOME/.weechat/tcl.conf::
configuration file for _tcl_ plugin configuration file for _tcl_ plugin

View File

@ -70,7 +70,6 @@ The main WeeChat directories are:
|          normal/ | Curses interface. |          normal/ | Curses interface.
|    plugins/ | Plugin and scripting API. |    plugins/ | Plugin and scripting API.
|       alias/ | Alias plugin. |       alias/ | Alias plugin.
|       aspell/ | Aspell plugin.
|       buflist/ | Buflist plugin. |       buflist/ | Buflist plugin.
|       charset/ | Charset plugin. |       charset/ | Charset plugin.
|       exec/ | Exec plugin. |       exec/ | Exec plugin.
@ -87,6 +86,7 @@ The main WeeChat directories are:
|       relay/ | Relay plugin (irc proxy + relay for remote interfaces). |       relay/ | Relay plugin (irc proxy + relay for remote interfaces).
|       ruby/ | Ruby scripting API. |       ruby/ | Ruby scripting API.
|       script/ | Script manager. |       script/ | Script manager.
|       spell/ | Spell plugin.
|       tcl/ | Tcl scripting API. |       tcl/ | Tcl scripting API.
|       trigger/ | Trigger plugin. |       trigger/ | Trigger plugin.
|       xfer/ | Xfer plugin (IRC DCC file/chat). |       xfer/ | Xfer plugin (IRC DCC file/chat).
@ -223,14 +223,14 @@ WeeChat "core" is located in following directories:
|       alias-completion.c | Alias completions. |       alias-completion.c | Alias completions.
|       alias-config.c | Alias config options (file alias.conf). |       alias-config.c | Alias config options (file alias.conf).
|       alias-info.c | Alias info/infolists/hdata. |       alias-info.c | Alias info/infolists/hdata.
|    aspell/ | Aspell plugin. |    spell/ | Spell checker plugin.
|       weechat-aspell.c | Main aspell functions. |       spell.c | Main spell checker functions.
|       weechat-aspell-bar-item.c | Aspell bar items. |       spell-bar-item.c | Spell checker bar items.
|       weechat-aspell-command.c | Aspell commands. |       spell-command.c | Spell checker commands.
|       weechat-aspell-completion.c | Aspell completions. |       spell-completion.c | Spell checker completions.
|       weechat-aspell-config.c | Aspell config options (file aspell.conf). |       spell-config.c | Spell checker config options (file spell.conf).
|       weechat-aspell-info.c | Aspell info/infolists/hdata. |       spell-info.c | Spell checker info/infolists/hdata.
|       weechat-aspell-speller.c | Spellers management. |       spell-speller.c | Spellers management.
|    buflist/ | Buflist plugin. |    buflist/ | Buflist plugin.
|       buflist.c | Main buflist functions. |       buflist.c | Main buflist functions.
|       buflist-bar-item.c | Buflist bar items. |       buflist-bar-item.c | Buflist bar items.

View File

@ -960,15 +960,19 @@ $ cd ~/.weechat/script
$ curl -O https://weechat.org/files/plugins.xml.gz $ curl -O https://weechat.org/files/plugins.xml.gz
---- ----
[[aspell_dictionaries]] [[spell_dictionaries]]
=== I installed aspell dictionaries on my system, how can I use them without restarting WeeChat? === I installed aspell dictionaries on my system, how can I use them without restarting WeeChat?
You have to reload the aspell plugin: You have to reload the spell plugin:
---- ----
/plugin reload aspell /plugin reload spell
---- ----
[NOTE]
With WeeChat ≤ 2.3, the "spell" plugin was named "aspell", so the command is:
`/plugin reload aspell`.
[[settings]] [[settings]]
== Settings == Settings
@ -998,8 +1002,8 @@ You can try following tips to consume less memory:
* Use the latest stable version (it is supposed to have less memory leaks than * Use the latest stable version (it is supposed to have less memory leaks than
older versions). older versions).
* Do not load some plugins if you don't use them, for example: aspell, buflist, * Do not load some plugins if you don't use them, for example: buflist,
fifo, logger, perl, python, ruby, lua, tcl, guile, javascript, php, fifo, logger, perl, python, ruby, lua, tcl, guile, javascript, php, spell,
xfer (used for DCC). See `/help weechat.plugin.autoload`. xfer (used for DCC). See `/help weechat.plugin.autoload`.
* Load only scripts that you really need. * Load only scripts that you really need.
* Do not load certificates if SSL is *NOT* used: set empty string in option * Do not load certificates if SSL is *NOT* used: set empty string in option
@ -1017,7 +1021,7 @@ You can follow same tips as for <<memory_usage,memory>>, and these ones:
* Remove display of seconds in status bar time: * Remove display of seconds in status bar time:
`/set weechat.look.item_time_format "%H:%M"` (this is the default value). `/set weechat.look.item_time_format "%H:%M"` (this is the default value).
* Disable real time check of misspelled words in command line (if you enabled it): * Disable real time check of misspelled words in command line (if you enabled it):
`/set aspell.check.real_time off`. `/set spell.check.real_time off`.
* Set the _TZ_ variable (for example: `export TZ="Europe/Paris"`), to prevent * Set the _TZ_ variable (for example: `export TZ="Europe/Paris"`), to prevent
frequent access to file _/etc/localtime_. frequent access to file _/etc/localtime_.

View File

@ -9570,11 +9570,6 @@ List of signals sent by WeeChat and plugins:
|=== |===
| Plugin | Signal | Arguments | Description | Plugin | Signal | Arguments | Description
| aspell | aspell_suggest +
_(WeeChat ≥ 0.4.0)_ |
Pointer: buffer. |
New suggestions for a misspelled word.
| guile | guile_script_loaded + | guile | guile_script_loaded +
_(WeeChat ≥ 0.3.9)_ | _(WeeChat ≥ 0.3.9)_ |
String: path to script. | String: path to script. |
@ -9874,6 +9869,11 @@ List of signals sent by WeeChat and plugins:
String: comma-separated list of scripts removed. | String: comma-separated list of scripts removed. |
Ruby script(s) removed. Ruby script(s) removed.
| spell | spell_suggest +
_(WeeChat ≥ 2.4)_ |
Pointer: buffer. |
New suggestions for a misspelled word.
| tcl | tcl_script_loaded + | tcl | tcl_script_loaded +
_(WeeChat ≥ 0.3.9)_ | _(WeeChat ≥ 0.3.9)_ |
String: path to script. | String: path to script. |

View File

@ -108,7 +108,7 @@ compile WeeChat.
| gettext | | | Internationalization (translation of messages; base language is English). | gettext | | | Internationalization (translation of messages; base language is English).
| ca-certificates | | | Certificates for SSL connections. | ca-certificates | | | Certificates for SSL connections.
| libaspell-dev | libaspell-dev
∥ libenchant-dev | | | Aspell plugin. ∥ libenchant-dev | | | Spell plugin.
| python-dev | ≥ 2.6 ^(4)^ | | Python plugin. | python-dev | ≥ 2.6 ^(4)^ | | Python plugin.
| libperl-dev | | | Perl plugin. | libperl-dev | | | Perl plugin.
| ruby2.5, ruby2.5-dev | ≥ 1.8 | | Ruby plugin. | ruby2.5, ruby2.5-dev | ≥ 1.8 | | Ruby plugin.
@ -192,9 +192,6 @@ List of commonly used options:
| ENABLE_ALIAS | `ON`, `OFF` | ON | | ENABLE_ALIAS | `ON`, `OFF` | ON |
Compile <<alias_plugin,Alias plugin>>. Compile <<alias_plugin,Alias plugin>>.
| ENABLE_ASPELL | `ON`, `OFF` | ON |
Compile <<aspell_plugin,Aspell plugin>>.
| ENABLE_BUFLIST | `ON`, `OFF` | ON | | ENABLE_BUFLIST | `ON`, `OFF` | ON |
Compile <<buflist_plugin,Buflist plugin>>. Compile <<buflist_plugin,Buflist plugin>>.
@ -210,7 +207,7 @@ List of commonly used options:
online). online).
| ENABLE_ENCHANT | `ON`, `OFF` | OFF | | ENABLE_ENCHANT | `ON`, `OFF` | OFF |
Compile <<aspell_plugin,Aspell plugin>> with Enchant. Compile <<spell_plugin,Spell plugin>> with Enchant.
| ENABLE_EXEC | `ON`, `OFF` | ON | | ENABLE_EXEC | `ON`, `OFF` | ON |
Compile <<exec_plugin,Exec plugin>>. Compile <<exec_plugin,Exec plugin>>.
@ -274,6 +271,9 @@ List of commonly used options:
Compile <<scripts_plugins,script plugins>> (Python, Perl, Ruby, Lua, Tcl, Compile <<scripts_plugins,script plugins>> (Python, Perl, Ruby, Lua, Tcl,
Guile, JavaScript, PHP). Guile, JavaScript, PHP).
| ENABLE_SPELL | `ON`, `OFF` | ON |
Compile <<spell_plugin,Spell plugin>>.
| ENABLE_TCL | `ON`, `OFF` | ON | | ENABLE_TCL | `ON`, `OFF` | ON |
Compile <<scripts_plugins,Tcl plugin>>. Compile <<scripts_plugins,Tcl plugin>>.
@ -563,7 +563,6 @@ The files in the WeeChat home directory are:
| sec.conf | Configuration file with secured data | *Yes, highly sensitive*: this file must never be shared with anyone. | sec.conf | Configuration file with secured data | *Yes, highly sensitive*: this file must never be shared with anyone.
| plugins.conf | Plugins configuration file | Possible, depends on plugins/scripts. | plugins.conf | Plugins configuration file | Possible, depends on plugins/scripts.
| alias.conf | Configuration file for _alias_ plugin | Possible, depends on aliases. | alias.conf | Configuration file for _alias_ plugin | Possible, depends on aliases.
| aspell.conf | Configuration file for _aspell_ plugin | No.
| buflist.conf | Configuration file for _buflist_ plugin | No. | buflist.conf | Configuration file for _buflist_ plugin | No.
| charset.conf | Configuration file for _charset_ plugin | No. | charset.conf | Configuration file for _charset_ plugin | No.
| exec.conf | Configuration file for _exec_ plugin | No. | exec.conf | Configuration file for _exec_ plugin | No.
@ -581,6 +580,7 @@ The files in the WeeChat home directory are:
| ruby.conf | Configuration file for _ruby_ plugin | No. | ruby.conf | Configuration file for _ruby_ plugin | No.
| script.conf | Configuration file for _script_ plugin | No. | script.conf | Configuration file for _script_ plugin | No.
| tcl.conf | Configuration file for _tcl_ plugin | No. | tcl.conf | Configuration file for _tcl_ plugin | No.
| spell.conf | Configuration file for _spell_ plugin | No.
| trigger.conf | Configuration file for _trigger_ plugin | Possible, depends on triggers. | trigger.conf | Configuration file for _trigger_ plugin | Possible, depends on triggers.
| xfer.conf | Configuration file for _xfer_ plugin | No. | xfer.conf | Configuration file for _xfer_ plugin | No.
| weechat.log | WeeChat log file | No. | weechat.log | WeeChat log file | No.
@ -704,8 +704,8 @@ Other items available (not used in bars by default):
[width="100%",cols="^3,^4,10",options="header"] [width="100%",cols="^3,^4,10",options="header"]
|=== |===
| Item | Example | Description | Item | Example | Description
| aspell_dict | `fr,en` | Spelling dictionaries used on current buffer. | spell_dict | `fr,en` | Spelling dictionaries used on current buffer.
| aspell_suggest | `print,prone,prune` | Spelling suggestions for word under cursor (if misspelled). | spell_suggest | `print,prone,prune` | Spelling suggestions for word under cursor (if misspelled).
| buffer_count | `10` | Total number of buffers opened. | buffer_count | `10` | Total number of buffers opened.
| buffer_short_name | `#test` | Current buffer short name. | buffer_short_name | `#test` | Current buffer short name.
| irc_channel | `#test` | Current IRC channel name. | irc_channel | `#test` | Current IRC channel name.
@ -1617,7 +1617,7 @@ with `/script install buffer_autoset.py` and get help with `/help buffer_autoset
| kbd:[Alt+d] | Delete next word in command line (deleted string is copied to the internal clipboard). | `/input delete_next_word` | kbd:[Alt+d] | Delete next word in command line (deleted string is copied to the internal clipboard). | `/input delete_next_word`
| kbd:[Alt+k] | Grab a key and insert its code (and command bound if key exists) in command line. | `/input grab_key_command` | kbd:[Alt+k] | Grab a key and insert its code (and command bound if key exists) in command line. | `/input grab_key_command`
| kbd:[Alt+r] | Delete entire command line. | `/input delete_line` | kbd:[Alt+r] | Delete entire command line. | `/input delete_line`
| kbd:[Alt+s] | Toggle aspell. | `/mute aspell toggle` | kbd:[Alt+s] | Toggle spell checker. | `/mute spell toggle`
|=== |===
[[key_bindings_buffers_windows]] [[key_bindings_buffers_windows]]
@ -2088,7 +2088,6 @@ Default plugins are:
|=== |===
| Plugin | Description | Plugin | Description
| alias | Define alias for commands. | alias | Define alias for commands.
| aspell | Spell checking for command line.
| buflist | Bar item with list of buffers. | buflist | Bar item with list of buffers.
| charset | Charset decoding/encoding for buffers. | charset | Charset decoding/encoding for buffers.
| exec | Execution of external commands in WeeChat. | exec | Execution of external commands in WeeChat.
@ -2106,6 +2105,7 @@ Default plugins are:
| guile | Guile (scheme) scripting API. | guile | Guile (scheme) scripting API.
| javascript | JavaScript scripting API. | javascript | JavaScript scripting API.
| php | PHP scripting API. | php | PHP scripting API.
| spell | Spell checking for command line.
| trigger | Text replacement and command execution on events triggered by WeeChat/plugins. | trigger | Text replacement and command execution on events triggered by WeeChat/plugins.
| xfer | File transfer and direct chat. | xfer | File transfer and direct chat.
|=== |===
@ -2147,15 +2147,15 @@ Sections in file _alias.conf_:
/set alias.completion.* | Completions for aliases. /set alias.completion.* | Completions for aliases.
|=== |===
[[aspell_plugin]] [[spell_plugin]]
=== Aspell === Spell
Aspell plugin lets you check spelling in command line. It is possible to use Spell plugin lets you check spelling in command line. It is possible to use
many languages by buffer. many languages by buffer.
Spell checking is disabled by default and can be toggled with key kbd:[Alt+s]. Spell checking is disabled by default and can be toggled with key kbd:[Alt+s].
[[aspell_dictionaries]] [[spell_dictionaries]]
==== Dictionaries ==== Dictionaries
Before using spell checking, dictionaries must be defined, either globally or Before using spell checking, dictionaries must be defined, either globally or
@ -2167,26 +2167,26 @@ dictionaries.
For example to use English and French: For example to use English and French:
---- ----
/set aspell.check.default_dict "en,fr" /set spell.check.default_dict "en,fr"
---- ----
It is possible to use a different dictionary on a specific buffer, for example It is possible to use a different dictionary on a specific buffer, for example
on a German channel: on a German channel:
---- ----
/aspell setdict de /spell setdict de
---- ----
You can also specify a dictionary for a group of buffers, for example English You can also specify a dictionary for a group of buffers, for example English
for all channels on freenode IRC server: for all channels on freenode IRC server:
---- ----
/set aspell.dict.irc.freenode en /set spell.dict.irc.freenode en
---- ----
For more information, see the command <<command_aspell_aspell,/aspell>>. For more information, see the command <<command_spell_spell,/spell>>.
[[aspell_speller_options]] [[spell_speller_options]]
==== Speller options ==== Speller options
Speller options can be defined by adding options in section "option" of aspell Speller options can be defined by adding options in section "option" of aspell
@ -2202,17 +2202,17 @@ $ aspell config
For example, to enable option "ignore-case": For example, to enable option "ignore-case":
---- ----
/set aspell.option.ignore-case "true" /set spell.option.ignore-case "true"
---- ----
[[aspell_suggestions]] [[spell_suggestions]]
==== Suggestions ==== Suggestions
Suggestions are displayed in a bar item called "aspell_suggest". The number of Suggestions are displayed in a bar item called "spell_suggest". The number of
suggestions is set in option _aspell.check.suggestions_. suggestions is set in option _spell.check.suggestions_.
To enable suggestions you must set option _aspell.check.suggestions_ to an To enable suggestions you must set option _spell.check.suggestions_ to an
integer ≥ 0 and add the bar item "aspell_suggest" to a bar, like _status_. integer ≥ 0 and add the bar item "spell_suggest" to a bar, like _status_.
Example of suggestions with English dictionary (`en`): Example of suggestions with English dictionary (`en`):
@ -2230,30 +2230,30 @@ Example of suggestions with English and French dictionaries (`en,fr`):
└─────────────────────────────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────────────────────────────┘
.... ....
[[aspell_commands]] [[spell_commands]]
==== Commands ==== Commands
include::autogen/user/aspell_commands.adoc[] include::autogen/user/spell_commands.adoc[]
[[aspell_options]] [[spell_options]]
==== Options ==== Options
Sections in file _aspell.conf_: Sections in file _spell.conf_:
[width="100%",cols="3m,6m,16",options="header"] [width="100%",cols="3m,6m,16",options="header"]
|=== |===
| Section | Control command | Description | Section | Control command | Description
| color | /set aspell.color.* | Colors. | color | /set spell.color.* | Colors.
| check | /set aspell.check.* | Options to control spell checking. | check | /set spell.check.* | Options to control spell checking.
| dict | <<command_aspell_aspell,/aspell setdict>> + | dict | <<command_spell_spell,/spell setdict>> +
/set aspell.dict.* | Dictionaries used by buffer (options can be added/removed in section). /set spell.dict.* | Dictionaries used by buffer (options can be added/removed in section).
| look | /set aspell.look.* | Look and feel. | look | /set spell.look.* | Look and feel.
| option | /set aspell.option.* | <<aspell_speller_options,Speller options>> (options can be added/removed in section). | option | /set spell.option.* | <<spell_speller_options,Speller options>> (options can be added/removed in section).
|=== |===
Options: Options:
include::autogen/user/aspell_options.adoc[] include::autogen/user/spell_options.adoc[]
[[buflist_plugin]] [[buflist_plugin]]
=== Buflist === Buflist

View File

@ -10,10 +10,6 @@
| alias | alias_value | valeur de l'alias | alias | alias_value | valeur de l'alias
| aspell | aspell_dicts | liste des dictionnaires aspell installés
| aspell | aspell_langs | liste de toutes les langues supportées par aspell
| exec | exec_commands_ids | ids (nombres et noms) des commandes exécutées | exec | exec_commands_ids | ids (nombres et noms) des commandes exécutées
| fset | fset_options | fichiers de configuration, section, options et mots des options | fset | fset_options | fichiers de configuration, section, options et mots des options
@ -86,6 +82,10 @@
| script | script_tags | étiquettes des scripts dans le dépôt | script | script_tags | étiquettes des scripts dans le dépôt
| spell | spell_dicts | list of installed dictionaries
| spell | spell_langs | list of all languages supported
| tcl | tcl_script | liste des scripts | tcl | tcl_script | liste des scripts
| trigger | trigger_hook_arguments | paramètres par défaut pour un hook | trigger | trigger_hook_arguments | paramètres par défaut pour un hook

View File

@ -6,8 +6,6 @@
|=== |===
| Extension | Nom | Description | Paramètres | Extension | Nom | Description | Paramètres
| aspell | aspell_dict | liste de dictionnaires (séparés par des virgules) utilisés sur le tampon | pointeur vers un tampon ("0x12345678") ou nom complet de tampon ("irc.freenode.#weechat")
| fifo | fifo_filename | nom du tube FIFO | - | fifo | fifo_filename | nom du tube FIFO | -
| guile | guile_eval | évaluation de code source | code source à exécuter | guile | guile_eval | évaluation de code source | code source à exécuter
@ -74,6 +72,8 @@
| ruby | ruby_version | version de l'interpréteur utilisé | - | ruby | ruby_version | version de l'interpréteur utilisé | -
| spell | spell_dict | liste de dictionnaires (séparés par des virgules) utilisés sur le tampon | pointeur vers un tampon ("0x12345678") ou nom complet de tampon ("irc.freenode.#weechat")
| tcl | tcl_eval | évaluation de code source | code source à exécuter | tcl | tcl_eval | évaluation de code source | code source à exécuter
| tcl | tcl_interpreter | nom de l'interpréteur utilisé | - | tcl | tcl_interpreter | nom de l'interpréteur utilisé | -

View File

@ -6,7 +6,7 @@
. logger (14000) . logger (14000)
. exec (13000) . exec (13000)
. trigger (12000) . trigger (12000)
. aspell (11000) . spell (11000)
. alias (10000) . alias (10000)
. buflist (9000) . buflist (9000)
. fifo (8000) . fifo (8000)

View File

@ -1,32 +0,0 @@
//
// This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND!
//
[[command_aspell_aspell]]
* `+aspell+`: configuration de l'extension aspell
----
/aspell enable|disable|toggle
listdict
setdict <dict>[,<dict>...]
deldict
addword [<dict>] <mot>
enable : activer aspell
disable : désactiver aspell
toggle : activer/désactiver aspell
listdict : afficher les dictionnaires installés
setdict : définir le dictionnaire pour le tampon courant (plusieurs dictionnaires peuvent être séparés par une virgule)
deldict : supprimer le dictionnaire utilisé sur le tampon courant
addword : ajouter un mot dans le dictionnaire personnel aspell
Les lignes d'entrée commençant par '/' ne sont pas vérifiées, sauf pour certaines commandes (voir /set aspell.check.commands).
Pour activer aspell sur tous les tampons, utilisez l'option "default_dict", par exemple :
/set aspell.check.default_dict "en"
/aspell enable
Pour afficher une liste des suggestions dans une barre, utilisez l'objet "aspell_suggest".
La touche par défaut pour activer/désactiver aspell est alt-s.
----

View File

@ -0,0 +1,32 @@
//
// This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND!
//
[[command_spell_spell]]
* `+spell+`: spell plugin configuration
----
/spell enable|disable|toggle
listdict
setdict <dict>[,<dict>...]
deldict
addword [<dict>] <mot>
enable: enable spell checker
disable: disable spell checker
toggle: toggle spell checker
listdict: show installed dictionaries
setdict: set dictionary for current buffer (multiple dictionaries can be separated by a comma)
deldict: delete dictionary used on current buffer
addword: add a word in personal dictionary
Input line beginning with a '/' is not checked, except for some commands (see /set spell.check.commands).
To enable spell checker on all buffers, use option "default_dict", then enable spell checker, for example:
/set spell.check.default_dict "en"
/spell enable
To display a list of suggestions in a bar, use item "spell_suggest".
Default key to toggle spell checker is alt-s.
----

View File

@ -2,80 +2,80 @@
// This file is auto-generated by script docgen.py. // This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND! // DO NOT EDIT BY HAND!
// //
* [[option_aspell.check.commands]] *aspell.check.commands* * [[option_spell.check.commands]] *spell.check.commands*
** description: pass:none[liste de commandes (séparées par des virgules) pour lesquelles la vérification orthographique est activée (la vérification est désactivée pour toutes les autres commandes)] ** description: pass:none[liste de commandes (séparées par des virgules) pour lesquelles la vérification orthographique est activée (la vérification est désactivée pour toutes les autres commandes)]
** type: chaîne ** type: chaîne
** valeurs: toute chaîne ** valeurs: toute chaîne
** valeur par défaut: `+"ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic"+` ** valeur par défaut: `+"ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic"+`
* [[option_aspell.check.default_dict]] *aspell.check.default_dict* * [[option_spell.check.default_dict]] *spell.check.default_dict*
** description: pass:none[dictionnaire par défaut (ou liste de dictionnaires séparés par une virgule) à utiliser quand le tampon courant n'a pas de dictionnaire défini (laissez blanc pour désactiver aspell sur les tampons pour lesquels vous ne l'avez pas explicitement activé)] ** description: pass:none[default dictionary (or comma separated list of dictionaries) to use when buffer has no dictionary defined (leave blank to disable spell checker on buffers for which you didn't explicitly enabled it)]
** type: chaîne ** type: chaîne
** valeurs: toute chaîne ** valeurs: toute chaîne
** valeur par défaut: `+""+` ** valeur par défaut: `+""+`
* [[option_aspell.check.during_search]] *aspell.check.during_search* * [[option_spell.check.during_search]] *spell.check.during_search*
** description: pass:none[vérifier les mots pendant la recherche de texte dans le tampon] ** description: pass:none[vérifier les mots pendant la recherche de texte dans le tampon]
** type: booléen ** type: booléen
** valeurs: on, off ** valeurs: on, off
** valeur par défaut: `+off+` ** valeur par défaut: `+off+`
* [[option_aspell.check.enabled]] *aspell.check.enabled* * [[option_spell.check.enabled]] *spell.check.enabled*
** description: pass:none[activer la vérification aspell pour la ligne de commande] ** description: pass:none[enable spell checker for command line]
** type: booléen ** type: booléen
** valeurs: on, off ** valeurs: on, off
** valeur par défaut: `+off+` ** valeur par défaut: `+off+`
* [[option_aspell.check.real_time]] *aspell.check.real_time* * [[option_spell.check.real_time]] *spell.check.real_time*
** description: pass:none[vérification orthographique des mots en temps réel (plus lent, désactivé par défaut : les mots sont vérifiés seulement s'il y a un délimiteur après)] ** description: pass:none[vérification orthographique des mots en temps réel (plus lent, désactivé par défaut : les mots sont vérifiés seulement s'il y a un délimiteur après)]
** type: booléen ** type: booléen
** valeurs: on, off ** valeurs: on, off
** valeur par défaut: `+off+` ** valeur par défaut: `+off+`
* [[option_aspell.check.suggestions]] *aspell.check.suggestions* * [[option_spell.check.suggestions]] *spell.check.suggestions*
** description: pass:none[nombre de suggestions à afficher dans l'objet de barre "aspell_suggest" pour chaque dictionnaire du tampon (-1 = désactiver les suggestions, 0 = afficher toutes les suggestions possibles dans toutes les langues)] ** description: pass:none[number of suggestions to display in bar item "spell_suggest" for each dictionary set in buffer (-1 = disable suggestions, 0 = display all possible suggestions in all languages)]
** type: entier ** type: entier
** valeurs: -1 .. 2147483647 ** valeurs: -1 .. 2147483647
** valeur par défaut: `+-1+` ** valeur par défaut: `+-1+`
* [[option_aspell.check.word_min_length]] *aspell.check.word_min_length* * [[option_spell.check.word_min_length]] *spell.check.word_min_length*
** description: pass:none[longueur minimum d'un mot pour que l'orthographe soit vérifiée (utilisez 0 pour vérifier tous les mots)] ** description: pass:none[longueur minimum d'un mot pour que l'orthographe soit vérifiée (utilisez 0 pour vérifier tous les mots)]
** type: entier ** type: entier
** valeurs: 0 .. 2147483647 ** valeurs: 0 .. 2147483647
** valeur par défaut: `+2+` ** valeur par défaut: `+2+`
* [[option_aspell.color.misspelled]] *aspell.color.misspelled* * [[option_spell.color.misspelled]] *spell.color.misspelled*
** description: pass:none[couleur du texte pour les mots mal orthographiés (barre de saisie)] ** description: pass:none[couleur du texte pour les mots mal orthographiés (barre de saisie)]
** type: couleur ** type: couleur
** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias ; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour le gras, "!" pour la vidéo inverse, "/" pour l'italique, "_" pour le souligné ** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias ; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour le gras, "!" pour la vidéo inverse, "/" pour l'italique, "_" pour le souligné
** valeur par défaut: `+lightred+` ** valeur par défaut: `+lightred+`
* [[option_aspell.color.suggestion]] *aspell.color.suggestion* * [[option_spell.color.suggestion]] *spell.color.suggestion*
** description: pass:none[couleur du texte pour la suggestion sur un mot mal orthographié dans l'objet de barre "aspell_suggest"] ** description: pass:none[text color for suggestion on a misspelled word in bar item "spell_suggest"]
** type: couleur ** type: couleur
** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias ; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour le gras, "!" pour la vidéo inverse, "/" pour l'italique, "_" pour le souligné ** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias ; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour le gras, "!" pour la vidéo inverse, "/" pour l'italique, "_" pour le souligné
** valeur par défaut: `+default+` ** valeur par défaut: `+default+`
* [[option_aspell.color.suggestion_delimiter_dict]] *aspell.color.suggestion_delimiter_dict* * [[option_spell.color.suggestion_delimiter_dict]] *spell.color.suggestion_delimiter_dict*
** description: pass:none[couleur du texte pour les séparateurs affichés entre deux dictionnaires dans l'objet de barre "aspell_suggest"] ** description: pass:none[text color for delimiters displayed between two dictionaries in bar item "spell_suggest"]
** type: couleur ** type: couleur
** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias ; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour le gras, "!" pour la vidéo inverse, "/" pour l'italique, "_" pour le souligné ** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias ; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour le gras, "!" pour la vidéo inverse, "/" pour l'italique, "_" pour le souligné
** valeur par défaut: `+cyan+` ** valeur par défaut: `+cyan+`
* [[option_aspell.color.suggestion_delimiter_word]] *aspell.color.suggestion_delimiter_word* * [[option_spell.color.suggestion_delimiter_word]] *spell.color.suggestion_delimiter_word*
** description: pass:none[couleur du texte pour les séparateurs affichés entre deux mots dans l'objet de barre "aspell_suggest"] ** description: pass:none[text color for delimiters displayed between two words in bar item "spell_suggest"]
** type: couleur ** type: couleur
** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias ; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour le gras, "!" pour la vidéo inverse, "/" pour l'italique, "_" pour le souligné ** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias ; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour le gras, "!" pour la vidéo inverse, "/" pour l'italique, "_" pour le souligné
** valeur par défaut: `+cyan+` ** valeur par défaut: `+cyan+`
* [[option_aspell.look.suggestion_delimiter_dict]] *aspell.look.suggestion_delimiter_dict* * [[option_spell.look.suggestion_delimiter_dict]] *spell.look.suggestion_delimiter_dict*
** description: pass:none[séparateur affiché entre deux dictionnaires dans l'objet de barre "aspell_suggest"] ** description: pass:none[delimiter displayed between two dictionaries in bar item "spell_suggest"]
** type: chaîne ** type: chaîne
** valeurs: toute chaîne ** valeurs: toute chaîne
** valeur par défaut: `+" / "+` ** valeur par défaut: `+" / "+`
* [[option_aspell.look.suggestion_delimiter_word]] *aspell.look.suggestion_delimiter_word* * [[option_spell.look.suggestion_delimiter_word]] *spell.look.suggestion_delimiter_word*
** description: pass:none[séparateur affiché entre deux mots dans l'objet de barre "aspell_suggest"] ** description: pass:none[delimiter displayed between two words in bar item "spell_suggest"]
** type: chaîne ** type: chaîne
** valeurs: toute chaîne ** valeurs: toute chaîne
** valeur par défaut: `+","+` ** valeur par défaut: `+","+`

View File

@ -10,9 +10,6 @@ $HOME/.weechat/sec.conf::
$HOME/.weechat/alias.conf:: $HOME/.weechat/alias.conf::
fichier de configuration pour l'extension _alias_ fichier de configuration pour l'extension _alias_
$HOME/.weechat/aspell.conf::
fichier de configuration pour l'extension _aspell_
$HOME/.weechat/buflist.conf:: $HOME/.weechat/buflist.conf::
fichier de configuration pour l'extension _buflist_ fichier de configuration pour l'extension _buflist_
@ -61,6 +58,9 @@ $HOME/.weechat/ruby.conf::
$HOME/.weechat/script.conf:: $HOME/.weechat/script.conf::
fichier de configuration pour l'extension _script_ fichier de configuration pour l'extension _script_
$HOME/.weechat/spell.conf::
fichier de configuration pour l'extension _spell_
$HOME/.weechat/tcl.conf:: $HOME/.weechat/tcl.conf::
fichier de configuration pour l'extension _tcl_ fichier de configuration pour l'extension _tcl_

View File

@ -72,7 +72,6 @@ Les répertoires principaux de WeeChat sont :
|          normal/ | Interface Curses. |          normal/ | Interface Curses.
|    plugins/ | API extension/script. |    plugins/ | API extension/script.
|       alias/ | Extension Alias. |       alias/ | Extension Alias.
|       aspell/ | Extension Aspell.
|       buflist/ | Extension Buflist. |       buflist/ | Extension Buflist.
|       charset/ | Extension Charset. |       charset/ | Extension Charset.
|       exec/ | Extension Exec. |       exec/ | Extension Exec.
@ -89,6 +88,7 @@ Les répertoires principaux de WeeChat sont :
|       relay/ | Extension Relay (proxy IRC + relai pour interfaces distantes). |       relay/ | Extension Relay (proxy IRC + relai pour interfaces distantes).
|       ruby/ | API script Ruby. |       ruby/ | API script Ruby.
|       script/ | Gestionnaire de scripts. |       script/ | Gestionnaire de scripts.
|       spell/ | Extension Spell.
|       tcl/ | API script Tcl. |       tcl/ | API script Tcl.
|       trigger/ | Extension Trigger. |       trigger/ | Extension Trigger.
|       xfer/ | Extension Xfer (IRC DCC fichier/discussion). |       xfer/ | Extension Xfer (IRC DCC fichier/discussion).
@ -225,14 +225,14 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|       alias-completion.c | Complétions pour Alias. |       alias-completion.c | Complétions pour Alias.
|       alias-config.c | Options de configuration des alias (fichier alias.conf). |       alias-config.c | Options de configuration des alias (fichier alias.conf).
|       alias-info.c | Info/infolists/hdata pour les alias. |       alias-info.c | Info/infolists/hdata pour les alias.
|    aspell/ | Extension Aspell. |    spell/ | Extension Spell.
|       weechat-aspell.c | Fonctions principales pour Aspell. |       spell.c | Fonctions principales pour Spell.
|       weechat-aspell-bar-item.c | Objets de barre Aspell. |       spell-bar-item.c | Objets de barre Spell.
|       weechat-aspell-command.c | Commandes Aspell. |       spell-command.c | Commandes Spell.
|       weechat-aspell-completion.c | Complétions pour Aspell. |       spell-completion.c | Complétions pour Spell.
|       weechat-aspell-config.c | Options de configuration pour Aspell (fichier aspell.conf). |       spell-config.c | Options de configuration pour Spell (fichier spell.conf).
|       weechat-aspell-info.c | Info/infolists/hdata pour Aspell. |       spell-info.c | Info/infolists/hdata pour Spell.
|       weechat-aspell-speller.c | Gestion des correcteurs orthographiques. |       spell-speller.c | Gestion des correcteurs orthographiques.
|    buflist/ | Extension Buflist. |    buflist/ | Extension Buflist.
|       buflist.c | Fonctions principales de Buflist. |       buflist.c | Fonctions principales de Buflist.
|       buflist-bar-item.c | Objets de barre Buflist. |       buflist-bar-item.c | Objets de barre Buflist.

View File

@ -1000,15 +1000,19 @@ $ cd ~/.weechat/script
$ curl -O https://weechat.org/files/plugins.xml.gz $ curl -O https://weechat.org/files/plugins.xml.gz
---- ----
[[aspell_dictionaries]] [[spell_dictionaries]]
=== J'ai installé des dictionnaires aspell sur mon système, comment les utiliser sans redémarrer WeeChat ? === J'ai installé des dictionnaires aspell sur mon système, comment les utiliser sans redémarrer WeeChat ?
Vous devez recharger l'extension aspell : Vous devez recharger l'extension spell :
---- ----
/plugin reload aspell /plugin reload spell
---- ----
[NOTE]
Avec WeeChat ≤ 2.3, l'extension "spell" s'appelait "aspell", donc la commande est :
`/plugin reload aspell`.
[[settings]] [[settings]]
== Réglages == Réglages
@ -1042,8 +1046,8 @@ Vous pouvez essayer les astuces suivantes pour consommer moins de mémoire :
* Utiliser la dernière version stable (elle est supposée avoir moins de fuites * Utiliser la dernière version stable (elle est supposée avoir moins de fuites
de mémoire que les versions plus anciennes). de mémoire que les versions plus anciennes).
* Ne pas charger les extensions si vous ne les utilisez pas, par exemple : * Ne pas charger les extensions si vous ne les utilisez pas, par exemple :
aspell, buflist, fifo, logger, perl, python, ruby, lua, tcl, guile, buflist, fifo, logger, perl, python, ruby, lua, tcl, guile, javascript, php,
javascript, php, xfer (utilisé pour les DCC). spell, xfer (utilisé pour les DCC).
Voir `/help weechat.plugin.autoload`. Voir `/help weechat.plugin.autoload`.
* Charger uniquement les scripts dont vous avez vraiment besoin. * Charger uniquement les scripts dont vous avez vraiment besoin.
* Ne pas charger les certificats si SSL n'est *PAS* utilisé : affecter une * Ne pas charger les certificats si SSL n'est *PAS* utilisé : affecter une
@ -1062,7 +1066,7 @@ celles-ci :
* Supprimer l'affichage des secondes dans l'heure de la barre de statut : * Supprimer l'affichage des secondes dans l'heure de la barre de statut :
`/set weechat.look.item_time_format "%H:%M"` (ceci est la valeur par défaut). `/set weechat.look.item_time_format "%H:%M"` (ceci est la valeur par défaut).
* Désactiver la vérification en temps réel des mots mal orthographiés dans la * Désactiver la vérification en temps réel des mots mal orthographiés dans la
ligne de commande (si vous l'avez activée) : `/set aspell.check.real_time off`. ligne de commande (si vous l'avez activée) : `/set spell.check.real_time off`.
* Définir la variable _TZ_ (par exemple : `export TZ="Europe/Paris"`), pour * Définir la variable _TZ_ (par exemple : `export TZ="Europe/Paris"`), pour
éviter un accès fréquent au fichier _/etc/localtime_. éviter un accès fréquent au fichier _/etc/localtime_.

View File

@ -9768,11 +9768,6 @@ Liste des signaux envoyés par WeeChat et les extensions :
|=== |===
| Extension | Signal | Paramètres | Description | Extension | Signal | Paramètres | Description
| aspell | aspell_suggest +
_(WeeChat ≥ 0.4.0)_ |
Pointeur : tampon. |
Nouvelles suggestions pour un mot mal orthographié.
| guile | guile_script_loaded + | guile | guile_script_loaded +
_(WeeChat ≥ 0.3.9)_ | _(WeeChat ≥ 0.3.9)_ |
Chaîne : chemin vers le script. | Chaîne : chemin vers le script. |
@ -10078,6 +10073,11 @@ Liste des signaux envoyés par WeeChat et les extensions :
Chaîne : liste de scripts supprimés (séparés par des virgules). | Chaîne : liste de scripts supprimés (séparés par des virgules). |
Script(s) ruby supprimé(s). Script(s) ruby supprimé(s).
| spell | spell_suggest +
_(WeeChat ≥ 2.4)_ |
Pointeur : tampon. |
Nouvelles suggestions pour un mot mal orthographié.
| tcl | tcl_script_loaded + | tcl | tcl_script_loaded +
_(WeeChat ≥ 0.3.9)_ | _(WeeChat ≥ 0.3.9)_ |
Chaîne : chemin vers le script. | Chaîne : chemin vers le script. |

View File

@ -111,7 +111,7 @@ compiler WeeChat.
| gettext | | | Internationalisation (traduction des messages; la langue de base est l'anglais). | gettext | | | Internationalisation (traduction des messages; la langue de base est l'anglais).
| ca-certificates | | | Certificats pour les connexions SSL. | ca-certificates | | | Certificats pour les connexions SSL.
| libaspell-dev | libaspell-dev
∥ libenchant-dev | | | Extension aspell. ∥ libenchant-dev | | | Extension spell.
| python-dev | ≥ 2.6 ^(4)^ | | Extension python. | python-dev | ≥ 2.6 ^(4)^ | | Extension python.
| libperl-dev | | | Extension perl. | libperl-dev | | | Extension perl.
| ruby2.5, ruby2.5-dev | ≥ 1.8 | | Extension ruby. | ruby2.5, ruby2.5-dev | ≥ 1.8 | | Extension ruby.
@ -196,9 +196,6 @@ Liste des options couramment utilisées :
| ENABLE_ALIAS | `ON`, `OFF` | ON | | ENABLE_ALIAS | `ON`, `OFF` | ON |
Compiler <<alias_plugin,l'extension Alias>>. Compiler <<alias_plugin,l'extension Alias>>.
| ENABLE_ASPELL | `ON`, `OFF` | ON |
Compiler <<aspell_plugin,l'extension Aspell>>.
| ENABLE_BUFLIST | `ON`, `OFF` | ON | | ENABLE_BUFLIST | `ON`, `OFF` | ON |
Compiler <<buflist_plugin,l'extension Buflist>>. Compiler <<buflist_plugin,l'extension Buflist>>.
@ -214,7 +211,7 @@ Liste des options couramment utilisées :
si vous ne pouvez pas consulter la documentation en ligne). si vous ne pouvez pas consulter la documentation en ligne).
| ENABLE_ENCHANT | `ON`, `OFF` | OFF | | ENABLE_ENCHANT | `ON`, `OFF` | OFF |
Compiler <<aspell_plugin,l'extension Aspell>> avec Enchant. Compiler <<spell_plugin,l'extension Spell>> avec Enchant.
| ENABLE_EXEC | `ON`, `OFF` | ON | | ENABLE_EXEC | `ON`, `OFF` | ON |
Compiler <<exec_plugin,l'extension Exec>>. Compiler <<exec_plugin,l'extension Exec>>.
@ -278,6 +275,9 @@ Liste des options couramment utilisées :
Compiler <<scripts_plugins,les extensions de script>> (Python, Perl, Ruby, Compiler <<scripts_plugins,les extensions de script>> (Python, Perl, Ruby,
Lua, Tcl, Guile, JavaScript, PHP). Lua, Tcl, Guile, JavaScript, PHP).
| ENABLE_SPELL | `ON`, `OFF` | ON |
Compiler <<spell_plugin,l'extension Spell>>.
| ENABLE_TCL | `ON`, `OFF` | ON | | ENABLE_TCL | `ON`, `OFF` | ON |
Compiler <<scripts_plugins,l'extension Tcl>>. Compiler <<scripts_plugins,l'extension Tcl>>.
@ -576,7 +576,6 @@ Les fichiers dans le répertoire principal de WeeChat sont :
| sec.conf | Fichier de configuration avec les données sécurisées | *Oui, très sensibles*: ce fichier ne doit jamais être partagé avec quiconque. | sec.conf | Fichier de configuration avec les données sécurisées | *Oui, très sensibles*: ce fichier ne doit jamais être partagé avec quiconque.
| plugins.conf | Fichier de configuration des extensions | Possible, cela dépend des extensions/scripts. | plugins.conf | Fichier de configuration des extensions | Possible, cela dépend des extensions/scripts.
| alias.conf | Fichier de configuration de l'extension _alias_ | Possible, cela dépend des alias. | alias.conf | Fichier de configuration de l'extension _alias_ | Possible, cela dépend des alias.
| aspell.conf | Fichier de configuration de l'extension _aspell_ | Non.
| buflist.conf | Fichier de configuration de l'extension _buflist_ | Non. | buflist.conf | Fichier de configuration de l'extension _buflist_ | Non.
| charset.conf | Fichier de configuration de l'extension _charset_ | Non. | charset.conf | Fichier de configuration de l'extension _charset_ | Non.
| exec.conf | Fichier de configuration de l'extension _exec_ | Non. | exec.conf | Fichier de configuration de l'extension _exec_ | Non.
@ -594,6 +593,7 @@ Les fichiers dans le répertoire principal de WeeChat sont :
| ruby.conf | Fichier de configuration de l'extension _ruby_ | Non. | ruby.conf | Fichier de configuration de l'extension _ruby_ | Non.
| script.conf | Fichier de configuration de l'extension _script_ | Non. | script.conf | Fichier de configuration de l'extension _script_ | Non.
| tcl.conf | Fichier de configuration de l'extension _tcl_ | Non. | tcl.conf | Fichier de configuration de l'extension _tcl_ | Non.
| spell.conf | Fichier de configuration de l'extension _spell_ | Non.
| trigger.conf | Fichier de configuration de l'extension _trigger_ | Possible, cela dépend des triggers. | trigger.conf | Fichier de configuration de l'extension _trigger_ | Possible, cela dépend des triggers.
| xfer.conf | Fichier de configuration de l'extension _xfer_ | Non. | xfer.conf | Fichier de configuration de l'extension _xfer_ | Non.
| weechat.log | Fichier de log WeeChat | Non. | weechat.log | Fichier de log WeeChat | Non.
@ -718,8 +718,8 @@ Autres objets (non utilisés dans des barres par défaut) :
[width="100%",cols="^3,^4,10",options="header"] [width="100%",cols="^3,^4,10",options="header"]
|=== |===
| Objet (item) | Exemple | Description | Objet (item) | Exemple | Description
| aspell_dict | `fr,en` | Dictionnaires utilisés pour la vérification de l'orthographe sur le tampon courant. | spell_dict | `fr,en` | Dictionnaires utilisés pour la vérification de l'orthographe sur le tampon courant.
| aspell_suggest | `print,prone,prune` | Suggestions pour le mot sous le curseur (si mal orthographié). | spell_suggest | `print,prone,prune` | Suggestions pour le mot sous le curseur (si mal orthographié).
| buffer_count | `10` | Nombre total de tampons ouverts. | buffer_count | `10` | Nombre total de tampons ouverts.
| buffer_short_name | `#test` | Nom court du tampon courant. | buffer_short_name | `#test` | Nom court du tampon courant.
| irc_channel | `#test` | Nom de canal IRC courant. | irc_channel | `#test` | Nom de canal IRC courant.
@ -1670,7 +1670,7 @@ avec `/help buffer_autoset`.
| kbd:[Alt+d] | Effacer le mot suivant (la chaîne supprimée est copiée dans le presse-papiers interne). | `/input delete_next_word` | kbd:[Alt+d] | Effacer le mot suivant (la chaîne supprimée est copiée dans le presse-papiers interne). | `/input delete_next_word`
| kbd:[Alt+k] | Capturer une touche et insérer son code (et la commande associée si la commande existe) sur la ligne de commande. | `/input grab_key_command` | kbd:[Alt+k] | Capturer une touche et insérer son code (et la commande associée si la commande existe) sur la ligne de commande. | `/input grab_key_command`
| kbd:[Alt+r] | Effacer entièrement la ligne de commande. | `/input delete_line` | kbd:[Alt+r] | Effacer entièrement la ligne de commande. | `/input delete_line`
| kbd:[Alt+s] | Activer/désactiver aspell. | `/mute aspell toggle` | kbd:[Alt+s] | Activer/désactiver la vérification de l'orthographe. | `/mute spell toggle`
|=== |===
[[key_bindings_buffers_windows]] [[key_bindings_buffers_windows]]
@ -2159,7 +2159,6 @@ Les extensions par défaut sont :
|=== |===
| Extension | Description | Extension | Description
| alias | Définition d'alias pour les commandes. | alias | Définition d'alias pour les commandes.
| aspell | Vérification orthographique de la ligne de commande.
| buflist | Objet de barre avec la liste des tampons. | buflist | Objet de barre avec la liste des tampons.
| charset | Encodage/encodage avec jeu de caractère sur les tampons. | charset | Encodage/encodage avec jeu de caractère sur les tampons.
| exec | Exécution de commandes externes dans WeeChat. | exec | Exécution de commandes externes dans WeeChat.
@ -2177,6 +2176,7 @@ Les extensions par défaut sont :
| guile | Interface (API) pour scripts Guile (scheme). | guile | Interface (API) pour scripts Guile (scheme).
| javascript | Interface (API) pour scripts JavaScript. | javascript | Interface (API) pour scripts JavaScript.
| php | Interface (API) pour scripts PHP. | php | Interface (API) pour scripts PHP.
| spell | Vérification orthographique de la ligne de commande.
| trigger | Remplacement de texte et exécution de commande sur des évènements de WeeChat ou des extensions. | trigger | Remplacement de texte et exécution de commande sur des évènements de WeeChat ou des extensions.
| xfer | Transfert de fichier et discussion directe. | xfer | Transfert de fichier et discussion directe.
|=== |===
@ -2219,16 +2219,16 @@ Sections dans le fichier _alias.conf_ :
/set alias.completion.* | Complétions pour les alias. /set alias.completion.* | Complétions pour les alias.
|=== |===
[[aspell_plugin]] [[spell_plugin]]
=== Aspell === Spell
L'extension Aspell permet de vérifier l'orthographe de la ligne de commande. L'extension Spell permet de vérifier l'orthographe de la ligne de commande.
Il est possible d'utiliser plusieurs langages par tampon. Il est possible d'utiliser plusieurs langages par tampon.
La vérification de l'orthographe est désactivée par défaut et peut être La vérification de l'orthographe est désactivée par défaut et peut être
activée/désactivée avec la touche kbd:[Alt+s]. activée/désactivée avec la touche kbd:[Alt+s].
[[aspell_dictionaries]] [[spell_dictionaries]]
==== Dictionnaires ==== Dictionnaires
Avant d'utiliser la vérification de l'orthographe, les dictionnaires doivent Avant d'utiliser la vérification de l'orthographe, les dictionnaires doivent
@ -2240,26 +2240,26 @@ les mots dans tous les dictionnaires.
Par exemple pour utiliser l'anglais et le français : Par exemple pour utiliser l'anglais et le français :
---- ----
/set aspell.check.default_dict "en,fr" /set spell.check.default_dict "en,fr"
---- ----
Il est possible d'utiliser un dictionnaire différent sur un tampon spécifique, Il est possible d'utiliser un dictionnaire différent sur un tampon spécifique,
par exemple sur un canal allemand : par exemple sur un canal allemand :
---- ----
/aspell setdict de /spell setdict de
---- ----
Vous pouvez aussi spécifier un dictionnaire pour un groupe de tampons, par Vous pouvez aussi spécifier un dictionnaire pour un groupe de tampons, par
exemple l'anglais pour tous les canaux du serveur IRC freenode : exemple l'anglais pour tous les canaux du serveur IRC freenode :
---- ----
/set aspell.dict.irc.freenode en /set spell.dict.irc.freenode en
---- ----
Pour plus d'informations, voir la commande <<command_aspell_aspell,/aspell>>. Pour plus d'informations, voir la commande <<command_spell_spell,/spell>>.
[[aspell_speller_options]] [[spell_speller_options]]
==== Options du vérificateur d'orthographe ==== Options du vérificateur d'orthographe
Les options du vérificateur d'orthographe peuvent être définies en ajoutant des Les options du vérificateur d'orthographe peuvent être définies en ajoutant des
@ -2275,18 +2275,18 @@ $ aspell config
Par exemple, pour activer l'option "ignore-case" : Par exemple, pour activer l'option "ignore-case" :
---- ----
/set aspell.option.ignore-case "true" /set spell.option.ignore-case "true"
---- ----
[[aspell_suggestions]] [[spell_suggestions]]
==== Suggestions ==== Suggestions
Les suggestions sont affichées dans un objet de barre appelé "aspell_suggest". Les suggestions sont affichées dans un objet de barre appelé "spell_suggest".
Le nombre de suggestions est défini dans l'option _aspell.check.suggestions_. Le nombre de suggestions est défini dans l'option _spell.check.suggestions_.
Pour activer les suggestions, vous devez modifier l'option Pour activer les suggestions, vous devez modifier l'option
_aspell.check.suggestions_ avec un entier ≥ 0 et ajouter l'objet de barre _spell.check.suggestions_ avec un entier ≥ 0 et ajouter l'objet de barre
"aspell_suggest" à une barre, par exemple _status_. "spell_suggest" à une barre, par exemple _status_.
Exemple de suggestions avec un dictionnaire anglais (`en`) : Exemple de suggestions avec un dictionnaire anglais (`en`) :
@ -2304,30 +2304,30 @@ Exemple de suggestions avec des dictionnaires anglais et français (`en,fr`) :
└─────────────────────────────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────────────────────────────┘
.... ....
[[aspell_commands]] [[spell_commands]]
==== Commandes ==== Commandes
include::autogen/user/aspell_commands.adoc[] include::autogen/user/spell_commands.adoc[]
[[aspell_options]] [[spell_options]]
==== Options ==== Options
Sections dans le fichier _aspell.conf_ : Sections dans le fichier _spell.conf_ :
[width="100%",cols="3m,6m,16",options="header"] [width="100%",cols="3m,6m,16",options="header"]
|=== |===
| Section | Commande de contrôle | Description | Section | Commande de contrôle | Description
| color | /set aspell.color.* | Couleurs. | color | /set spell.color.* | Couleurs.
| check | /set aspell.check.* | Options pour contrôler la vérification orthographique. | check | /set spell.check.* | Options pour contrôler la vérification orthographique.
| dict | <<command_aspell_aspell,/aspell setdict>> + | dict | <<command_spell_spell,/spell setdict>> +
/set aspell.dict.* | Dictionnaires utilisés par tampon (les options peuvent être ajoutées/supprimées dans la section). /set spell.dict.* | Dictionnaires utilisés par tampon (les options peuvent être ajoutées/supprimées dans la section).
| look | /set aspell.look.* | Aspect/présentation. | look | /set spell.look.* | Aspect/présentation.
| option | /set aspell.option.* | <<aspell_speller_options,Options du vérificateur d'orthographe>> (les options peuvent être ajoutées/supprimées dans la section). | option | /set spell.option.* | <<spell_speller_options,Options du vérificateur d'orthographe>> (les options peuvent être ajoutées/supprimées dans la section).
|=== |===
Options : Options :
include::autogen/user/aspell_options.adoc[] include::autogen/user/spell_options.adoc[]
[[buflist_plugin]] [[buflist_plugin]]
=== Buflist === Buflist

View File

@ -10,10 +10,6 @@
| alias | alias_value | valore dell'alias | alias | alias_value | valore dell'alias
| aspell | aspell_dicts | elenco dei dizionari aspell installati
| aspell | aspell_langs | elenco di tutte lingue supportate da aspell
| exec | exec_commands_ids | ids (numbers and names) of executed commands | exec | exec_commands_ids | ids (numbers and names) of executed commands
| fset | fset_options | configuration files, sections, options and words of options | fset | fset_options | configuration files, sections, options and words of options
@ -86,6 +82,10 @@
| script | script_tags | tag degli script nel repository | script | script_tags | tag degli script nel repository
| spell | spell_dicts | list of installed dictionaries
| spell | spell_langs | list of all languages supported
| tcl | tcl_script | elenco degli script | tcl | tcl_script | elenco degli script
| trigger | trigger_hook_arguments | default arguments for a hook | trigger | trigger_hook_arguments | default arguments for a hook

View File

@ -6,8 +6,6 @@
|=== |===
| Plugin | Nome | Descrizione | Argomenti | Plugin | Nome | Descrizione | Argomenti
| aspell | aspell_dict | elenco separato da virgole di dizionari usati nel buffer | puntatore al buffer ("0x12345678") o buffer con il nome completo ("irc.freenode.weechat")
| fifo | fifo_filename | nome della pipe FIFO | - | fifo | fifo_filename | nome della pipe FIFO | -
| guile | guile_eval | evaluation of source code | source code to execute | guile | guile_eval | evaluation of source code | source code to execute
@ -74,6 +72,8 @@
| ruby | ruby_version | version of the interpreter used | - | ruby | ruby_version | version of the interpreter used | -
| spell | spell_dict | elenco separato da virgole di dizionari usati nel buffer | puntatore al buffer ("0x12345678") o buffer con il nome completo ("irc.freenode.weechat")
| tcl | tcl_eval | evaluation of source code | source code to execute | tcl | tcl_eval | evaluation of source code | source code to execute
| tcl | tcl_interpreter | name of the interpreter used | - | tcl | tcl_interpreter | name of the interpreter used | -

View File

@ -6,7 +6,7 @@
. logger (14000) . logger (14000)
. exec (13000) . exec (13000)
. trigger (12000) . trigger (12000)
. aspell (11000) . spell (11000)
. alias (10000) . alias (10000)
. buflist (9000) . buflist (9000)
. fifo (8000) . fifo (8000)

View File

@ -1,32 +0,0 @@
//
// This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND!
//
[[command_aspell_aspell]]
* `+aspell+`: configurazione del plugin aspell
----
/aspell enable|disable|toggle
listdict
setdict <dizionario>[,<dizionario>...]
deldict
addword [<dizionario>] <parola>
enable: enable aspell
disable: disable aspell
toggle: toggle aspell
listdict: show installed dictionaries
setdict: set dictionary for current buffer (multiple dictionaries can be separated by a comma)
deldict: delete dictionary used on current buffer
addword: add a word in personal aspell dictionary
Input line beginning with a '/' is not checked, except for some commands (see /set aspell.check.commands).
To enable aspell on all buffers, use option "default_dict", then enable aspell, for example:
/set aspell.check.default_dict "en"
/aspell enable
To display a list of suggestions in a bar, use item "aspell_suggest".
Default key to toggle aspell is alt-s.
----

View File

@ -0,0 +1,32 @@
//
// This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND!
//
[[command_spell_spell]]
* `+spell+`: spell plugin configuration
----
/spell enable|disable|toggle
listdict
setdict <dizionario>[,<dizionario>...]
deldict
addword [<dizionario>] <parola>
enable: enable spell checker
disable: disable spell checker
toggle: toggle spell checker
listdict: show installed dictionaries
setdict: set dictionary for current buffer (multiple dictionaries can be separated by a comma)
deldict: delete dictionary used on current buffer
addword: add a word in personal dictionary
Input line beginning with a '/' is not checked, except for some commands (see /set spell.check.commands).
To enable spell checker on all buffers, use option "default_dict", then enable spell checker, for example:
/set spell.check.default_dict "en"
/spell enable
To display a list of suggestions in a bar, use item "spell_suggest".
Default key to toggle spell checker is alt-s.
----

View File

@ -2,80 +2,80 @@
// This file is auto-generated by script docgen.py. // This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND! // DO NOT EDIT BY HAND!
// //
* [[option_aspell.check.commands]] *aspell.check.commands* * [[option_spell.check.commands]] *spell.check.commands*
** descrizione: pass:none[elenco separato da virgole di comandi per cui il controllo ortografico è abilitato (il controllo ortografico è disabilitato per tutti gli altri comandi)] ** descrizione: pass:none[elenco separato da virgole di comandi per cui il controllo ortografico è abilitato (il controllo ortografico è disabilitato per tutti gli altri comandi)]
** tipo: stringa ** tipo: stringa
** valori: qualsiasi stringa ** valori: qualsiasi stringa
** valore predefinito: `+"ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic"+` ** valore predefinito: `+"ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic"+`
* [[option_aspell.check.default_dict]] *aspell.check.default_dict* * [[option_spell.check.default_dict]] *spell.check.default_dict*
** descrizione: pass:none[dizionario predefinito (o elenco separato da virgole di dizionari) da usare quando il buffer non ha alcun dizionario definito (vuoto per disabilitare il controllo ortografico sui buffer in cui non è stato esplicitamente abilitato)] ** descrizione: pass:none[default dictionary (or comma separated list of dictionaries) to use when buffer has no dictionary defined (leave blank to disable spell checker on buffers for which you didn't explicitly enabled it)]
** tipo: stringa ** tipo: stringa
** valori: qualsiasi stringa ** valori: qualsiasi stringa
** valore predefinito: `+""+` ** valore predefinito: `+""+`
* [[option_aspell.check.during_search]] *aspell.check.during_search* * [[option_spell.check.during_search]] *spell.check.during_search*
** descrizione: pass:none[controlla le parole durante la ricerca del testo nel buffer] ** descrizione: pass:none[controlla le parole durante la ricerca del testo nel buffer]
** tipo: bool ** tipo: bool
** valori: on, off ** valori: on, off
** valore predefinito: `+off+` ** valore predefinito: `+off+`
* [[option_aspell.check.enabled]] *aspell.check.enabled* * [[option_spell.check.enabled]] *spell.check.enabled*
** descrizione: pass:none[abilita il controllo aspell per la riga di comando] ** descrizione: pass:none[enable spell checker for command line]
** tipo: bool ** tipo: bool
** valori: on, off ** valori: on, off
** valore predefinito: `+off+` ** valore predefinito: `+off+`
* [[option_aspell.check.real_time]] *aspell.check.real_time* * [[option_spell.check.real_time]] *spell.check.real_time*
** descrizione: pass:none[controllo ortografico in tempo reale (più lento, disabilitato per default: le parole vengono controllate solo se seguite da un delimitatore)] ** descrizione: pass:none[controllo ortografico in tempo reale (più lento, disabilitato per default: le parole vengono controllate solo se seguite da un delimitatore)]
** tipo: bool ** tipo: bool
** valori: on, off ** valori: on, off
** valore predefinito: `+off+` ** valore predefinito: `+off+`
* [[option_aspell.check.suggestions]] *aspell.check.suggestions* * [[option_spell.check.suggestions]] *spell.check.suggestions*
** descrizione: pass:none[numero di suggerimenti da mostrare nell'elemento barra "aspell_suggest" per ogni dizionario impostato nel buffer (-1 = disattiva suggerimenti, 0 = mostra tutti i possibili suggerimenti in tutte le lingue)] ** descrizione: pass:none[number of suggestions to display in bar item "spell_suggest" for each dictionary set in buffer (-1 = disable suggestions, 0 = display all possible suggestions in all languages)]
** tipo: intero ** tipo: intero
** valori: -1 .. 2147483647 ** valori: -1 .. 2147483647
** valore predefinito: `+-1+` ** valore predefinito: `+-1+`
* [[option_aspell.check.word_min_length]] *aspell.check.word_min_length* * [[option_spell.check.word_min_length]] *spell.check.word_min_length*
** descrizione: pass:none[lunghezza minima per una parola da controllare (0 per controllarle tutte)] ** descrizione: pass:none[lunghezza minima per una parola da controllare (0 per controllarle tutte)]
** tipo: intero ** tipo: intero
** valori: 0 .. 2147483647 ** valori: 0 .. 2147483647
** valore predefinito: `+2+` ** valore predefinito: `+2+`
* [[option_aspell.color.misspelled]] *aspell.color.misspelled* * [[option_spell.color.misspelled]] *spell.color.misspelled*
** descrizione: pass:none[text color for misspelled words (input bar)] ** descrizione: pass:none[text color for misspelled words (input bar)]
** tipo: colore ** tipo: colore
** valori: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline ** valori: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline
** valore predefinito: `+lightred+` ** valore predefinito: `+lightred+`
* [[option_aspell.color.suggestion]] *aspell.color.suggestion* * [[option_spell.color.suggestion]] *spell.color.suggestion*
** descrizione: pass:none[text color for suggestion on a misspelled word in bar item "aspell_suggest"] ** descrizione: pass:none[text color for suggestion on a misspelled word in bar item "spell_suggest"]
** tipo: colore ** tipo: colore
** valori: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline ** valori: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline
** valore predefinito: `+default+` ** valore predefinito: `+default+`
* [[option_aspell.color.suggestion_delimiter_dict]] *aspell.color.suggestion_delimiter_dict* * [[option_spell.color.suggestion_delimiter_dict]] *spell.color.suggestion_delimiter_dict*
** descrizione: pass:none[text color for delimiters displayed between two dictionaries in bar item "aspell_suggest"] ** descrizione: pass:none[text color for delimiters displayed between two dictionaries in bar item "spell_suggest"]
** tipo: colore ** tipo: colore
** valori: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline ** valori: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline
** valore predefinito: `+cyan+` ** valore predefinito: `+cyan+`
* [[option_aspell.color.suggestion_delimiter_word]] *aspell.color.suggestion_delimiter_word* * [[option_spell.color.suggestion_delimiter_word]] *spell.color.suggestion_delimiter_word*
** descrizione: pass:none[text color for delimiters displayed between two words in bar item "aspell_suggest"] ** descrizione: pass:none[text color for delimiters displayed between two words in bar item "spell_suggest"]
** tipo: colore ** tipo: colore
** valori: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline ** valori: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline
** valore predefinito: `+cyan+` ** valore predefinito: `+cyan+`
* [[option_aspell.look.suggestion_delimiter_dict]] *aspell.look.suggestion_delimiter_dict* * [[option_spell.look.suggestion_delimiter_dict]] *spell.look.suggestion_delimiter_dict*
** descrizione: pass:none[delimiter displayed between two dictionaries in bar item "aspell_suggest"] ** descrizione: pass:none[delimiter displayed between two dictionaries in bar item "spell_suggest"]
** tipo: stringa ** tipo: stringa
** valori: qualsiasi stringa ** valori: qualsiasi stringa
** valore predefinito: `+" / "+` ** valore predefinito: `+" / "+`
* [[option_aspell.look.suggestion_delimiter_word]] *aspell.look.suggestion_delimiter_word* * [[option_spell.look.suggestion_delimiter_word]] *spell.look.suggestion_delimiter_word*
** descrizione: pass:none[delimiter displayed between two words in bar item "aspell_suggest"] ** descrizione: pass:none[delimiter displayed between two words in bar item "spell_suggest"]
** tipo: stringa ** tipo: stringa
** valori: qualsiasi stringa ** valori: qualsiasi stringa
** valore predefinito: `+","+` ** valore predefinito: `+","+`

View File

@ -11,9 +11,6 @@ $HOME/.weechat/sec.conf::
$HOME/.weechat/alias.conf:: $HOME/.weechat/alias.conf::
configuration file for _alias_ plugin configuration file for _alias_ plugin
$HOME/.weechat/aspell.conf::
configuration file for _aspell_ plugin
$HOME/.weechat/buflist.conf:: $HOME/.weechat/buflist.conf::
configuration file for _buflist_ plugin configuration file for _buflist_ plugin
@ -62,6 +59,9 @@ $HOME/.weechat/ruby.conf::
$HOME/.weechat/script.conf:: $HOME/.weechat/script.conf::
configuration file for _script_ plugin configuration file for _script_ plugin
$HOME/.weechat/spell.conf::
configuration file for _spell_ plugin
$HOME/.weechat/tcl.conf:: $HOME/.weechat/tcl.conf::
configuration file for _tcl_ plugin configuration file for _tcl_ plugin

View File

@ -1041,16 +1041,21 @@ $ curl -O https://weechat.org/files/plugins.xml.gz
---- ----
// TRANSLATION MISSING // TRANSLATION MISSING
[[aspell_dictionaries]] [[spell_dictionaries]]
=== I installed aspell dictionaries on my system, how can I use them without restarting WeeChat? === I installed aspell dictionaries on my system, how can I use them without restarting WeeChat?
// TRANSLATION MISSING // TRANSLATION MISSING
You have to reload the aspell plugin: You have to reload the spell plugin:
---- ----
/plugin reload aspell /plugin reload spell
---- ----
// TRANSLATION MISSING
[NOTE]
With WeeChat ≤ 2.3, the "spell" plugin was named "aspell", so the command is:
`/plugin reload aspell`.
[[settings]] [[settings]]
== Impostazioni == Impostazioni
@ -1083,8 +1088,8 @@ Esistono diversi trucchi per ottimizzare l'uso della memoria:
* utilizzare l'ultima versione stabile (si suppone che abbia meno falle di memoria * utilizzare l'ultima versione stabile (si suppone che abbia meno falle di memoria
rispetto le versioni precedenti) rispetto le versioni precedenti)
// TRANSLATION MISSING // TRANSLATION MISSING
* non caricare alcuni plugin se non vengono utilizzati, ad esempio: aspell, buflist, * non caricare alcuni plugin se non vengono utilizzati, ad esempio: buflist,
fifo, logger, perl, python, ruby, lua, tcl, guile, javascript, php, xfer (usato per DCC). fifo, logger, perl, python, ruby, lua, tcl, guile, javascript, php, spell, xfer (usato per DCC).
See `/help weechat.plugin.autoload`. See `/help weechat.plugin.autoload`.
* caricare solo gli script veramente necessari * caricare solo gli script veramente necessari
* non caricare i certificati se SSL *NON* viene usato: usare una stringa vuota nell'opzione * non caricare i certificati se SSL *NON* viene usato: usare una stringa vuota nell'opzione
@ -1105,7 +1110,7 @@ You can follow same tips as for <<memory_usage,memory>>, and these ones:
`/set weechat.look.item_time_format "%H:%M"` (this is the default value) `/set weechat.look.item_time_format "%H:%M"` (this is the default value)
// TRANSLATION MISSING // TRANSLATION MISSING
* disable real time check of misspelled words in command line (if you enabled it): * disable real time check of misspelled words in command line (if you enabled it):
`/set aspell.check.real_time off` `/set spell.check.real_time off`
* set the _TZ_ variable (for example: `export TZ="Europe/Paris"`), to prevent * set the _TZ_ variable (for example: `export TZ="Europe/Paris"`), to prevent
frequent access to file _/etc/localtime_ frequent access to file _/etc/localtime_

View File

@ -9884,12 +9884,6 @@ List of signals sent by WeeChat and plugins:
|=== |===
| Plugin | Segnale | Argomenti | Descrizione | Plugin | Segnale | Argomenti | Descrizione
// TRANSLATION MISSING
| aspell | aspell_suggest +
_(WeeChat ≥ 0.4.0)_ |
Pointer: buffer. |
New suggestions for a misspelled word.
// TRANSLATION MISSING // TRANSLATION MISSING
| guile | guile_script_loaded + | guile | guile_script_loaded +
_(WeeChat ≥ 0.3.9)_ | _(WeeChat ≥ 0.3.9)_ |
@ -10234,6 +10228,12 @@ List of signals sent by WeeChat and plugins:
String: comma-separated list of scripts removed. | String: comma-separated list of scripts removed. |
Ruby script(s) removed. Ruby script(s) removed.
// TRANSLATION MISSING
| spell | spell_suggest +
_(WeeChat ≥ 2.4)_ |
Pointer: buffer. |
New suggestions for a misspelled word.
// TRANSLATION MISSING // TRANSLATION MISSING
| tcl | tcl_script_loaded + | tcl | tcl_script_loaded +
_(WeeChat ≥ 0.3.9)_ | _(WeeChat ≥ 0.3.9)_ |

View File

@ -130,7 +130,7 @@ compilare WeeChat.
| gettext | | | Internazionalizzazione (traduzione dei messaggi; la lingua base è l'inglese). | gettext | | | Internazionalizzazione (traduzione dei messaggi; la lingua base è l'inglese).
| ca-certificates | | | Certificati per le connessioni SSL. | ca-certificates | | | Certificati per le connessioni SSL.
| libaspell-dev | libaspell-dev
∥ libenchant-dev | | | Plugin aspell. ∥ libenchant-dev | | | Plugin spell.
| python-dev | ≥ 2.6 ^(4)^ | | Plugin python. | python-dev | ≥ 2.6 ^(4)^ | | Plugin python.
| libperl-dev | | | Plugin perl. | libperl-dev | | | Plugin perl.
| ruby2.5, ruby2.5-dev | ≥ 1.8 | | Plugin ruby. | ruby2.5, ruby2.5-dev | ≥ 1.8 | | Plugin ruby.
@ -226,9 +226,6 @@ List of commonly used options:
| ENABLE_ALIAS | `ON`, `OFF` | ON | | ENABLE_ALIAS | `ON`, `OFF` | ON |
Compile <<alias_plugin,Alias plugin>>. Compile <<alias_plugin,Alias plugin>>.
| ENABLE_ASPELL | `ON`, `OFF` | ON |
Compile <<aspell_plugin,Aspell plugin>>.
| ENABLE_BUFLIST | `ON`, `OFF` | ON | | ENABLE_BUFLIST | `ON`, `OFF` | ON |
Compile <<buflist_plugin,Buflist plugin>>. Compile <<buflist_plugin,Buflist plugin>>.
@ -244,7 +241,7 @@ List of commonly used options:
online). online).
| ENABLE_ENCHANT | `ON`, `OFF` | OFF | | ENABLE_ENCHANT | `ON`, `OFF` | OFF |
Compile <<aspell_plugin,Aspell plugin>> with Enchant. Compile <<spell_plugin,Spell plugin>> with Enchant.
| ENABLE_EXEC | `ON`, `OFF` | ON | | ENABLE_EXEC | `ON`, `OFF` | ON |
Compile <<exec_plugin,Exec plugin>>. Compile <<exec_plugin,Exec plugin>>.
@ -308,6 +305,9 @@ List of commonly used options:
Compile <<scripts_plugins,script plugins>> (Python, Perl, Ruby, Lua, Tcl, Compile <<scripts_plugins,script plugins>> (Python, Perl, Ruby, Lua, Tcl,
Guile, JavaScript, PHP). Guile, JavaScript, PHP).
| ENABLE_SPELL | `ON`, `OFF` | ON |
Compile <<spell_plugin,Spell plugin>>.
| ENABLE_TCL | `ON`, `OFF` | ON | | ENABLE_TCL | `ON`, `OFF` | ON |
Compile <<scripts_plugins,Tcl plugin>>. Compile <<scripts_plugins,Tcl plugin>>.
@ -611,7 +611,6 @@ The files in the WeeChat home directory are:
| sec.conf | Configuration file with secured data | *Yes, highly sensitive*: this file must never be shared with anyone. | sec.conf | Configuration file with secured data | *Yes, highly sensitive*: this file must never be shared with anyone.
| plugins.conf | Plugins configuration file | Possible, depends on plugins/scripts. | plugins.conf | Plugins configuration file | Possible, depends on plugins/scripts.
| alias.conf | Configuration file for _alias_ plugin | Possible, depends on aliases. | alias.conf | Configuration file for _alias_ plugin | Possible, depends on aliases.
| aspell.conf | Configuration file for _aspell_ plugin | No.
| buflist.conf | Configuration file for _buflist_ plugin | No. | buflist.conf | Configuration file for _buflist_ plugin | No.
| charset.conf | Configuration file for _charset_ plugin | No. | charset.conf | Configuration file for _charset_ plugin | No.
| exec.conf | Configuration file for _exec_ plugin | No. | exec.conf | Configuration file for _exec_ plugin | No.
@ -628,6 +627,7 @@ The files in the WeeChat home directory are:
| relay.conf | Configuration file for _relay_ plugin | No. | relay.conf | Configuration file for _relay_ plugin | No.
| ruby.conf | Configuration file for _ruby_ plugin | No. | ruby.conf | Configuration file for _ruby_ plugin | No.
| script.conf | Configuration file for _script_ plugin | No. | script.conf | Configuration file for _script_ plugin | No.
| spell.conf | Configuration file for _spell_ plugin | No.
| tcl.conf | Configuration file for _tcl_ plugin | No. | tcl.conf | Configuration file for _tcl_ plugin | No.
| trigger.conf | Configuration file for _trigger_ plugin | Possible, depends on triggers. | trigger.conf | Configuration file for _trigger_ plugin | Possible, depends on triggers.
| xfer.conf | Configuration file for _xfer_ plugin | No. | xfer.conf | Configuration file for _xfer_ plugin | No.
@ -763,8 +763,8 @@ Other items available (not used in bars by default):
[width="100%",cols="^3,^4,10",options="header"] [width="100%",cols="^3,^4,10",options="header"]
|=== |===
| Item | Example | Description | Item | Example | Description
| aspell_dict | `fr,en` | Spelling dictionaries used on current buffer. | spell_dict | `fr,en` | Spelling dictionaries used on current buffer.
| aspell_suggest | `print,prone,prune` | Spelling suggestions for word under cursor (if misspelled). | spell_suggest | `print,prone,prune` | Spelling suggestions for word under cursor (if misspelled).
| buffer_count | `10` | Total number of buffers opened. | buffer_count | `10` | Total number of buffers opened.
| buffer_short_name | `#test` | Current buffer short name. | buffer_short_name | `#test` | Current buffer short name.
| irc_channel | `#test` | Current IRC channel name. | irc_channel | `#test` | Current IRC channel name.
@ -1711,7 +1711,8 @@ with `/script install buffer_autoset.py` and get help with `/help buffer_autoset
| kbd:[Alt+d] | Elimina la parola successiva nella riga di comando (deleted string is copied to the internal clipboard). | `/input delete_next_word` | kbd:[Alt+d] | Elimina la parola successiva nella riga di comando (deleted string is copied to the internal clipboard). | `/input delete_next_word`
| kbd:[Alt+k] | Cattura un tasto ed inserisce il suo codice (e il comando associato se il tasto esiste) nella riga di comando. | `/input grab_key_command` | kbd:[Alt+k] | Cattura un tasto ed inserisce il suo codice (e il comando associato se il tasto esiste) nella riga di comando. | `/input grab_key_command`
| kbd:[Alt+r] | Elimina l'intera riga di comando. | `/input delete_line` | kbd:[Alt+r] | Elimina l'intera riga di comando. | `/input delete_line`
| kbd:[Alt+s] | Abilita/disabilita aspell. | `/mute aspell toggle` // TRANSLATION MISSING
| kbd:[Alt+s] | Toggle spell checker. | `/mute spell toggle`
|=== |===
[[key_bindings_buffers_windows]] [[key_bindings_buffers_windows]]
@ -2217,7 +2218,6 @@ I plugin predefiniti sono:
|=== |===
| Plugin | Descrizione | Plugin | Descrizione
| alias | Definisce gli alias per i comandi. | alias | Definisce gli alias per i comandi.
| aspell | Controllo ortografico per la riga di comando.
// TRANSLATION MISSING // TRANSLATION MISSING
| buflist | Bar item with list of buffers. | buflist | Bar item with list of buffers.
| charset | Set di caratteri per la codifica/decodifica nei buffer. | charset | Set di caratteri per la codifica/decodifica nei buffer.
@ -2238,6 +2238,7 @@ I plugin predefiniti sono:
| guile | API per lo scripting in Guile (scheme). | guile | API per lo scripting in Guile (scheme).
| javascript | API per lo scripting in JavaScript. | javascript | API per lo scripting in JavaScript.
| php | API per lo scripting in PHP. | php | API per lo scripting in PHP.
| spell | Controllo ortografico per la riga di comando.
// TRANSLATION MISSING // TRANSLATION MISSING
| trigger | Text replacement and command execution on events triggered by WeeChat/plugins. | trigger | Text replacement and command execution on events triggered by WeeChat/plugins.
| xfer | Trasferimento file e chat diretta. | xfer | Trasferimento file e chat diretta.
@ -2284,17 +2285,17 @@ Sections in file _alias.conf_:
/set alias.completion.* | Completions for aliases. /set alias.completion.* | Completions for aliases.
|=== |===
[[aspell_plugin]] [[spell_plugin]]
=== Aspell === Spell
Il plugin Aspell consente di verificare l'ortografia nella riga di comando. Il plugin Spell consente di verificare l'ortografia nella riga di comando.
È possibile utilizzare più lingue per buffer. È possibile utilizzare più lingue per buffer.
// TRANSLATION MISSING // TRANSLATION MISSING
Spell checking is disabled by default and can be toggled with key kbd:[Alt+s]. Spell checking is disabled by default and can be toggled with key kbd:[Alt+s].
// TRANSLATION MISSING // TRANSLATION MISSING
[[aspell_dictionaries]] [[spell_dictionaries]]
==== Dictionaries ==== Dictionaries
Before using spell checking, dictionaries must be defined, either globally or Before using spell checking, dictionaries must be defined, either globally or
@ -2306,14 +2307,14 @@ dictionaries.
For example to use English and French: For example to use English and French:
---- ----
/set aspell.check.default_dict "en,fr" /set spell.check.default_dict "en,fr"
---- ----
It is possible to use a different dictionary on a specific buffer, for example It is possible to use a different dictionary on a specific buffer, for example
on a German channel: on a German channel:
---- ----
/aspell setdict de /spell setdict de
---- ----
// TRANSLATION MISSING // TRANSLATION MISSING
@ -2321,12 +2322,12 @@ You can also specify a dictionary for a group of buffers, for example English
for all channels on freenode IRC server: for all channels on freenode IRC server:
---- ----
/set aspell.dict.irc.freenode en /set spell.dict.irc.freenode en
---- ----
For more information, see the command <<command_aspell_aspell,/aspell>>. For more information, see the command <<command_spell_spell,/spell>>.
[[aspell_speller_options]] [[spell_speller_options]]
==== Opzioni ortografiche ==== Opzioni ortografiche
Le opzioni ortografiche possono essere definite aggiungendo opzioni nella Le opzioni ortografiche possono essere definite aggiungendo opzioni nella
@ -2342,18 +2343,18 @@ $ aspell config
Ad esempio, per abilitare l'opzione "ignore-case": Ad esempio, per abilitare l'opzione "ignore-case":
---- ----
/set aspell.option.ignore-case "true" /set spell.option.ignore-case "true"
---- ----
// TRANSLATION MISSING // TRANSLATION MISSING
[[aspell_suggestions]] [[spell_suggestions]]
==== Suggestions ==== Suggestions
Suggestions are displayed in a bar item called "aspell_suggest". The number of Suggestions are displayed in a bar item called "spell_suggest". The number of
suggestions is set in option _aspell.check.suggestions_. suggestions is set in option _spell.check.suggestions_.
To enable suggestions you must set option _aspell.check.suggestions_ to an To enable suggestions you must set option _spell.check.suggestions_ to an
integer ≥ 0 and add the bar item "aspell_suggest" to a bar, like _status_. integer ≥ 0 and add the bar item "spell_suggest" to a bar, like _status_.
Example of suggestions with English dictionary (`en`): Example of suggestions with English dictionary (`en`):
@ -2371,33 +2372,33 @@ Example of suggestions with English and French dictionaries (`en,fr`):
└─────────────────────────────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────────────────────────────┘
.... ....
[[aspell_commands]] [[spell_commands]]
==== Comandi ==== Comandi
include::autogen/user/aspell_commands.adoc[] include::autogen/user/spell_commands.adoc[]
[[aspell_options]] [[spell_options]]
==== Opzioni ==== Opzioni
// TRANSLATION MISSING // TRANSLATION MISSING
Sections in file _aspell.conf_: Sections in file _spell.conf_:
// TRANSLATION MISSING // TRANSLATION MISSING
[width="100%",cols="3m,6m,16",options="header"] [width="100%",cols="3m,6m,16",options="header"]
|=== |===
| Section | Control command | Description | Section | Control command | Description
| color | /set aspell.color.* | Colors. | color | /set spell.color.* | Colors.
| check | /set aspell.check.* | Options to control spell checking. | check | /set spell.check.* | Options to control spell checking.
| dict | <<command_aspell_aspell,/aspell setdict>> + | dict | <<command_spell_spell,/spell setdict>> +
/set aspell.dict.* | Dictionaries used by buffer (options can be added/removed in section). /set spell.dict.* | Dictionaries used by buffer (options can be added/removed in section).
| look | /set aspell.look.* | Look and feel. | look | /set spell.look.* | Look and feel.
| option | /set aspell.option.* | <<aspell_speller_options,Opzioni ortografiche>> (options can be added/removed in section). | option | /set spell.option.* | <<spell_speller_options,Opzioni ortografiche>> (options can be added/removed in section).
|=== |===
// TRANSLATION MISSING // TRANSLATION MISSING
Options: Options:
include::autogen/user/aspell_options.adoc[] include::autogen/user/spell_options.adoc[]
[[buflist_plugin]] [[buflist_plugin]]
=== Buflist === Buflist

View File

@ -10,10 +10,6 @@
| alias | alias_value | 別名の値 | alias | alias_value | 別名の値
| aspell | aspell_dicts | aspell のインストール済み辞書のリスト
| aspell | aspell_langs | aspell でサポートされる全ての言語のリスト
| exec | exec_commands_ids | 実行されたコマンドの識別子 (番号と名前) | exec | exec_commands_ids | 実行されたコマンドの識別子 (番号と名前)
| fset | fset_options | 設定ファイル、セクション、オプションの名前、オプションの値 | fset | fset_options | 設定ファイル、セクション、オプションの名前、オプションの値
@ -86,6 +82,10 @@
| script | script_tags | リポジトリに存在するスクリプトに対するタグのリスト | script | script_tags | リポジトリに存在するスクリプトに対するタグのリスト
| spell | spell_dicts | list of installed dictionaries
| spell | spell_langs | list of all languages supported
| tcl | tcl_script | スクリプトのリスト | tcl | tcl_script | スクリプトのリスト
| trigger | trigger_hook_arguments | フックに対するデフォルト引数 | trigger | trigger_hook_arguments | フックに対するデフォルト引数

View File

@ -6,8 +6,6 @@
|=== |===
| プラグイン | 名前 | 説明 | 引数 | プラグイン | 名前 | 説明 | 引数
| aspell | aspell_dict | バッファで使用中の辞書のコンマ区切りリスト | バッファポインタ ("0x12345678") またはバッファのフルネーム ("irc.freenode.#weechat")
| fifo | fifo_filename | FIFO パイプの名前 | - | fifo | fifo_filename | FIFO パイプの名前 | -
| guile | guile_eval | ソースコードの評価 | 実行するソースコード | guile | guile_eval | ソースコードの評価 | 実行するソースコード
@ -74,6 +72,8 @@
| ruby | ruby_version | 使用中のインタプリタのバージョン | - | ruby | ruby_version | 使用中のインタプリタのバージョン | -
| spell | spell_dict | バッファで使用中の辞書のコンマ区切りリスト | バッファポインタ ("0x12345678") またはバッファのフルネーム ("irc.freenode.#weechat")
| tcl | tcl_eval | ソースコードの評価 | 実行するソースコード | tcl | tcl_eval | ソースコードの評価 | 実行するソースコード
| tcl | tcl_interpreter | 使用中のインタプリタの名前 | - | tcl | tcl_interpreter | 使用中のインタプリタの名前 | -

View File

@ -6,7 +6,7 @@
. logger (14000) . logger (14000)
. exec (13000) . exec (13000)
. trigger (12000) . trigger (12000)
. aspell (11000) . spell (11000)
. alias (10000) . alias (10000)
. buflist (9000) . buflist (9000)
. fifo (8000) . fifo (8000)

View File

@ -1,32 +0,0 @@
//
// This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND!
//
[[command_aspell_aspell]]
* `+aspell+`: aspell プラグイン設定
----
/aspell enable|disable|toggle
listdict
setdict <dict>[,<dict>...]
deldict
addword [<dict>] <word>
enable: aspell の有効化
disable: aspell の無効化
toggle: aspell の有効無効を切り替え
listdict: インストール済み辞書を表示
setdict: 現在のバッファ用の辞書を設定 (コンマで区切れば複数の辞書を指定可能)
deldict: 現在のバッファ用の辞書を削除
addword: aspell の個人辞書に単語を追加
いくつかのコマンドを除いて '/' で始まる入力行はチェックされません (/set aspell.check.commands を参照してください)。
全てのバッファで aspell を有効化するには、"default_dict" オプションを設定した後に、aspell を有効化してください。例:
/set aspell.check.default_dict "en"
/aspell enable
バーの中に提案のリストを表示するには、"aspell_suggest" 要素を使ってください。
aspell の有効無効を切り替えるデフォルトのキーは alt-s です。
----

View File

@ -0,0 +1,32 @@
//
// This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND!
//
[[command_spell_spell]]
* `+spell+`: spell plugin configuration
----
/spell enable|disable|toggle
listdict
setdict <dict>[,<dict>...]
deldict
addword [<dict>] <word>
enable: enable spell checker
disable: disable spell checker
toggle: toggle spell checker
listdict: show installed dictionaries
setdict: set dictionary for current buffer (multiple dictionaries can be separated by a comma)
deldict: delete dictionary used on current buffer
addword: add a word in personal dictionary
Input line beginning with a '/' is not checked, except for some commands (see /set spell.check.commands).
To enable spell checker on all buffers, use option "default_dict", then enable spell checker, for example:
/set spell.check.default_dict "en"
/spell enable
To display a list of suggestions in a bar, use item "spell_suggest".
Default key to toggle spell checker is alt-s.
----

View File

@ -2,80 +2,80 @@
// This file is auto-generated by script docgen.py. // This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND! // DO NOT EDIT BY HAND!
// //
* [[option_aspell.check.commands]] *aspell.check.commands* * [[option_spell.check.commands]] *spell.check.commands*
** 説明: pass:none[スペルチェックを有効化するコマンドのコンマ区切りリスト (これ以外のコマンドではスペルチェックは無効)] ** 説明: pass:none[スペルチェックを有効化するコマンドのコンマ区切りリスト (これ以外のコマンドではスペルチェックは無効)]
** タイプ: 文字列 ** タイプ: 文字列
** 値: 未制約文字列 ** 値: 未制約文字列
** デフォルト値: `+"ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic"+` ** デフォルト値: `+"ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic"+`
* [[option_aspell.check.default_dict]] *aspell.check.default_dict* * [[option_spell.check.default_dict]] *spell.check.default_dict*
** 説明: pass:none[バッファに辞書が定義されていない場合に使用されるデフォルト辞書 (または辞書のコンマ区切りリスト) (空のままであれば明示的に有効化されたバッファを除いて aspell を利用しない)] ** 説明: pass:none[default dictionary (or comma separated list of dictionaries) to use when buffer has no dictionary defined (leave blank to disable spell checker on buffers for which you didn't explicitly enabled it)]
** タイプ: 文字列 ** タイプ: 文字列
** 値: 未制約文字列 ** 値: 未制約文字列
** デフォルト値: `+""+` ** デフォルト値: `+""+`
* [[option_aspell.check.during_search]] *aspell.check.during_search* * [[option_spell.check.during_search]] *spell.check.during_search*
** 説明: pass:none[バッファ内のテキスト検索中に単語チェックを行う] ** 説明: pass:none[バッファ内のテキスト検索中に単語チェックを行う]
** タイプ: ブール ** タイプ: ブール
** 値: on, off ** 値: on, off
** デフォルト値: `+off+` ** デフォルト値: `+off+`
* [[option_aspell.check.enabled]] *aspell.check.enabled* * [[option_spell.check.enabled]] *spell.check.enabled*
** 説明: pass:none[コマンドラインで aspell を利用する] ** 説明: pass:none[enable spell checker for command line]
** タイプ: ブール ** タイプ: ブール
** 値: on, off ** 値: on, off
** デフォルト値: `+off+` ** デフォルト値: `+off+`
* [[option_aspell.check.real_time]] *aspell.check.real_time* * [[option_spell.check.real_time]] *spell.check.real_time*
** 説明: pass:none[単語のリアルタイムスペルチェック (遅い、デフォルトでは無効: 単語は区切りの後にだけチェックされる)] ** 説明: pass:none[単語のリアルタイムスペルチェック (遅い、デフォルトでは無効: 単語は区切りの後にだけチェックされる)]
** タイプ: ブール ** タイプ: ブール
** 値: on, off ** 値: on, off
** デフォルト値: `+off+` ** デフォルト値: `+off+`
* [[option_aspell.check.suggestions]] *aspell.check.suggestions* * [[option_spell.check.suggestions]] *spell.check.suggestions*
** 説明: pass:none[バッファ内の各辞書セットに対してバー要素 "aspell_suggest" に表示する提案の数 (-1 = サジェスト機能を無効、0 = 全ての言語を使って全てのサジェスト結果を表示)] ** 説明: pass:none[number of suggestions to display in bar item "spell_suggest" for each dictionary set in buffer (-1 = disable suggestions, 0 = display all possible suggestions in all languages)]
** タイプ: 整数 ** タイプ: 整数
** 値: -1 .. 2147483647 ** 値: -1 .. 2147483647
** デフォルト値: `+-1+` ** デフォルト値: `+-1+`
* [[option_aspell.check.word_min_length]] *aspell.check.word_min_length* * [[option_spell.check.word_min_length]] *spell.check.word_min_length*
** 説明: pass:none[スペルチェックを行う単語長の最小値 (0 の場合は全ての単語をチェック)] ** 説明: pass:none[スペルチェックを行う単語長の最小値 (0 の場合は全ての単語をチェック)]
** タイプ: 整数 ** タイプ: 整数
** 値: 0 .. 2147483647 ** 値: 0 .. 2147483647
** デフォルト値: `+2+` ** デフォルト値: `+2+`
* [[option_aspell.color.misspelled]] *aspell.color.misspelled* * [[option_spell.color.misspelled]] *spell.color.misspelled*
** 説明: pass:none[スペルミスのある単語に付ける色 (入力バー)] ** 説明: pass:none[スペルミスのある単語に付ける色 (入力バー)]
** タイプ: 色 ** タイプ: 色
** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、端末色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、イタリックは "/"、下線は "_" ** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、端末色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、イタリックは "/"、下線は "_"
** デフォルト値: `+lightred+` ** デフォルト値: `+lightred+`
* [[option_aspell.color.suggestion]] *aspell.color.suggestion* * [[option_spell.color.suggestion]] *spell.color.suggestion*
** 説明: pass:none[バー要素 "aspell_suggest" 内のスペルミスのある単語に対する修正候補に付ける色] ** 説明: pass:none[text color for suggestion on a misspelled word in bar item "spell_suggest"]
** タイプ: 色 ** タイプ: 色
** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、端末色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、イタリックは "/"、下線は "_" ** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、端末色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、イタリックは "/"、下線は "_"
** デフォルト値: `+default+` ** デフォルト値: `+default+`
* [[option_aspell.color.suggestion_delimiter_dict]] *aspell.color.suggestion_delimiter_dict* * [[option_spell.color.suggestion_delimiter_dict]] *spell.color.suggestion_delimiter_dict*
** 説明: pass:none[バー要素 "aspell_suggest" 内の 2 つの辞書間の区切り文字に付ける色] ** 説明: pass:none[text color for delimiters displayed between two dictionaries in bar item "spell_suggest"]
** タイプ: 色 ** タイプ: 色
** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、端末色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、イタリックは "/"、下線は "_" ** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、端末色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、イタリックは "/"、下線は "_"
** デフォルト値: `+cyan+` ** デフォルト値: `+cyan+`
* [[option_aspell.color.suggestion_delimiter_word]] *aspell.color.suggestion_delimiter_word* * [[option_spell.color.suggestion_delimiter_word]] *spell.color.suggestion_delimiter_word*
** 説明: pass:none[バー要素 "aspell_suggest" 内の 2 つの単語間の区切り文字に付ける色] ** 説明: pass:none[text color for delimiters displayed between two words in bar item "spell_suggest"]
** タイプ: 色 ** タイプ: 色
** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、端末色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、イタリックは "/"、下線は "_" ** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、端末色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、イタリックは "/"、下線は "_"
** デフォルト値: `+cyan+` ** デフォルト値: `+cyan+`
* [[option_aspell.look.suggestion_delimiter_dict]] *aspell.look.suggestion_delimiter_dict* * [[option_spell.look.suggestion_delimiter_dict]] *spell.look.suggestion_delimiter_dict*
** 説明: pass:none[バー要素 "aspell_suggest" 内の 2 つの辞書間の区切り文字] ** 説明: pass:none[delimiter displayed between two dictionaries in bar item "spell_suggest"]
** タイプ: 文字列 ** タイプ: 文字列
** 値: 未制約文字列 ** 値: 未制約文字列
** デフォルト値: `+" / "+` ** デフォルト値: `+" / "+`
* [[option_aspell.look.suggestion_delimiter_word]] *aspell.look.suggestion_delimiter_word* * [[option_spell.look.suggestion_delimiter_word]] *spell.look.suggestion_delimiter_word*
** 説明: pass:none[バー要素 "aspell_suggest" 内の 2 つの単語間の区切り文字] ** 説明: pass:none[delimiter displayed between two words in bar item "spell_suggest"]
** タイプ: 文字列 ** タイプ: 文字列
** 値: 未制約文字列 ** 値: 未制約文字列
** デフォルト値: `+","+` ** デフォルト値: `+","+`

View File

@ -10,9 +10,6 @@ $HOME/.weechat/sec.conf::
$HOME/.weechat/alias.conf:: $HOME/.weechat/alias.conf::
_alias_ プラグイン用の設定ファイル _alias_ プラグイン用の設定ファイル
$HOME/.weechat/aspell.conf::
_aspell_ プラグイン用の設定ファイル
$HOME/.weechat/buflist.conf:: $HOME/.weechat/buflist.conf::
_buflist_ プラグイン用の設定ファイル _buflist_ プラグイン用の設定ファイル
@ -61,6 +58,9 @@ $HOME/.weechat/ruby.conf::
$HOME/.weechat/script.conf:: $HOME/.weechat/script.conf::
_script_ プラグイン用の設定ファイル _script_ プラグイン用の設定ファイル
$HOME/.weechat/spell.conf::
_spell_ プラグイン用の設定ファイル
$HOME/.weechat/tcl.conf:: $HOME/.weechat/tcl.conf::
_tcl_ プラグイン用の設定ファイル _tcl_ プラグイン用の設定ファイル

View File

@ -76,7 +76,6 @@ qweechat::
|          normal/ | curses インターフェース |          normal/ | curses インターフェース
|    plugins/ | プラグインとスクリプト向け API |    plugins/ | プラグインとスクリプト向け API
|       alias/ | alias プラグイン |       alias/ | alias プラグイン
|       aspell/ | aspell プラグイン
|       buflist/ | buflist プラグイン |       buflist/ | buflist プラグイン
|       charset/ | charset プラグイン |       charset/ | charset プラグイン
|       exec/ | exec プラグイン |       exec/ | exec プラグイン
@ -93,6 +92,7 @@ qweechat::
|       relay/ | relay プラグイン (irc プロキシ + リモートインターフェース用の中継) |       relay/ | relay プラグイン (irc プロキシ + リモートインターフェース用の中継)
|       ruby/ | ruby スクリプト用 API |       ruby/ | ruby スクリプト用 API
|       script/ | スクリプトマネージャ |       script/ | スクリプトマネージャ
|       spell/ | spell プラグイン
|       tcl/ | tcl スクリプト用 API |       tcl/ | tcl スクリプト用 API
|       trigger/ | trigger プラグイン |       trigger/ | trigger プラグイン
|       xfer/ | xfer (IRC DCC ファイル/チャット) |       xfer/ | xfer (IRC DCC ファイル/チャット)
@ -229,14 +229,22 @@ WeeChat "core" は以下のディレクトリに配置されています:
|       alias-completion.c | alias 補完 |       alias-completion.c | alias 補完
|       alias-config.c | alias 設定オプション (alias.conf ファイル) |       alias-config.c | alias 設定オプション (alias.conf ファイル)
|       alias-info.c | alias の情報/インフォリスト/hdata |       alias-info.c | alias の情報/インフォリスト/hdata
|    aspell/ | aspell プラグイン // TRANSLATION MISSING
|       weechat-aspell.c | aspell の主要関数 |    spell/ | Spell checker plugin.
|       weechat-aspell-bar-item.c | aspell バー要素 // TRANSLATION MISSING
|       weechat-aspell-command.c | aspell コマンド |       spell.c | Main spell checker functions.
|       weechat-aspell-completion.c | aspell 補完 // TRANSLATION MISSING
|       weechat-aspell-config.c | aspell 設定オプション (aspell.conf ファイル) |       spell-bar-item.c | Spell checker bar items.
|       weechat-aspell-info.c | aspell の情報/インフォリスト/hdata // TRANSLATION MISSING
|       weechat-aspell-speller.c | スペルチェッカ管理 |       spell-command.c | Spell checker commands.
// TRANSLATION MISSING
|       spell-completion.c | Spell checker completions.
// TRANSLATION MISSING
|       spell-config.c | Spell checker config options (file spell.conf).
// TRANSLATION MISSING
|       spell-info.c | Spell checker info/infolists/hdata.
// TRANSLATION MISSING
|       spell-speller.c | Spellers management.
|    buflist/ | buflist プラグイン |    buflist/ | buflist プラグイン
|       buflist.c | buflist の主要関数 |       buflist.c | buflist の主要関数
|       buflist-bar-item.c | buflist バー要素 |       buflist-bar-item.c | buflist バー要素

View File

@ -953,15 +953,20 @@ $ cd ~/.weechat/script
$ curl -O https://weechat.org/files/plugins.xml.gz $ curl -O https://weechat.org/files/plugins.xml.gz
---- ----
[[aspell_dictionaries]] [[spell_dictionaries]]
=== システムに aspell 辞書をインストールした後、WeeChat を再起動せずにそれを使う方法を教えてください。 === システムに aspell 辞書をインストールした後、WeeChat を再起動せずにそれを使う方法を教えてください。
aspell プラグインをリロードしてください: spell プラグインをリロードしてください:
---- ----
/plugin reload aspell /plugin reload spell
---- ----
// TRANSLATION MISSING
[NOTE]
With WeeChat ≤ 2.3, the "spell" plugin was named "aspell", so the command is:
`/plugin reload aspell`.
[[settings]] [[settings]]
== 設定 == 設定
@ -992,7 +997,7 @@ aspell プラグインをリロードしてください:
* 最新の安定版を使う * 最新の安定版を使う
(古いバージョンよりもメモリリークの可能性が減ると思われます) (古いバージョンよりもメモリリークの可能性が減ると思われます)
* 使わないプラグインのロードを禁止する、例えば: * 使わないプラグインのロードを禁止する、例えば:
aspell、buflist、fifo、logger、perl、python、ruby、lua、tcl、guile、javascript、php、xfer (DCC で使用)。 buflist、fifo、logger、perl、python、ruby、lua、tcl、guile、javascript、php、spell、xfer (DCC で使用)。
`/help weechat.plugin.autoload` を参照してください。 `/help weechat.plugin.autoload` を参照してください。
* 本当に必要なスクリプトだけをロード * 本当に必要なスクリプトだけをロード
* SSL を *使わない* なら、証明書を読み込まないでください: オプション * SSL を *使わない* なら、証明書を読み込まないでください: オプション
@ -1010,7 +1015,7 @@ aspell プラグインをリロードしてください:
* ステータスバー時間に秒の表示を止める: * ステータスバー時間に秒の表示を止める:
`/set weechat.look.item_time_format "%H:%M"` (これはデフォルト値です) `/set weechat.look.item_time_format "%H:%M"` (これはデフォルト値です)
* コマンドライン内の単語スペルミスのリアルタイムチェックを無効にする (有効にしていた場合): * コマンドライン内の単語スペルミスのリアルタイムチェックを無効にする (有効にしていた場合):
`/set aspell.check.real_time off` `/set spell.check.real_time off`
* _TZ_ 変数を設定する (例: `export TZ="Europe/Paris"`)、こうすることで * _TZ_ 変数を設定する (例: `export TZ="Europe/Paris"`)、こうすることで
_/etc/localtime_ ファイルへ頻繁にアクセスしないようになります。 _/etc/localtime_ ファイルへ頻繁にアクセスしないようになります。

View File

@ -9530,11 +9530,6 @@ WeeChat とプラグインが送信するシグナルのリスト:
|=== |===
| プラグイン | シグナル | 引数 | 説明 | プラグイン | シグナル | 引数 | 説明
| aspell | aspell_suggest +
_(WeeChat バージョン 0.4.0 以上で利用可)_ |
Pointer: バッファ |
スペルの間違っている単語に対する新しい修正候補
| guile | guile_script_loaded + | guile | guile_script_loaded +
_(WeeChat バージョン 0.3.9 以上で利用可)_ | _(WeeChat バージョン 0.3.9 以上で利用可)_ |
String: スクリプトへのパス | String: スクリプトへのパス |
@ -9834,6 +9829,11 @@ WeeChat とプラグインが送信するシグナルのリスト:
String: 削除されたスクリプトへのパスのコンマ区切りリスト | String: 削除されたスクリプトへのパスのコンマ区切りリスト |
Ruby スクリプトを削除 Ruby スクリプトを削除
| spell | spell_suggest +
_(WeeChat バージョン 2.4 以上で利用可)_ |
Pointer: バッファ |
スペルの間違っている単語に対する新しい修正候補
| tcl | tcl_script_loaded + | tcl | tcl_script_loaded +
_(WeeChat バージョン 0.3.9 以上で利用可)_ | _(WeeChat バージョン 0.3.9 以上で利用可)_ |
String: スクリプトへのパス | String: スクリプトへのパス |

View File

@ -113,7 +113,7 @@ macOS では https://brew.sh/[Homebrew] を使ってください:
| gettext | | | 国際化 (メッセージの翻訳; ベース言語は英語です) | gettext | | | 国際化 (メッセージの翻訳; ベース言語は英語です)
| ca-certificates | | | SSL 接続に必要な証明書、relay プラグインで SSL サポート | ca-certificates | | | SSL 接続に必要な証明書、relay プラグインで SSL サポート
| libaspell-dev | libaspell-dev
∥ libenchant-dev | | | aspell プラグイン ∥ libenchant-dev | | | spell プラグイン
| python-dev | 2.6 以上 ^(4)^ | | python プラグイン | python-dev | 2.6 以上 ^(4)^ | | python プラグイン
| libperl-dev | | | perl プラグイン | libperl-dev | | | perl プラグイン
| ruby2.5, ruby2.5-dev | 1.8 以上 | | ruby プラグイン | ruby2.5, ruby2.5-dev | 1.8 以上 | | ruby プラグイン
@ -197,9 +197,6 @@ cmake に対するオプションを指定するには、以下の書式を使
| ENABLE_ALIAS | `ON`, `OFF` | ON | | ENABLE_ALIAS | `ON`, `OFF` | ON |
<<alias_plugin,Alias プラグイン>>のコンパイル。 <<alias_plugin,Alias プラグイン>>のコンパイル。
| ENABLE_ASPELL | `ON`, `OFF` | ON |
<<aspell_plugin,Aspell プラグイン>>のコンパイル。
| ENABLE_BUFLIST | `ON`, `OFF` | ON | | ENABLE_BUFLIST | `ON`, `OFF` | ON |
<<buflist_plugin,Buflist プラグイン>>のコンパイル。 <<buflist_plugin,Buflist プラグイン>>のコンパイル。
@ -214,7 +211,7 @@ cmake に対するオプションを指定するには、以下の書式を使
(コンパイルには時間がかかります。文書を含めたバイナリパッケージをビルドする場合、オンラインで文書を見ることができない場合だけに推奨します)。 (コンパイルには時間がかかります。文書を含めたバイナリパッケージをビルドする場合、オンラインで文書を見ることができない場合だけに推奨します)。
| ENABLE_ENCHANT | `ON`, `OFF` | OFF | | ENABLE_ENCHANT | `ON`, `OFF` | OFF |
Enchant と含めた <<aspell_plugin,Aspell プラグイン>>のコンパイル。 Enchant と含めた <<spell_plugin,Spell プラグイン>>のコンパイル。
| ENABLE_EXEC | `ON`, `OFF` | ON | | ENABLE_EXEC | `ON`, `OFF` | ON |
<<exec_plugin,Exec プラグイン>>のコンパイル。 <<exec_plugin,Exec プラグイン>>のコンパイル。
@ -278,6 +275,9 @@ cmake に対するオプションを指定するには、以下の書式を使
すべての<<scripts_plugins,スクリプトプラグイン>> すべての<<scripts_plugins,スクリプトプラグイン>>
(Python、Perl、Ruby、Lua、Tcl、Guile、JavaScript、PHP) のコンパイル。 (Python、Perl、Ruby、Lua、Tcl、Guile、JavaScript、PHP) のコンパイル。
| ENABLE_SPELL | `ON`, `OFF` | ON |
<<spell_plugin,Spell プラグイン>>のコンパイル。
| ENABLE_TCL | `ON`, `OFF` | ON | | ENABLE_TCL | `ON`, `OFF` | ON |
<<scripts_plugins,Tcl プラグイン>>のコンパイル。 <<scripts_plugins,Tcl プラグイン>>のコンパイル。
@ -566,7 +566,6 @@ WeeChat ホームディレクトリには以下のファイルが含まれます
| sec.conf | 機密データを含む設定ファイル | *保護されます、機密性の高いデータ*: このファイルを誰かと共有してはいけません | sec.conf | 機密データを含む設定ファイル | *保護されます、機密性の高いデータ*: このファイルを誰かと共有してはいけません
| plugins.conf | プラグイン設定ファイル | 保護される場合もあります、プラグインおよびスクリプトに依存します | plugins.conf | プラグイン設定ファイル | 保護される場合もあります、プラグインおよびスクリプトに依存します
| alias.conf | _alias_ プラグイン用の設定ファイル | 保護される場合もあります、エイリアスに依存します | alias.conf | _alias_ プラグイン用の設定ファイル | 保護される場合もあります、エイリアスに依存します
| aspell.conf | _aspell_ プラグイン用の設定ファイル | 保護されません
| buflist.conf | _buflist_ プラグイン用の設定ファイル | 保護されません | buflist.conf | _buflist_ プラグイン用の設定ファイル | 保護されません
| charset.conf | _charset_ プラグイン用の設定ファイル | 保護されません | charset.conf | _charset_ プラグイン用の設定ファイル | 保護されません
| exec.conf | _exec_ プラグイン用の設定ファイル | 保護されません | exec.conf | _exec_ プラグイン用の設定ファイル | 保護されません
@ -583,6 +582,7 @@ WeeChat ホームディレクトリには以下のファイルが含まれます
| relay.conf | _relay_ プラグイン用の設定ファイル | 保護されません | relay.conf | _relay_ プラグイン用の設定ファイル | 保護されません
| ruby.conf | _ruby_ プラグイン用の設定ファイル | 保護されません | ruby.conf | _ruby_ プラグイン用の設定ファイル | 保護されません
| script.conf | _script_ プラグイン用の設定ファイル | 保護されません | script.conf | _script_ プラグイン用の設定ファイル | 保護されません
| spell.conf | _spell_ プラグイン用の設定ファイル | 保護されません
| tcl.conf | _tcl_ プラグイン用の設定ファイル | 保護されません | tcl.conf | _tcl_ プラグイン用の設定ファイル | 保護されません
| trigger.conf | _trigger_ プラグイン用の設定ファイル | 保護される場合もあります、トリガに依存します | trigger.conf | _trigger_ プラグイン用の設定ファイル | 保護される場合もあります、トリガに依存します
| xfer.conf | _xfer_ プラグイン用の設定ファイル | 保護されません | xfer.conf | _xfer_ プラグイン用の設定ファイル | 保護されません
@ -707,8 +707,8 @@ WeeChat を起動した端末の例:
[width="100%",cols="^3,^4,10",options="header"] [width="100%",cols="^3,^4,10",options="header"]
|=== |===
| 要素 | 例 | 説明 | 要素 | 例 | 説明
| aspell_dict | `fr,en` | 現在のバッファにおけるスペリング辞書 | spell_dict | `fr,en` | 現在のバッファにおけるスペリング辞書
| aspell_suggest | `print,prone,prune` | カーソル下の単語に対するスペリング候補 (スペルが間違っている場合) | spell_suggest | `print,prone,prune` | カーソル下の単語に対するスペリング候補 (スペルが間違っている場合)
| buffer_count | `10` | 開いているバッファの総数 | buffer_count | `10` | 開いているバッファの総数
| buffer_short_name | `#test` | 現在のバッファの短い名前 | buffer_short_name | `#test` | 現在のバッファの短い名前
| irc_channel | `#test` | 現在の IRC チャンネル名 | irc_channel | `#test` | 現在の IRC チャンネル名
@ -1619,7 +1619,8 @@ irc サーバ "freenode" に含まれる全てのバッファに対して設定
| kbd:[Alt+d] | コマンドラインで次の単語を削除 (削除された文字列は WeeChat 専用の内部クリップボードに保存) | `/input delete_next_word` | kbd:[Alt+d] | コマンドラインで次の単語を削除 (削除された文字列は WeeChat 専用の内部クリップボードに保存) | `/input delete_next_word`
| kbd:[Alt+k] | キー入力を奪って、コマンドラインにコード (キーが割り当てられていればコマンド) を入力 | `/input grab_key_command` | kbd:[Alt+k] | キー入力を奪って、コマンドラインにコード (キーが割り当てられていればコマンド) を入力 | `/input grab_key_command`
| kbd:[Alt+r] | コマンドラインへの入力をすべて削除 | `/input delete_line` | kbd:[Alt+r] | コマンドラインへの入力をすべて削除 | `/input delete_line`
| kbd:[Alt+s] | aspell の有効無効を切り替え | `/mute aspell toggle` // TRANSLATION MISSING
| kbd:[Alt+s] | Toggle spell checker. | `/mute spell toggle`
|=== |===
[[key_bindings_buffers_windows]] [[key_bindings_buffers_windows]]
@ -2087,7 +2088,6 @@ _スクリプト_ とは `/python` 等のコマンドで _python_
|=== |===
| プラグイン | 説明 | プラグイン | 説明
| alias | コマンドの別名を定義 | alias | コマンドの別名を定義
| aspell | コマンドラインのスペルチェック
| buflist | バッファリストを表示するためのバー要素 | buflist | バッファリストを表示するためのバー要素
| charset | バッファの文字コードに従ってデコード/エンコード | charset | バッファの文字コードに従ってデコード/エンコード
| exec | WeeChat 内部から外部コマンドを実行 | exec | WeeChat 内部から外部コマンドを実行
@ -2105,6 +2105,7 @@ _スクリプト_ とは `/python` 等のコマンドで _python_
| guile | Guile (scheme) スクリプト API | guile | Guile (scheme) スクリプト API
| javascript | JavaScript スクリプト API | javascript | JavaScript スクリプト API
| php | PHP スクリプト API | php | PHP スクリプト API
| spell | コマンドラインのスペルチェック
| trigger | WeeChat およびプラグインが発生させたイベントに対するテキスト置換とコマンド実行 | trigger | WeeChat およびプラグインが発生させたイベントに対するテキスト置換とコマンド実行
| xfer | ファイル転送とダイレクトチャット | xfer | ファイル転送とダイレクトチャット
|=== |===
@ -2147,15 +2148,15 @@ _alias.conf_ ファイル内のセクション:
/set alias.completion.* | 別名に割り当てた補完 /set alias.completion.* | 別名に割り当てた補完
|=== |===
[[aspell_plugin]] [[spell_plugin]]
=== Aspell === Spell
Aspell Spell
プラグインを使うことで、コマンドラインに入力した文字列のスペルチェックができます。バッファごとに異なる言語に対するスペルチェックを実行できます。 プラグインを使うことで、コマンドラインに入力した文字列のスペルチェックができます。バッファごとに異なる言語に対するスペルチェックを実行できます。
スペルチェック機能はデフォルトで無効化されています。kbd:[Alt+s] で有効無効を切り替える事が可能です。 スペルチェック機能はデフォルトで無効化されています。kbd:[Alt+s] で有効無効を切り替える事が可能です。
[[aspell_dictionaries]] [[spell_dictionaries]]
==== 辞書 ==== 辞書
スペルチェック機能を使う前に、すべてのバッファまたは特定のバッファに対して辞書を定義しなければいけません。 スペルチェック機能を使う前に、すべてのバッファまたは特定のバッファに対して辞書を定義しなければいけません。
@ -2166,25 +2167,25 @@ WeeChat はすべての辞書を使って単語をチェックします。
英語とフランス語の辞書を使う例: 英語とフランス語の辞書を使う例:
---- ----
/set aspell.check.default_dict "en,fr" /set spell.check.default_dict "en,fr"
---- ----
特定のバッファで使用する辞書を定義することも可能です。ドイツ語のチャンネルでドイツ語の辞書を使う例: 特定のバッファで使用する辞書を定義することも可能です。ドイツ語のチャンネルでドイツ語の辞書を使う例:
---- ----
/aspell setdict de /spell setdict de
---- ----
バッファグループに対して特定の辞書を指定することも可能です。freenode バッファグループに対して特定の辞書を指定することも可能です。freenode
IRC サーバに対して英語の辞書を使う例: IRC サーバに対して英語の辞書を使う例:
---- ----
/set aspell.dict.irc.freenode en /set spell.dict.irc.freenode en
---- ----
詳しい情報はコマンド <<command_aspell_aspell,/aspell>> を参照してください。 詳しい情報はコマンド <<command_spell_spell,/spell>> を参照してください。
[[aspell_speller_options]] [[spell_speller_options]]
==== Speller オプション ==== Speller オプション
Speller オプションは aspell 設定の "option" Speller オプションは aspell 設定の "option"
@ -2200,17 +2201,17 @@ $ aspell config
例えば、"ignore-case" オプションを有効化するには: 例えば、"ignore-case" オプションを有効化するには:
---- ----
/set aspell.option.ignore-case "true" /set spell.option.ignore-case "true"
---- ----
[[aspell_suggestions]] [[spell_suggestions]]
==== 修正候補 ==== 修正候補
"aspell_suggest" バー要素内に修正候補が表示されます。修正候補の数は "spell_suggest" バー要素内に修正候補が表示されます。修正候補の数は
_aspell.check.suggestions_ オプションで設定します。 _spell.check.suggestions_ オプションで設定します。
修正候補を利用するには、_aspell.check.suggestions_ オプションをゼロ以上の整数に設定し、_status_ 修正候補を利用するには、_spell.check.suggestions_ オプションをゼロ以上の整数に設定し、_status_
バーなどに "aspell_suggest" バー要素を追加してください。 バーなどに "spell_suggest" バー要素を追加してください。
英語辞書 (`en`) を用いた修正候補の例: 英語辞書 (`en`) を用いた修正候補の例:
@ -2228,30 +2229,30 @@ _aspell.check.suggestions_ オプションで設定します。
└─────────────────────────────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────────────────────────────┘
.... ....
[[aspell_commands]] [[spell_commands]]
==== コマンド ==== コマンド
include::autogen/user/aspell_commands.adoc[] include::autogen/user/spell_commands.adoc[]
[[aspell_options]] [[spell_options]]
==== オプション ==== オプション
_aspell.conf_ ファイル内のセクション: _spell.conf_ ファイル内のセクション:
[width="100%",cols="3m,6m,16",options="header"] [width="100%",cols="3m,6m,16",options="header"]
|=== |===
| セクション | 操作コマンド | 説明 | セクション | 操作コマンド | 説明
| color | /set aspell.color.* | 色 | color | /set spell.color.* | 色
| check | /set aspell.check.* | スペルチェックの操作コマンド | check | /set spell.check.* | スペルチェックの操作コマンド
| dict | <<command_aspell_aspell,/aspell setdict>> + | dict | <<command_spell_spell,/spell setdict>> +
/set aspell.dict.* | バッファが利用するディレクトリ (オプションをセクションに追加/削除出来ます) /set spell.dict.* | バッファが利用するディレクトリ (オプションをセクションに追加/削除出来ます)
| look | /set aspell.look.* | 外観 | look | /set spell.look.* | 外観
| option | /set aspell.option.* | <<aspell_speller_options,Speller オプション>> (オプションをセクションに追加/削除出来ます) | option | /set spell.option.* | <<spell_speller_options,Speller オプション>> (オプションをセクションに追加/削除出来ます)
|=== |===
オプション: オプション:
include::autogen/user/aspell_options.adoc[] include::autogen/user/spell_options.adoc[]
[[buflist_plugin]] [[buflist_plugin]]
=== Buflist === Buflist

View File

@ -10,10 +10,6 @@
| alias | alias_value | wartość aliasu | alias | alias_value | wartość aliasu
| aspell | aspell_dicts | lista zainstalowanych słowników aspell
| aspell | aspell_langs | lista wszystkich języków wspieranych przez aspell
| exec | exec_commands_ids | id (numery i nazwy) wykonywanych komend | exec | exec_commands_ids | id (numery i nazwy) wykonywanych komend
| fset | fset_options | pliki konfiguracyjne, sekcje, opcje i slowa w opcjach | fset | fset_options | pliki konfiguracyjne, sekcje, opcje i slowa w opcjach
@ -86,6 +82,10 @@
| script | script_tags | tagi skryptów w repozytorium | script | script_tags | tagi skryptów w repozytorium
| spell | spell_dicts | list of installed dictionaries
| spell | spell_langs | list of all languages supported
| tcl | tcl_script | lista skryptów | tcl | tcl_script | lista skryptów
| trigger | trigger_hook_arguments | domyślne argumenty dla hooka | trigger | trigger_hook_arguments | domyślne argumenty dla hooka

View File

@ -6,8 +6,6 @@
|=== |===
| Wtyczka | Nazwa | Opis | Argumenty | Wtyczka | Nazwa | Opis | Argumenty
| aspell | aspell_dict | oddzielona przecinkami lista słowników używanych w buforze | wskaźnik na bufor ("0x12345678") lub jego pełna nazwa ("irc.freenode.#weechat")
| fifo | fifo_filename | nazwa strumienia FIFO | - | fifo | fifo_filename | nazwa strumienia FIFO | -
| guile | guile_eval | wykonywanie kodu źródłowego | kod źródłowy do wykonania | guile | guile_eval | wykonywanie kodu źródłowego | kod źródłowy do wykonania
@ -74,6 +72,8 @@
| ruby | ruby_version | wersja użytego interpretera | - | ruby | ruby_version | wersja użytego interpretera | -
| spell | spell_dict | oddzielona przecinkami lista słowników używanych w buforze | wskaźnik na bufor ("0x12345678") lub jego pełna nazwa ("irc.freenode.#weechat")
| tcl | tcl_eval | wykonywanie kodu źródłowego | kod źródłowy do wykonania | tcl | tcl_eval | wykonywanie kodu źródłowego | kod źródłowy do wykonania
| tcl | tcl_interpreter | nazwa użytego interpretera | - | tcl | tcl_interpreter | nazwa użytego interpretera | -

View File

@ -6,7 +6,7 @@
. logger (14000) . logger (14000)
. exec (13000) . exec (13000)
. trigger (12000) . trigger (12000)
. aspell (11000) . spell (11000)
. alias (10000) . alias (10000)
. buflist (9000) . buflist (9000)
. fifo (8000) . fifo (8000)

View File

@ -1,32 +0,0 @@
//
// This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND!
//
[[command_aspell_aspell]]
* `+aspell+`: konfiguracja wtyczki aspell
----
/aspell enable|disable|toggle
listdict
setdict <język>[,<język>...]
deldict
addword [<język>] <słowo>
enable: włącza aspell
disable: wyłącza aspell
toggle: przełącza aspell
listdict: pokazuje zainstalowane słowniki
setdict: ustawia słownik dla obecnego buforu (kilka słowników może być podanych po przecinku)
deldict: usuwa słownik używany w obecnym buforze
addword: dodaje słowo do osobistego słownika aspell
Jeśli wprowadzany tekst zaczyna się od '/' nie będzie on sprawdzany, za wyjątkiem kilku komend (zobacz /set aspell.check.commands).
W celu włączenia aspell dla wszystkich buforów, należy użyć opcji "default_dict", następnie włączyć aspell, na przykład:
/set aspell.check.default_dict "en"
/aspell enable
W celu wyświetlenia listy sugestii na pasku, użyj elementu "aspell_suggest".
Domyślny skrót klawiszowy przełączający aspell to alt-s.
----

View File

@ -0,0 +1,32 @@
//
// This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND!
//
[[command_spell_spell]]
* `+spell+`: spell plugin configuration
----
/spell enable|disable|toggle
listdict
setdict <język>[,<język>...]
deldict
addword [<język>] <słowo>
enable: enable spell checker
disable: disable spell checker
toggle: toggle spell checker
listdict: show installed dictionaries
setdict: set dictionary for current buffer (multiple dictionaries can be separated by a comma)
deldict: delete dictionary used on current buffer
addword: add a word in personal dictionary
Input line beginning with a '/' is not checked, except for some commands (see /set spell.check.commands).
To enable spell checker on all buffers, use option "default_dict", then enable spell checker, for example:
/set spell.check.default_dict "en"
/spell enable
To display a list of suggestions in a bar, use item "spell_suggest".
Default key to toggle spell checker is alt-s.
----

View File

@ -2,80 +2,80 @@
// This file is auto-generated by script docgen.py. // This file is auto-generated by script docgen.py.
// DO NOT EDIT BY HAND! // DO NOT EDIT BY HAND!
// //
* [[option_aspell.check.commands]] *aspell.check.commands* * [[option_spell.check.commands]] *spell.check.commands*
** opis: pass:none[oddzielona przecinkiem lista komend, dla których sprawdzana jest poprawna pisownia (sprawdzanie pisowni jest wyłączone dla pozostałych komend)] ** opis: pass:none[oddzielona przecinkiem lista komend, dla których sprawdzana jest poprawna pisownia (sprawdzanie pisowni jest wyłączone dla pozostałych komend)]
** typ: ciąg ** typ: ciąg
** wartości: dowolny ciąg ** wartości: dowolny ciąg
** domyślna wartość: `+"ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic"+` ** domyślna wartość: `+"ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic"+`
* [[option_aspell.check.default_dict]] *aspell.check.default_dict* * [[option_spell.check.default_dict]] *spell.check.default_dict*
** opis: pass:none[domyślny słownik (lub oddzielona przecinkami lista słowników) używany, kiedy bufor nie ma zdefiniowanego słownika (zostaw puste, aby wyłączyć słownik w buforach, które nie posiadają konkretnie przypisanego słownika aspell)] ** opis: pass:none[default dictionary (or comma separated list of dictionaries) to use when buffer has no dictionary defined (leave blank to disable spell checker on buffers for which you didn't explicitly enabled it)]
** typ: ciąg ** typ: ciąg
** wartości: dowolny ciąg ** wartości: dowolny ciąg
** domyślna wartość: `+""+` ** domyślna wartość: `+""+`
* [[option_aspell.check.during_search]] *aspell.check.during_search* * [[option_spell.check.during_search]] *spell.check.during_search*
** opis: pass:none[sprawdzaj słowa podczas wyszukiwania tekstu w buforze] ** opis: pass:none[sprawdzaj słowa podczas wyszukiwania tekstu w buforze]
** typ: bool ** typ: bool
** wartości: on, off ** wartości: on, off
** domyślna wartość: `+off+` ** domyślna wartość: `+off+`
* [[option_aspell.check.enabled]] *aspell.check.enabled* * [[option_spell.check.enabled]] *spell.check.enabled*
** opis: pass:none[włącza sprawdzanie aspell dla linii komend] ** opis: pass:none[enable spell checker for command line]
** typ: bool ** typ: bool
** wartości: on, off ** wartości: on, off
** domyślna wartość: `+off+` ** domyślna wartość: `+off+`
* [[option_aspell.check.real_time]] *aspell.check.real_time* * [[option_spell.check.real_time]] *spell.check.real_time*
** opis: pass:none[sprawdzanie pisowni w czasie rzeczywistym (wolniejsze, wyłączone domyślnie: słowa są sprawdzane tylko jeśli za nimi znajduje się separator)] ** opis: pass:none[sprawdzanie pisowni w czasie rzeczywistym (wolniejsze, wyłączone domyślnie: słowa są sprawdzane tylko jeśli za nimi znajduje się separator)]
** typ: bool ** typ: bool
** wartości: on, off ** wartości: on, off
** domyślna wartość: `+off+` ** domyślna wartość: `+off+`
* [[option_aspell.check.suggestions]] *aspell.check.suggestions* * [[option_spell.check.suggestions]] *spell.check.suggestions*
** opis: pass:none[numer podpowiedzi wyświetlanych w elemencie paska "aspell_suggest" dla każdego słownika ustawionego w buforze (-1 = wyłącza podpowiedzi, 0 = wyświetla wszystkie możliwe podpowiedzi dla każdego języka)] ** opis: pass:none[number of suggestions to display in bar item "spell_suggest" for each dictionary set in buffer (-1 = disable suggestions, 0 = display all possible suggestions in all languages)]
** typ: liczba ** typ: liczba
** wartości: -1 .. 2147483647 ** wartości: -1 .. 2147483647
** domyślna wartość: `+-1+` ** domyślna wartość: `+-1+`
* [[option_aspell.check.word_min_length]] *aspell.check.word_min_length* * [[option_spell.check.word_min_length]] *spell.check.word_min_length*
** opis: pass:none[minimalna długość słowa do sprawdzenia ( 0 - sprawdzaj wszystkie słowa)] ** opis: pass:none[minimalna długość słowa do sprawdzenia ( 0 - sprawdzaj wszystkie słowa)]
** typ: liczba ** typ: liczba
** wartości: 0 .. 2147483647 ** wartości: 0 .. 2147483647
** domyślna wartość: `+2+` ** domyślna wartość: `+2+`
* [[option_aspell.color.misspelled]] *aspell.color.misspelled* * [[option_spell.color.misspelled]] *spell.color.misspelled*
** opis: pass:none[kolor używany dla błędnie zapisanych słów (pasek wprowadzania)] ** opis: pass:none[kolor używany dla błędnie zapisanych słów (pasek wprowadzania)]
** typ: kolor ** typ: kolor
** wartości: nazwa koloru WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), numer koloru terminala albo alias; atrybuty dozwolone przed kolorem (tylko dla kolorów testu, nie tła): "*" pogrubienie, "!" odwrócenie, "/" pochylenie, "_" podkreślenie ** wartości: nazwa koloru WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), numer koloru terminala albo alias; atrybuty dozwolone przed kolorem (tylko dla kolorów testu, nie tła): "*" pogrubienie, "!" odwrócenie, "/" pochylenie, "_" podkreślenie
** domyślna wartość: `+lightred+` ** domyślna wartość: `+lightred+`
* [[option_aspell.color.suggestion]] *aspell.color.suggestion* * [[option_spell.color.suggestion]] *spell.color.suggestion*
** opis: pass:none[kolor tekstu sugestii dla błędnie wprowadzonego słowa w elemencie paska "aspell_suggest"] ** opis: pass:none[text color for suggestion on a misspelled word in bar item "spell_suggest"]
** typ: kolor ** typ: kolor
** wartości: nazwa koloru WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), numer koloru terminala albo alias; atrybuty dozwolone przed kolorem (tylko dla kolorów testu, nie tła): "*" pogrubienie, "!" odwrócenie, "/" pochylenie, "_" podkreślenie ** wartości: nazwa koloru WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), numer koloru terminala albo alias; atrybuty dozwolone przed kolorem (tylko dla kolorów testu, nie tła): "*" pogrubienie, "!" odwrócenie, "/" pochylenie, "_" podkreślenie
** domyślna wartość: `+default+` ** domyślna wartość: `+default+`
* [[option_aspell.color.suggestion_delimiter_dict]] *aspell.color.suggestion_delimiter_dict* * [[option_spell.color.suggestion_delimiter_dict]] *spell.color.suggestion_delimiter_dict*
** opis: pass:none[kolor tekstu separatorów wyświetlanych pomiędzy dwoma słownikami w elemenci paska "aspell_suggest"] ** opis: pass:none[text color for delimiters displayed between two dictionaries in bar item "spell_suggest"]
** typ: kolor ** typ: kolor
** wartości: nazwa koloru WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), numer koloru terminala albo alias; atrybuty dozwolone przed kolorem (tylko dla kolorów testu, nie tła): "*" pogrubienie, "!" odwrócenie, "/" pochylenie, "_" podkreślenie ** wartości: nazwa koloru WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), numer koloru terminala albo alias; atrybuty dozwolone przed kolorem (tylko dla kolorów testu, nie tła): "*" pogrubienie, "!" odwrócenie, "/" pochylenie, "_" podkreślenie
** domyślna wartość: `+cyan+` ** domyślna wartość: `+cyan+`
* [[option_aspell.color.suggestion_delimiter_word]] *aspell.color.suggestion_delimiter_word* * [[option_spell.color.suggestion_delimiter_word]] *spell.color.suggestion_delimiter_word*
** opis: pass:none[kolor tekstu dla separatorów wyświetlanych pomiędzy dwoma słowami w elemencie paska "aspell_suggest"] ** opis: pass:none[text color for delimiters displayed between two words in bar item "spell_suggest"]
** typ: kolor ** typ: kolor
** wartości: nazwa koloru WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), numer koloru terminala albo alias; atrybuty dozwolone przed kolorem (tylko dla kolorów testu, nie tła): "*" pogrubienie, "!" odwrócenie, "/" pochylenie, "_" podkreślenie ** wartości: nazwa koloru WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), numer koloru terminala albo alias; atrybuty dozwolone przed kolorem (tylko dla kolorów testu, nie tła): "*" pogrubienie, "!" odwrócenie, "/" pochylenie, "_" podkreślenie
** domyślna wartość: `+cyan+` ** domyślna wartość: `+cyan+`
* [[option_aspell.look.suggestion_delimiter_dict]] *aspell.look.suggestion_delimiter_dict* * [[option_spell.look.suggestion_delimiter_dict]] *spell.look.suggestion_delimiter_dict*
** opis: pass:none[separator wyświetlany pomiędzy dwoma słownikami w elemencie paska "aspell_suggest"] ** opis: pass:none[delimiter displayed between two dictionaries in bar item "spell_suggest"]
** typ: ciąg ** typ: ciąg
** wartości: dowolny ciąg ** wartości: dowolny ciąg
** domyślna wartość: `+" / "+` ** domyślna wartość: `+" / "+`
* [[option_aspell.look.suggestion_delimiter_word]] *aspell.look.suggestion_delimiter_word* * [[option_spell.look.suggestion_delimiter_word]] *spell.look.suggestion_delimiter_word*
** opis: pass:none[separator wyświetlany pomiędzy dwoma słowami w elemencie paska "aspell_suggest"] ** opis: pass:none[delimiter displayed between two words in bar item "spell_suggest"]
** typ: ciąg ** typ: ciąg
** wartości: dowolny ciąg ** wartości: dowolny ciąg
** domyślna wartość: `+","+` ** domyślna wartość: `+","+`

View File

@ -10,9 +10,6 @@ $HOME/.weechat/sec.conf::
$HOME/.weechat/alias.conf:: $HOME/.weechat/alias.conf::
plik konfiguracyjny wtyczki _alias_ plik konfiguracyjny wtyczki _alias_
$HOME/.weechat/aspell.conf::
plik konfiguracyjny wtyczki _aspell_
$HOME/.weechat/buflist.conf:: $HOME/.weechat/buflist.conf::
plik konfiguracyjny wtyczki _buflist_ plik konfiguracyjny wtyczki _buflist_
@ -61,6 +58,9 @@ $HOME/.weechat/ruby.conf::
$HOME/.weechat/script.conf:: $HOME/.weechat/script.conf::
plik konfiguracyjny wtyczki _script_ plik konfiguracyjny wtyczki _script_
$HOME/.weechat/spell.conf::
plik konfiguracyjny wtyczki _spell_
$HOME/.weechat/tcl.conf:: $HOME/.weechat/tcl.conf::
plik konfiguracyjny wtyczki _tcl_ plik konfiguracyjny wtyczki _tcl_

View File

@ -963,15 +963,20 @@ $ cd ~/.weechat/script
$ curl -O https://weechat.org/files/plugins.xml.gz $ curl -O https://weechat.org/files/plugins.xml.gz
---- ----
[[aspell_dictionaries]] [[spell_dictionaries]]
=== Zainstalowałem słowniki aspell w systemie, jak mogę ich użyć bez restartowania WeeChat? === Zainstalowałem słowniki aspell w systemie, jak mogę ich użyć bez restartowania WeeChat?
Musisz przeładować wtyczkę aspell: Musisz przeładować wtyczkę spell:
---- ----
/plugin reload aspell /plugin reload spell
---- ----
// TRANSLATION MISSING
[NOTE]
With WeeChat ≤ 2.3, the "spell" plugin was named "aspell", so the command is:
`/plugin reload aspell`.
[[settings]] [[settings]]
== Ustawienia == Ustawienia
@ -1002,8 +1007,8 @@ W celu zmniejszenia używanej pamięci możesz zastosować się do poniższych r
* używać najnowsze stabilnej wersji (powinna mieć mniej wycieków pamięci * używać najnowsze stabilnej wersji (powinna mieć mniej wycieków pamięci
niż starsze wersje) niż starsze wersje)
* nie ładuj nieużywanych pluginów, np: aspell, buflist, fifo, logger, perl, * nie ładuj nieużywanych pluginów, np: buflist, fifo, logger, perl, python,
python, ruby, lua, tcl, guile, javascript, php, xfer (używana do DCC). ruby, lua, tcl, guile, javascript, php, spell, xfer (używana do DCC).
Zobacz `/help weechat.plugin.autoload`. Zobacz `/help weechat.plugin.autoload`.
* ładować tylko naprawdę używane skrypty * ładować tylko naprawdę używane skrypty
* nie ładuj certyfikatów jeśli SSL *NIE* jest używany: ustaw pusty ciąg w opcji * nie ładuj certyfikatów jeśli SSL *NIE* jest używany: ustaw pusty ciąg w opcji
@ -1021,7 +1026,7 @@ Możesz skorzystać z tych samych porad jak dla <<memory_usage,memory>>, oraz t
* usuń wyświetlanie sekund w czasie na pasku statusu: * usuń wyświetlanie sekund w czasie na pasku statusu:
`/set weechat.look.item_time_format "%H:%M"` (domyślna wartość) `/set weechat.look.item_time_format "%H:%M"` (domyślna wartość)
* wyłącz automatyczne sprawdzanie poprawności wpisywanych słów w linii poleceń (o ile je włączyłeś): * wyłącz automatyczne sprawdzanie poprawności wpisywanych słów w linii poleceń (o ile je włączyłeś):
`/set aspell.check.real_time off` `/set spell.check.real_time off`
* ustaw zmienną _TZ_ (na przykład: `export TZ="Europe/Warsaw"`), w celu zmniejszenia * ustaw zmienną _TZ_ (na przykład: `export TZ="Europe/Warsaw"`), w celu zmniejszenia
częstotliwości czytania pliku _/etc/localtime_ częstotliwości czytania pliku _/etc/localtime_

View File

@ -114,7 +114,7 @@ WeeChat.
| gettext | | | Internacjonalizacja (tłumaczenie wiadomości; język bazowy to Angielski). | gettext | | | Internacjonalizacja (tłumaczenie wiadomości; język bazowy to Angielski).
| ca-certificates | | | Certyfikaty dla połączeń SSL. | ca-certificates | | | Certyfikaty dla połączeń SSL.
| libaspell-dev | libaspell-dev
∥ libenchant-dev | | | Wtyczka aspell. ∥ libenchant-dev | | | Wtyczka spell.
| python-dev | ≥ 2.6 ^(4)^ | | Wtyczka python. | python-dev | ≥ 2.6 ^(4)^ | | Wtyczka python.
| libperl-dev | | | Wtyczka perl. | libperl-dev | | | Wtyczka perl.
| ruby2.5, ruby2.5-dev | ≥ 1.8 | | Wtyczka ruby. | ruby2.5, ruby2.5-dev | ≥ 1.8 | | Wtyczka ruby.
@ -198,9 +198,6 @@ Lista popularnych opcji:
| ENABLE_ALIAS | `ON`, `OFF` | ON | | ENABLE_ALIAS | `ON`, `OFF` | ON |
Kompilacja <<alias_plugin,wtyczki alias>>. Kompilacja <<alias_plugin,wtyczki alias>>.
| ENABLE_ASPELL | `ON`, `OFF` | ON |
Kompilacja <<aspell_plugin,wtyczki aspell>>.
| ENABLE_BUFLIST | `ON`, `OFF` | ON | | ENABLE_BUFLIST | `ON`, `OFF` | ON |
Kompilacja <<buflist_plugin,wtyczki buflist>>. Kompilacja <<buflist_plugin,wtyczki buflist>>.
@ -216,7 +213,7 @@ Lista popularnych opcji:
dokumentacji online). dokumentacji online).
| ENABLE_ENCHANT | `ON`, `OFF` | OFF | | ENABLE_ENCHANT | `ON`, `OFF` | OFF |
Kompilacja <<aspell_plugin,wtyczki aspell>> z Enchant. Kompilacja <<spell_plugin,wtyczki spell>> z Enchant.
| ENABLE_EXEC | `ON`, `OFF` | ON | | ENABLE_EXEC | `ON`, `OFF` | ON |
Kompilacja <<exec_plugin,wtyczki exec>>. Kompilacja <<exec_plugin,wtyczki exec>>.
@ -280,6 +277,9 @@ Lista popularnych opcji:
Kompilacja <<scripts_plugins,wtyczek skryptowych>> (Python, Perl, Ruby, Lua, Kompilacja <<scripts_plugins,wtyczek skryptowych>> (Python, Perl, Ruby, Lua,
Tcl, Guile, JavaScript, PHP). Tcl, Guile, JavaScript, PHP).
| ENABLE_SPELL | `ON`, `OFF` | ON |
Kompilacja <<spell_plugin,wtyczki spell>>.
| ENABLE_TCL | `ON`, `OFF` | ON | | ENABLE_TCL | `ON`, `OFF` | ON |
Kompilacja <<scripts_plugins,wtyczki tcl>>. Kompilacja <<scripts_plugins,wtyczki tcl>>.
@ -570,7 +570,6 @@ Pliki tworzone w katalogu domowym WeeChat:
| sec.conf | Plik konfiguracyjny z zabezpieczonymi danymi | *Tak, bardzo prażliwe*: Tym plikiem nie powinno się z nikim dzielić. | sec.conf | Plik konfiguracyjny z zabezpieczonymi danymi | *Tak, bardzo prażliwe*: Tym plikiem nie powinno się z nikim dzielić.
| plugins.conf | Plik konfiguracyjny wtyczek | Możliwe, zależy od wtyczki/skryptu. | plugins.conf | Plik konfiguracyjny wtyczek | Możliwe, zależy od wtyczki/skryptu.
| alias.conf | Plik konfiguracyjny wtyczki _alias_ | Możliwe, zależy od aliasu. | alias.conf | Plik konfiguracyjny wtyczki _alias_ | Możliwe, zależy od aliasu.
| aspell.conf | Plik konfiguracyjny wtyczki _aspell_ | Nie.
| buflist.conf | Plik konfiguracyjny wtyczki _buflist_ | Nie. | buflist.conf | Plik konfiguracyjny wtyczki _buflist_ | Nie.
| charset.conf | Plik konfiguracyjny wtyczki _charset_ | Nie. | charset.conf | Plik konfiguracyjny wtyczki _charset_ | Nie.
| exec.conf | Plik konfiguracyjny wtyczki _exec_ | Nie. | exec.conf | Plik konfiguracyjny wtyczki _exec_ | Nie.
@ -587,6 +586,7 @@ Pliki tworzone w katalogu domowym WeeChat:
| relay.conf | Plik konfiguracyjny wtyczki _relay_ | Nie. | relay.conf | Plik konfiguracyjny wtyczki _relay_ | Nie.
| ruby.conf | Plik konfiguracyjny wtyczki _ruby_ | Nie. | ruby.conf | Plik konfiguracyjny wtyczki _ruby_ | Nie.
| script.conf | Plik konfiguracyjny wtyczki _script_ | Nie. | script.conf | Plik konfiguracyjny wtyczki _script_ | Nie.
| spell.conf | Plik konfiguracyjny wtyczki _spell_ | Nie.
| tcl.conf | Plik konfiguracyjny wtyczki _tcl_ | Nie. | tcl.conf | Plik konfiguracyjny wtyczki _tcl_ | Nie.
| trigger.conf | Plik konfiguracyjny wtyczki _trigger_ | Możliwe, zależy od triggerów. | trigger.conf | Plik konfiguracyjny wtyczki _trigger_ | Możliwe, zależy od triggerów.
| xfer.conf | Plik konfiguracyjny wtyczki _xfer_ | Nie. | xfer.conf | Plik konfiguracyjny wtyczki _xfer_ | Nie.
@ -710,8 +710,8 @@ Inne dostępne elementy (nie używane domyślnie w paskach):
[width="100%",cols="^3,^4,10",options="header"] [width="100%",cols="^3,^4,10",options="header"]
|=== |===
| Element | Przykład | Opis | Element | Przykład | Opis
| aspell_dict | `fr,en` | Słowniki używane w obecnym buforze. | spell_dict | `fr,en` | Słowniki używane w obecnym buforze.
| aspell_suggest | `print,prone,prune` | Sugestie dla słowa pod kursorem (jeśli zawiera błąd). | spell_suggest | `print,prone,prune` | Sugestie dla słowa pod kursorem (jeśli zawiera błąd).
| buffer_count | `10` | Liczba otwartych buforów. | buffer_count | `10` | Liczba otwartych buforów.
| buffer_short_name | `#test` | Skrócona nazwa obecnego buforu. | buffer_short_name | `#test` | Skrócona nazwa obecnego buforu.
| irc_channel | `#test` | Nazwa bieżącego kanału IRC. | irc_channel | `#test` | Nazwa bieżącego kanału IRC.
@ -1628,7 +1628,8 @@ Można ją zapisać za pomocą skryptu _buffer_autoset.py_: można go zaintalowa
| kbd:[Alt+d] | Usuń następne słowo w linii poleceń (usuwany ciąg jest kopiowany do wewnętrznego schowka). | `/input delete_next_word` | kbd:[Alt+d] | Usuń następne słowo w linii poleceń (usuwany ciąg jest kopiowany do wewnętrznego schowka). | `/input delete_next_word`
| kbd:[Alt+k] | Przechwyć wciśnięte klawisze i zwróć ich kod (i przypisaną komendę, jeśli istnieje) w linii poleceń. | `/input grab_key_command` | kbd:[Alt+k] | Przechwyć wciśnięte klawisze i zwróć ich kod (i przypisaną komendę, jeśli istnieje) w linii poleceń. | `/input grab_key_command`
| kbd:[Alt+r] | Usuń całą zawartość linii poleceń. | `/input delete_line` | kbd:[Alt+r] | Usuń całą zawartość linii poleceń. | `/input delete_line`
| kbd:[Alt+s] | Przełącz aspell. | `/mute aspell toggle` // TRANSLATION MISSING
| kbd:[Alt+s] | Toggle spell checker. | `/mute spell toggle`
|=== |===
[[key_bindings_buffers_windows]] [[key_bindings_buffers_windows]]
@ -2102,7 +2103,6 @@ Domyślne wtyczki:
|=== |===
| Wtyczka | Opis | Wtyczka | Opis
| alias | Definiuje aliasy dla komend. | alias | Definiuje aliasy dla komend.
| aspell | Sprawdzanie pisowni w linii poleceń.
| buflist | Element paska z listą buforów. | buflist | Element paska z listą buforów.
| charset | Ustawianie kodowania dla buforów. | charset | Ustawianie kodowania dla buforów.
| exec | Wykonuje zewnętrzną komendę z poziomu WeeChat. | exec | Wykonuje zewnętrzną komendę z poziomu WeeChat.
@ -2120,6 +2120,7 @@ Domyślne wtyczki:
| guile | Wsparcie dla skryptów napisanych w Guile (scheme). | guile | Wsparcie dla skryptów napisanych w Guile (scheme).
| javascript | Wsparcie dla skryptów napisanych w JavaScript. | javascript | Wsparcie dla skryptów napisanych w JavaScript.
| php | Wsparcie dla skryptów napisanych w PHP. | php | Wsparcie dla skryptów napisanych w PHP.
| spell | Sprawdzanie pisowni w linii poleceń.
| trigger | Zamiana tekstu i wykonywanie komend dla zdarzeń wywołanych przez WeeChat/wtyczki. | trigger | Zamiana tekstu i wykonywanie komend dla zdarzeń wywołanych przez WeeChat/wtyczki.
| xfer | Przesyłanie plików i bezpośredni chat. | xfer | Przesyłanie plików i bezpośredni chat.
|=== |===
@ -2160,15 +2161,15 @@ Ssekcje w pliku _alias.conf_:
/set alias.completion.* | Completions for aliases. /set alias.completion.* | Completions for aliases.
|=== |===
[[aspell_plugin]] [[spell_plugin]]
=== Aspell === Spell
Wtyczka aspell pozwala na sprawdzanie pisowni w linii poleceń. Możliwe jest Wtyczka spell pozwala na sprawdzanie pisowni w linii poleceń. Możliwe jest
ustawienie wielu języków dla bufora. ustawienie wielu języków dla bufora.
Sprawdzenie pisowni jest domyślnie wyłączone i możę być przełączone za pomocą kbd:[Alt+s]. Sprawdzenie pisowni jest domyślnie wyłączone i możę być przełączone za pomocą kbd:[Alt+s].
[[aspell_dictionaries]] [[spell_dictionaries]]
==== Słowniki ==== Słowniki
Przed użyciem sprawdzania pisowni należy zdefiniować słowniki można to zrobić Przed użyciem sprawdzania pisowni należy zdefiniować słowniki można to zrobić
@ -2180,26 +2181,26 @@ słownikach.
Na przykład dla angielskiego i francuskiego: Na przykład dla angielskiego i francuskiego:
---- ----
/set aspell.check.default_dict "en,fr" /set spell.check.default_dict "en,fr"
---- ----
Możliwe jest użycie innego słownika dla konkretnego buforu, na przykład na kanale Możliwe jest użycie innego słownika dla konkretnego buforu, na przykład na kanale
niemieckojęzycnzym: niemieckojęzycnzym:
---- ----
/aspell setdict de /spell setdict de
---- ----
Możesz również ustawić słownik dla grupy buforów, na przykład angielski dla Możesz również ustawić słownik dla grupy buforów, na przykład angielski dla
wsystkich kanałów na serwerze IRC freenode: wsystkich kanałów na serwerze IRC freenode:
---- ----
/set aspell.dict.irc.freenode en /set spell.dict.irc.freenode en
---- ----
Więcej informacji można znaleźć w opisie komendy <<command_aspell_aspell,/aspell>>. Więcej informacji można znaleźć w opisie komendy <<command_spell_spell,/spell>>.
[[aspell_speller_options]] [[spell_speller_options]]
==== Opcje słowników ==== Opcje słowników
Opcje słowników mogą zostać zdefiniowane poprzez dodanie opcji w sekcji "option" Opcje słowników mogą zostać zdefiniowane poprzez dodanie opcji w sekcji "option"
@ -2215,17 +2216,17 @@ $ aspell config
Na przykład, aby włączyć opcję "ignore-case": Na przykład, aby włączyć opcję "ignore-case":
---- ----
/set aspell.option.ignore-case "true" /set spell.option.ignore-case "true"
---- ----
[[aspell_suggestions]] [[spell_suggestions]]
==== Sugestie ==== Sugestie
Sugestie są wyświetlane w elemencie paska "aspell_suggest". Ilość wyświetlanych Sugestie są wyświetlane w elemencie paska "spell_suggest". Ilość wyświetlanych
sugestii można ustawić za pomocą opcji _aspell.check.suggestions_. sugestii można ustawić za pomocą opcji _spell.check.suggestions_.
Aby włączyć sugestie trzeba ustawić opcję _aspell.check.suggestions_ na liczbę Aby włączyć sugestie trzeba ustawić opcję _spell.check.suggestions_ na liczbę
≥ 0 i dodać element "aspell_suggest" do jakiegoś paska, jak _status_. ≥ 0 i dodać element "spell_suggest" do jakiegoś paska, jak _status_.
Przykład sugestii z angielskim słownikiem (`en`): Przykład sugestii z angielskim słownikiem (`en`):
@ -2243,30 +2244,30 @@ Przykład sugestii ze słownikami angielskim i francuskim (`en,fr`):
└─────────────────────────────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────────────────────────────┘
.... ....
[[aspell_commands]] [[spell_commands]]
==== Komendy ==== Komendy
include::autogen/user/aspell_commands.adoc[] include::autogen/user/spell_commands.adoc[]
[[aspell_options]] [[spell_options]]
==== Opcje ==== Opcje
Sekcje w pliku _aspell.conf_: Sekcje w pliku _spell.conf_:
[width="100%",cols="3m,6m,16",options="header"] [width="100%",cols="3m,6m,16",options="header"]
|=== |===
| Sekcja | Komenda | Opis | Sekcja | Komenda | Opis
| color | /set aspell.color.* | Kolory. | color | /set spell.color.* | Kolory.
| check | /set aspell.check.* | Opcje do kontrolowania sprawdzania pisowni. | check | /set spell.check.* | Opcje do kontrolowania sprawdzania pisowni.
| dict | <<command_aspell_aspell,/aspell setdict>> + | dict | <<command_spell_spell,/spell setdict>> +
/set aspell.dict.* | Słowniki używane w buforze (opcje w tej sekcji mogą być dodawane/usuwane). /set spell.dict.* | Słowniki używane w buforze (opcje w tej sekcji mogą być dodawane/usuwane).
| look | /set aspell.look.* | Wygląd. | look | /set spell.look.* | Wygląd.
| option | /set aspell.option.* | <<aspell_speller_options,Opcje słowników>> (opcje w tej sekcji mogą być dodawane/usuwane). | option | /set spell.option.* | <<spell_speller_options,Opcje słowników>> (opcje w tej sekcji mogą być dodawane/usuwane).
|=== |===
Opcje: Opcje:
include::autogen/user/aspell_options.adoc[] include::autogen/user/spell_options.adoc[]
[[buflist_plugin]] [[buflist_plugin]]
=== Buflist === Buflist

View File

@ -10,9 +10,6 @@ $HOME/.weechat/sec.conf::
$HOME/.weechat/alias.conf:: $HOME/.weechat/alias.conf::
файл конфигурации для плагина _alias_ файл конфигурации для плагина _alias_
$HOME/.weechat/aspell.conf::
файл конфигурации для плагина _aspell_
$HOME/.weechat/buflist.conf:: $HOME/.weechat/buflist.conf::
файл конфигурации для плагина _buflist_ файл конфигурации для плагина _buflist_
@ -61,6 +58,9 @@ $HOME/.weechat/ruby.conf::
$HOME/.weechat/script.conf:: $HOME/.weechat/script.conf::
файл конфигурации для плагина _script_ файл конфигурации для плагина _script_
$HOME/.weechat/spell.conf::
файл конфигурации для плагина _spell_
$HOME/.weechat/tcl.conf:: $HOME/.weechat/tcl.conf::
файл конфигурации для плагина _tcl_ файл конфигурации для плагина _tcl_

View File

@ -148,20 +148,6 @@
./src/plugins/alias/alias.h ./src/plugins/alias/alias.h
./src/plugins/alias/alias-info.c ./src/plugins/alias/alias-info.c
./src/plugins/alias/alias-info.h ./src/plugins/alias/alias-info.h
./src/plugins/aspell/weechat-aspell-bar-item.c
./src/plugins/aspell/weechat-aspell-bar-item.h
./src/plugins/aspell/weechat-aspell.c
./src/plugins/aspell/weechat-aspell-command.c
./src/plugins/aspell/weechat-aspell-command.h
./src/plugins/aspell/weechat-aspell-completion.c
./src/plugins/aspell/weechat-aspell-completion.h
./src/plugins/aspell/weechat-aspell-config.c
./src/plugins/aspell/weechat-aspell-config.h
./src/plugins/aspell/weechat-aspell.h
./src/plugins/aspell/weechat-aspell-info.c
./src/plugins/aspell/weechat-aspell-info.h
./src/plugins/aspell/weechat-aspell-speller.c
./src/plugins/aspell/weechat-aspell-speller.h
./src/plugins/buflist/buflist-bar-item.c ./src/plugins/buflist/buflist-bar-item.c
./src/plugins/buflist/buflist-bar-item.h ./src/plugins/buflist/buflist-bar-item.h
./src/plugins/buflist/buflist.c ./src/plugins/buflist/buflist.c
@ -365,6 +351,20 @@
./src/plugins/script/script-mouse.h ./src/plugins/script/script-mouse.h
./src/plugins/script/script-repo.c ./src/plugins/script/script-repo.c
./src/plugins/script/script-repo.h ./src/plugins/script/script-repo.h
./src/plugins/spell/spell-bar-item.c
./src/plugins/spell/spell-bar-item.h
./src/plugins/spell/spell.c
./src/plugins/spell/spell-command.c
./src/plugins/spell/spell-command.h
./src/plugins/spell/spell-completion.c
./src/plugins/spell/spell-completion.h
./src/plugins/spell/spell-config.c
./src/plugins/spell/spell-config.h
./src/plugins/spell/spell.h
./src/plugins/spell/spell-info.c
./src/plugins/spell/spell-info.h
./src/plugins/spell/spell-speller.c
./src/plugins/spell/spell-speller.h
./src/plugins/tcl/weechat-tcl-api.c ./src/plugins/tcl/weechat-tcl-api.c
./src/plugins/tcl/weechat-tcl-api.h ./src/plugins/tcl/weechat-tcl-api.h
./src/plugins/tcl/weechat-tcl.c ./src/plugins/tcl/weechat-tcl.c

View File

@ -149,20 +149,6 @@ SET(WEECHAT_SOURCES
./src/plugins/alias/alias.h ./src/plugins/alias/alias.h
./src/plugins/alias/alias-info.c ./src/plugins/alias/alias-info.c
./src/plugins/alias/alias-info.h ./src/plugins/alias/alias-info.h
./src/plugins/aspell/weechat-aspell-bar-item.c
./src/plugins/aspell/weechat-aspell-bar-item.h
./src/plugins/aspell/weechat-aspell.c
./src/plugins/aspell/weechat-aspell-command.c
./src/plugins/aspell/weechat-aspell-command.h
./src/plugins/aspell/weechat-aspell-completion.c
./src/plugins/aspell/weechat-aspell-completion.h
./src/plugins/aspell/weechat-aspell-config.c
./src/plugins/aspell/weechat-aspell-config.h
./src/plugins/aspell/weechat-aspell.h
./src/plugins/aspell/weechat-aspell-info.c
./src/plugins/aspell/weechat-aspell-info.h
./src/plugins/aspell/weechat-aspell-speller.c
./src/plugins/aspell/weechat-aspell-speller.h
./src/plugins/buflist/buflist-bar-item.c ./src/plugins/buflist/buflist-bar-item.c
./src/plugins/buflist/buflist-bar-item.h ./src/plugins/buflist/buflist-bar-item.h
./src/plugins/buflist/buflist.c ./src/plugins/buflist/buflist.c
@ -366,6 +352,20 @@ SET(WEECHAT_SOURCES
./src/plugins/script/script-mouse.h ./src/plugins/script/script-mouse.h
./src/plugins/script/script-repo.c ./src/plugins/script/script-repo.c
./src/plugins/script/script-repo.h ./src/plugins/script/script-repo.h
./src/plugins/spell/spell-bar-item.c
./src/plugins/spell/spell-bar-item.h
./src/plugins/spell/spell.c
./src/plugins/spell/spell-command.c
./src/plugins/spell/spell-command.h
./src/plugins/spell/spell-completion.c
./src/plugins/spell/spell-completion.h
./src/plugins/spell/spell-config.c
./src/plugins/spell/spell-config.h
./src/plugins/spell/spell.h
./src/plugins/spell/spell-info.c
./src/plugins/spell/spell-info.h
./src/plugins/spell/spell-speller.c
./src/plugins/spell/spell-speller.h
./src/plugins/tcl/weechat-tcl-api.c ./src/plugins/tcl/weechat-tcl-api.c
./src/plugins/tcl/weechat-tcl-api.h ./src/plugins/tcl/weechat-tcl-api.h
./src/plugins/tcl/weechat-tcl.c ./src/plugins/tcl/weechat-tcl.c

View File

@ -138,7 +138,7 @@ gui_key_default_bindings (int context)
BIND(/* m-j,m-s */ "meta-jmeta-s", "/server jump"); BIND(/* m-j,m-s */ "meta-jmeta-s", "/server jump");
BIND(/* m-h */ "meta-h", "/input hotlist_clear"); BIND(/* m-h */ "meta-h", "/input hotlist_clear");
BIND(/* m-k */ "meta-k", "/input grab_key_command"); BIND(/* m-k */ "meta-k", "/input grab_key_command");
BIND(/* m-s */ "meta-s", "/mute aspell toggle"); BIND(/* m-s */ "meta-s", "/mute spell toggle");
BIND(/* m-u */ "meta-u", "/window scroll_unread"); BIND(/* m-u */ "meta-u", "/window scroll_unread");
BIND(/* ^S^U */ "ctrl-Sctrl-U", "/input set_unread"); BIND(/* ^S^U */ "ctrl-Sctrl-U", "/input set_unread");
BIND(/* ^Cb */ "ctrl-Cb", "/input insert \\x02"); BIND(/* ^Cb */ "ctrl-Cb", "/input insert \\x02");

View File

@ -49,28 +49,6 @@ if(ENABLE_ALIAS)
add_subdirectory(alias) add_subdirectory(alias)
endif() endif()
if(ENABLE_ASPELL)
if(ENABLE_ENCHANT)
# Check for enchant libraries
find_package(ENCHANT)
if(ENCHANT_FOUND)
add_subdirectory(aspell)
else()
# Check for aspell libraries
find_package(Aspell)
if(ASPELL_FOUND)
add_subdirectory(aspell)
endif()
endif()
else()
# Check for aspell libraries
find_package(Aspell)
if(ASPELL_FOUND)
add_subdirectory(aspell)
endif()
endif()
endif()
if(ENABLE_BUFLIST) if(ENABLE_BUFLIST)
add_subdirectory(buflist) add_subdirectory(buflist)
endif() endif()
@ -166,6 +144,28 @@ if(ENABLE_SCRIPTS AND ENABLE_PHP)
endif() endif()
endif() endif()
if(ENABLE_SPELL)
if(ENABLE_ENCHANT)
# Check for enchant libraries
find_package(ENCHANT)
if(ENCHANT_FOUND)
add_subdirectory(spell)
else()
# Check for aspell libraries
find_package(Aspell)
if(ASPELL_FOUND)
add_subdirectory(spell)
endif()
endif()
else()
# Check for aspell libraries
find_package(Aspell)
if(ASPELL_FOUND)
add_subdirectory(spell)
endif()
endif()
endif()
if(ENABLE_TRIGGER) if(ENABLE_TRIGGER)
add_subdirectory(trigger) add_subdirectory(trigger)
endif() endif()

View File

@ -45,10 +45,6 @@ if PLUGIN_ALIAS
alias_dir = alias alias_dir = alias
endif endif
if PLUGIN_ASPELL
aspell_dir = aspell
endif
if PLUGIN_BUFLIST if PLUGIN_BUFLIST
buflist_dir = buflist buflist_dir = buflist
endif endif
@ -117,6 +113,10 @@ if PLUGIN_PHP
php_dir = php php_dir = php
endif endif
if PLUGIN_SPELL
spell_dir = spell
endif
if PLUGIN_TRIGGER if PLUGIN_TRIGGER
trigger_dir = trigger trigger_dir = trigger
endif endif
@ -127,7 +127,6 @@ endif
SUBDIRS = . \ SUBDIRS = . \
$(alias_dir) \ $(alias_dir) \
$(aspell_dir) \
$(buflist_dir) \ $(buflist_dir) \
$(charset_dir) \ $(charset_dir) \
$(exec_dir) \ $(exec_dir) \
@ -145,6 +144,7 @@ SUBDIRS = . \
$(guile_dir) \ $(guile_dir) \
$(javascript_dir) \ $(javascript_dir) \
$(php_dir) \ $(php_dir) \
$(spell_dir) \
$(trigger_dir) \ $(trigger_dir) \
$(xfer_dir) $(xfer_dir)

View File

@ -1,678 +0,0 @@
/*
* weechat-aspell-config.c - aspell configuration options (file aspell.conf)
*
* Copyright (C) 2006 Emmanuel Bouthenot <kolter@openics.org>
* Copyright (C) 2006-2019 Sébastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include "../weechat-plugin.h"
#include "weechat-aspell.h"
#include "weechat-aspell-config.h"
#include "weechat-aspell-speller.h"
struct t_config_file *weechat_aspell_config_file = NULL;
struct t_config_section *weechat_aspell_config_section_dict = NULL;
int weechat_aspell_config_loading = 0;
/* aspell config, color section */
struct t_config_option *weechat_aspell_config_color_misspelled;
struct t_config_option *weechat_aspell_config_color_suggestion;
struct t_config_option *weechat_aspell_config_color_suggestion_delimiter_dict;
struct t_config_option *weechat_aspell_config_color_suggestion_delimiter_word;
/* aspell config, check section */
struct t_config_option *weechat_aspell_config_check_commands;
struct t_config_option *weechat_aspell_config_check_default_dict;
struct t_config_option *weechat_aspell_config_check_during_search;
struct t_config_option *weechat_aspell_config_check_enabled;
struct t_config_option *weechat_aspell_config_check_real_time;
struct t_config_option *weechat_aspell_config_check_suggestions;
struct t_config_option *weechat_aspell_config_check_word_min_length;
/* aspell config, look section */
struct t_config_option *weechat_aspell_config_look_suggestion_delimiter_dict;
struct t_config_option *weechat_aspell_config_look_suggestion_delimiter_word;
char **weechat_aspell_commands_to_check = NULL;
int weechat_aspell_count_commands_to_check = 0;
int *weechat_aspell_length_commands_to_check = NULL;
/*
* Callback for changes on option "aspell.check.commands".
*/
void
weechat_aspell_config_change_commands (const void *pointer, void *data,
struct t_config_option *option)
{
const char *value;
int i;
/* make C compiler happy */
(void) pointer;
(void) data;
if (weechat_aspell_commands_to_check)
{
weechat_string_free_split (weechat_aspell_commands_to_check);
weechat_aspell_commands_to_check = NULL;
weechat_aspell_count_commands_to_check = 0;
}
if (weechat_aspell_length_commands_to_check)
{
free (weechat_aspell_length_commands_to_check);
weechat_aspell_length_commands_to_check = NULL;
}
value = weechat_config_string (option);
if (value && value[0])
{
weechat_aspell_commands_to_check = weechat_string_split (value,
",", 0, 0,
&weechat_aspell_count_commands_to_check);
if (weechat_aspell_count_commands_to_check > 0)
{
weechat_aspell_length_commands_to_check = malloc (weechat_aspell_count_commands_to_check *
sizeof (int));
for (i = 0; i < weechat_aspell_count_commands_to_check; i++)
{
weechat_aspell_length_commands_to_check[i] = strlen (weechat_aspell_commands_to_check[i]);
}
}
}
}
/*
* Callback for changes on option "aspell.check.default_dict".
*/
void
weechat_aspell_config_change_default_dict (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
weechat_hashtable_remove_all (weechat_aspell_speller_buffer);
if (!weechat_aspell_config_loading)
weechat_aspell_speller_remove_unused ();
}
/*
* Callback for changes on option "aspell.check.enabled".
*/
void
weechat_aspell_config_change_enabled (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
aspell_enabled = weechat_config_boolean (option);
/* refresh input and aspell suggestions */
weechat_bar_item_update ("input_text");
weechat_bar_item_update ("aspell_suggest");
}
/*
* Callback for changes on option "aspell.check.suggestions".
*/
void
weechat_aspell_config_change_suggestions (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
weechat_bar_item_update ("aspell_suggest");
}
/*
* Callback for changes on a dictionary.
*/
void
weechat_aspell_config_dict_change (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
weechat_hashtable_remove_all (weechat_aspell_speller_buffer);
if (!weechat_aspell_config_loading)
weechat_aspell_speller_remove_unused ();
}
/*
* Callback called when an option is deleted in section "dict".
*/
int
weechat_aspell_config_dict_delete_option (const void *pointer, void *data,
struct t_config_file *config_file,
struct t_config_section *section,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) config_file;
(void) section;
weechat_config_option_free (option);
weechat_hashtable_remove_all (weechat_aspell_speller_buffer);
if (!weechat_aspell_config_loading)
weechat_aspell_speller_remove_unused ();
return WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED;
}
/*
* Creates an option in section "dict".
*/
int
weechat_aspell_config_dict_create_option (const void *pointer, void *data,
struct t_config_file *config_file,
struct t_config_section *section,
const char *option_name,
const char *value)
{
struct t_config_option *ptr_option;
int rc;
/* make C compiler happy */
(void) pointer;
(void) data;
rc = WEECHAT_CONFIG_OPTION_SET_ERROR;
if (value && value[0])
weechat_aspell_speller_check_dictionaries (value);
if (option_name)
{
ptr_option = weechat_config_search_option (config_file, section,
option_name);
if (ptr_option)
{
if (value && value[0])
rc = weechat_config_option_set (ptr_option, value, 0);
else
{
weechat_config_option_free (ptr_option);
rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
}
}
else
{
if (value && value[0])
{
ptr_option = weechat_config_new_option (
config_file, section,
option_name, "string",
_("comma separated list of dictionaries to use on this buffer"),
NULL, 0, 0, "", value, 0,
NULL, NULL, NULL,
&weechat_aspell_config_dict_change, NULL, NULL,
NULL, NULL, NULL);
rc = (ptr_option) ?
WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE : WEECHAT_CONFIG_OPTION_SET_ERROR;
}
else
rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
}
}
if (rc == WEECHAT_CONFIG_OPTION_SET_ERROR)
{
weechat_printf (NULL,
_("%s%s: error creating aspell dictionary \"%s\" => \"%s\""),
weechat_prefix ("error"), ASPELL_PLUGIN_NAME,
option_name, value);
}
else
{
weechat_hashtable_remove_all (weechat_aspell_speller_buffer);
if (!weechat_aspell_config_loading)
weechat_aspell_speller_remove_unused ();
}
return rc;
}
/*
* Callback for changes on an aspell option.
*/
void
weechat_aspell_config_option_change (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
weechat_hashtable_remove_all (weechat_aspell_speller_buffer);
if (!weechat_aspell_config_loading)
weechat_aspell_speller_remove_unused ();
}
/*
* Callback called when an option is deleted in section "option".
*/
int
weechat_aspell_config_option_delete_option (const void *pointer, void *data,
struct t_config_file *config_file,
struct t_config_section *section,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) config_file;
(void) section;
weechat_config_option_free (option);
weechat_hashtable_remove_all (weechat_aspell_speller_buffer);
if (!weechat_aspell_config_loading)
weechat_aspell_speller_remove_unused ();
return WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED;
}
/*
* Callback called when an option is created in section "option".
*/
int
weechat_aspell_config_option_create_option (const void *pointer, void *data,
struct t_config_file *config_file,
struct t_config_section *section,
const char *option_name,
const char *value)
{
struct t_config_option *ptr_option;
int rc;
/* make C compiler happy */
(void) pointer;
(void) data;
rc = WEECHAT_CONFIG_OPTION_SET_ERROR;
if (option_name)
{
ptr_option = weechat_config_search_option (config_file, section,
option_name);
if (ptr_option)
{
if (value && value[0])
rc = weechat_config_option_set (ptr_option, value, 1);
else
{
weechat_config_option_free (ptr_option);
rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
}
}
else
{
if (value && value[0])
{
ptr_option = weechat_config_new_option (
config_file, section,
option_name, "string",
_("option for aspell (for list of available options and "
"format, run command \"aspell config\" in a shell)"),
NULL, 0, 0, "", value, 0,
NULL, NULL, NULL,
&weechat_aspell_config_option_change, NULL, NULL,
NULL, NULL, NULL);
rc = (ptr_option) ?
WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE : WEECHAT_CONFIG_OPTION_SET_ERROR;
}
else
rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
}
}
if (rc == WEECHAT_CONFIG_OPTION_SET_ERROR)
{
weechat_printf (NULL,
_("%s%s: error creating aspell option \"%s\" => \"%s\""),
weechat_prefix ("error"), ASPELL_PLUGIN_NAME,
option_name, value);
}
else
{
weechat_hashtable_remove_all (weechat_aspell_speller_buffer);
if (!weechat_aspell_config_loading)
weechat_aspell_speller_remove_unused ();
}
return rc;
}
/*
* Gets a list of dictionaries for a buffer.
*/
struct t_config_option *
weechat_aspell_config_get_dict (const char *name)
{
return weechat_config_search_option (weechat_aspell_config_file,
weechat_aspell_config_section_dict,
name);
}
/*
* Sets a list of dictionaries for a buffer.
*/
int
weechat_aspell_config_set_dict (const char *name, const char *value)
{
return weechat_aspell_config_dict_create_option (NULL, NULL,
weechat_aspell_config_file,
weechat_aspell_config_section_dict,
name,
value);
}
/*
* Initializes aspell configuration file.
*
* Returns:
* 1: OK
* 0: error
*/
int
weechat_aspell_config_init ()
{
struct t_config_section *ptr_section;
weechat_aspell_config_file = weechat_config_new (ASPELL_CONFIG_NAME,
NULL, NULL, NULL);
if (!weechat_aspell_config_file)
return 0;
/* color */
ptr_section = weechat_config_new_section (
weechat_aspell_config_file, "color",
0, 0,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
if (!ptr_section)
{
weechat_config_free (weechat_aspell_config_file);
weechat_aspell_config_file = NULL;
return 0;
}
weechat_aspell_config_color_misspelled = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"misspelled", "color",
N_("text color for misspelled words (input bar)"),
NULL, 0, 0, "lightred", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
weechat_aspell_config_color_suggestion = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"suggestion", "color",
N_("text color for suggestion on a misspelled word in bar item "
"\"aspell_suggest\""),
NULL, 0, 0, "default", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
weechat_aspell_config_color_suggestion_delimiter_dict = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"suggestion_delimiter_dict", "color",
N_("text color for delimiters displayed between two dictionaries "
"in bar item \"aspell_suggest\""),
NULL, 0, 0, "cyan", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
weechat_aspell_config_color_suggestion_delimiter_word = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"suggestion_delimiter_word", "color",
N_("text color for delimiters displayed between two words in bar item "
"\"aspell_suggest\""),
NULL, 0, 0, "cyan", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
/* check */
ptr_section = weechat_config_new_section (
weechat_aspell_config_file, "check",
0, 0,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
if (!ptr_section)
{
weechat_config_free (weechat_aspell_config_file);
weechat_aspell_config_file = NULL;
return 0;
}
weechat_aspell_config_check_commands = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"commands", "string",
N_("comma separated list of commands for which spell checking is "
"enabled (spell checking is disabled for all other commands)"),
NULL, 0, 0,
"ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,"
"quit,topic", NULL, 0,
NULL, NULL, NULL,
&weechat_aspell_config_change_commands, NULL, NULL,
NULL, NULL, NULL);
weechat_aspell_config_check_default_dict = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"default_dict", "string",
N_("default dictionary (or comma separated list of dictionaries) to "
"use when buffer has no dictionary defined (leave blank to disable "
"aspell on buffers for which you didn't explicitly enabled it)"),
NULL, 0, 0, "", NULL, 0,
NULL, NULL, NULL,
&weechat_aspell_config_change_default_dict, NULL, NULL,
NULL, NULL, NULL);
weechat_aspell_config_check_during_search = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"during_search", "boolean",
N_("check words during text search in buffer"),
NULL, 0, 0, "off", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
weechat_aspell_config_check_enabled = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"enabled", "boolean",
N_("enable aspell check for command line"),
NULL, 0, 0, "off", NULL, 0,
NULL, NULL, NULL,
&weechat_aspell_config_change_enabled, NULL, NULL,
NULL, NULL, NULL);
weechat_aspell_config_check_real_time = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"real_time", "boolean",
N_("real-time spell checking of words (slower, disabled by default: "
"words are checked only if there's delimiter after)"),
NULL, 0, 0, "off", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
weechat_aspell_config_check_suggestions = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"suggestions", "integer",
N_("number of suggestions to display in bar item \"aspell_suggest\" "
"for each dictionary set in buffer (-1 = disable suggestions, "
"0 = display all possible suggestions in all languages)"),
NULL, -1, INT_MAX, "-1", NULL, 0,
NULL, NULL, NULL,
&weechat_aspell_config_change_suggestions, NULL, NULL,
NULL, NULL, NULL);
weechat_aspell_config_check_word_min_length = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"word_min_length", "integer",
N_("minimum length for a word to be spell checked (use 0 to check all "
"words)"),
NULL, 0, INT_MAX, "2", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
/* dict */
ptr_section = weechat_config_new_section (
weechat_aspell_config_file, "dict",
1, 1,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
&weechat_aspell_config_dict_create_option, NULL, NULL,
&weechat_aspell_config_dict_delete_option, NULL, NULL);
if (!ptr_section)
{
weechat_config_free (weechat_aspell_config_file);
weechat_aspell_config_file = NULL;
return 0;
}
weechat_aspell_config_section_dict = ptr_section;
/* look */
ptr_section = weechat_config_new_section (
weechat_aspell_config_file, "look",
0, 0,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
if (!ptr_section)
{
weechat_config_free (weechat_aspell_config_file);
weechat_aspell_config_file = NULL;
return 0;
}
weechat_aspell_config_look_suggestion_delimiter_dict = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"suggestion_delimiter_dict", "string",
N_("delimiter displayed between two dictionaries in bar item "
"\"aspell_suggest\""),
NULL, 0, 0, " / ", NULL, 0,
NULL, NULL, NULL,
&weechat_aspell_config_change_suggestions, NULL, NULL,
NULL, NULL, NULL);
weechat_aspell_config_look_suggestion_delimiter_word = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"suggestion_delimiter_word", "string",
N_("delimiter displayed between two words in bar item "
"\"aspell_suggest\""),
NULL, 0, 0, ",", NULL, 0,
NULL, NULL, NULL,
&weechat_aspell_config_change_suggestions, NULL, NULL,
NULL, NULL, NULL);
/* option */
ptr_section = weechat_config_new_section (
weechat_aspell_config_file, "option",
1, 1,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
&weechat_aspell_config_option_create_option, NULL, NULL,
&weechat_aspell_config_option_delete_option, NULL, NULL);
if (!ptr_section)
{
weechat_config_free (weechat_aspell_config_file);
weechat_aspell_config_file = NULL;
return 0;
}
return 1;
}
/*
* Reads aspell configuration file.
*/
int
weechat_aspell_config_read ()
{
int rc;
weechat_aspell_config_loading = 1;
rc = weechat_config_read (weechat_aspell_config_file);
weechat_aspell_config_loading = 0;
if (rc == WEECHAT_CONFIG_READ_OK)
{
weechat_aspell_config_change_commands (
NULL, NULL, weechat_aspell_config_check_commands);
}
weechat_aspell_speller_remove_unused ();
return rc;
}
/*
* Writes aspell configuration file.
*/
int
weechat_aspell_config_write ()
{
return weechat_config_write (weechat_aspell_config_file);
}
/*
* Frees aspell configuration.
*/
void
weechat_aspell_config_free ()
{
weechat_config_free (weechat_aspell_config_file);
if (weechat_aspell_commands_to_check)
weechat_string_free_split (weechat_aspell_commands_to_check);
if (weechat_aspell_length_commands_to_check)
free (weechat_aspell_length_commands_to_check);
}

View File

@ -1,54 +0,0 @@
/*
* Copyright (C) 2006 Emmanuel Bouthenot <kolter@openics.org>
* Copyright (C) 2006-2019 Sébastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef WEECHAT_PLUGIN_ASPELL_CONFIG_H
#define WEECHAT_PLUGIN_ASPELL_CONFIG_H
#define ASPELL_CONFIG_NAME "aspell"
extern struct t_config_option *weechat_aspell_config_color_misspelled;
extern struct t_config_option *weechat_aspell_config_color_suggestion;
extern struct t_config_option *weechat_aspell_config_color_suggestion_delimiter_dict;
extern struct t_config_option *weechat_aspell_config_color_suggestion_delimiter_word;
extern struct t_config_option *weechat_aspell_config_check_commands;
extern struct t_config_option *weechat_aspell_config_check_default_dict;
extern struct t_config_option *weechat_aspell_config_check_during_search;
extern struct t_config_option *weechat_aspell_config_check_enabled;
extern struct t_config_option *weechat_aspell_config_check_real_time;
extern struct t_config_option *weechat_aspell_config_check_suggestions;
extern struct t_config_option *weechat_aspell_config_check_word_min_length;
extern struct t_config_option *weechat_aspell_config_look_suggestion_delimiter_dict;
extern struct t_config_option *weechat_aspell_config_look_suggestion_delimiter_word;
extern char **weechat_aspell_commands_to_check;
extern int weechat_aspell_count_commands_to_check;
extern int *weechat_aspell_length_commands_to_check;
extern struct t_config_option *weechat_aspell_config_get_dict (const char *name);
extern int weechat_aspell_config_set_dict (const char *name, const char *value);
extern int weechat_aspell_config_init ();
extern int weechat_aspell_config_read ();
extern int weechat_aspell_config_write ();
extern void weechat_aspell_config_free ();
#endif /* WEECHAT_PLUGIN_ASPELL_CONFIG_H */

View File

@ -18,25 +18,25 @@
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>. # along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
# #
add_library(aspell MODULE add_library(spell MODULE
weechat-aspell.c weechat-aspell.h spell.c spell.h
weechat-aspell-bar-item.c weechat-aspell-bar-item.h spell-bar-item.c spell-bar-item.h
weechat-aspell-command.c weechat-aspell-command.h spell-command.c spell-command.h
weechat-aspell-completion.c weechat-aspell-completion.h spell-completion.c spell-completion.h
weechat-aspell-config.c weechat-aspell-config.h spell-config.c spell-config.h
weechat-aspell-info.c weechat-aspell-info.h spell-info.c spell-info.h
weechat-aspell-speller.c weechat-aspell-speller.h) spell-speller.c spell-speller.h)
set_target_properties(aspell PROPERTIES PREFIX "") set_target_properties(spell PROPERTIES PREFIX "")
if(ENCHANT_FOUND) if(ENCHANT_FOUND)
include_directories(${ENCHANT_INCLUDE_DIR}) include_directories(${ENCHANT_INCLUDE_DIR})
target_link_libraries(aspell ${ENCHANT_LIBRARIES}) target_link_libraries(spell ${ENCHANT_LIBRARIES})
add_definitions(-DUSE_ENCHANT) add_definitions(-DUSE_ENCHANT)
else() else()
if(ASPELL_FOUND) if(ASPELL_FOUND)
include_directories(${ASPELL_INCLUDE_PATH}) include_directories(${ASPELL_INCLUDE_PATH})
target_link_libraries(aspell ${ASPELL_LIBRARY}) target_link_libraries(spell ${ASPELL_LIBRARY})
endif() endif()
endif() endif()
install(TARGETS aspell LIBRARY DESTINATION ${LIBDIR}/plugins) install(TARGETS spell LIBRARY DESTINATION ${LIBDIR}/plugins)

View File

@ -22,23 +22,23 @@ AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\" $(ASPELL_CFLAGS) $(ENCHANT_CFLAG
libdir = ${weechat_libdir}/plugins libdir = ${weechat_libdir}/plugins
lib_LTLIBRARIES = aspell.la lib_LTLIBRARIES = spell.la
aspell_la_SOURCES = weechat-aspell.c \ spell_la_SOURCES = spell.c \
weechat-aspell.h \ spell.h \
weechat-aspell-bar-item.c \ spell-bar-item.c \
weechat-aspell-bar-item.h \ spell-bar-item.h \
weechat-aspell-command.c \ spell-command.c \
weechat-aspell-command.h \ spell-command.h \
weechat-aspell-completion.c \ spell-completion.c \
weechat-aspell-completion.h \ spell-completion.h \
weechat-aspell-config.c \ spell-config.c \
weechat-aspell-config.h \ spell-config.h \
weechat-aspell-info.c \ spell-info.c \
weechat-aspell-info.h \ spell-info.h \
weechat-aspell-speller.c \ spell-speller.c \
weechat-aspell-speller.h spell-speller.h
aspell_la_LDFLAGS = -module -no-undefined spell_la_LDFLAGS = -module -no-undefined
aspell_la_LIBADD = $(ASPELL_LFLAGS) $(ENCHANT_LIBS) spell_la_LIBADD = $(ASPELL_LFLAGS) $(ENCHANT_LIBS)
EXTRA_DIST = CMakeLists.txt EXTRA_DIST = CMakeLists.txt

View File

@ -1,5 +1,5 @@
/* /*
* weechat-aspell-bar-item.c - bar items for aspell plugin * spell-bar-item.c - bar items for spell checker plugin
* *
* Copyright (C) 2012 Nils Görs <weechatter@arcor.de> * Copyright (C) 2012 Nils Görs <weechatter@arcor.de>
* Copyright (C) 2012-2019 Sébastien Helleu <flashcode@flashtux.org> * Copyright (C) 2012-2019 Sébastien Helleu <flashcode@flashtux.org>
@ -25,21 +25,21 @@
#include <string.h> #include <string.h>
#include "../weechat-plugin.h" #include "../weechat-plugin.h"
#include "weechat-aspell.h" #include "spell.h"
#include "weechat-aspell-config.h" #include "spell-config.h"
/* /*
* Returns content of bar item "aspell_dict": aspell dictionary used on current * Returns content of bar item "spell_dict": spell dictionary used on current
* buffer. * buffer.
*/ */
char * char *
weechat_aspell_bar_item_dict (const void *pointer, void *data, spell_bar_item_dict (const void *pointer, void *data,
struct t_gui_bar_item *item, struct t_gui_bar_item *item,
struct t_gui_window *window, struct t_gui_window *window,
struct t_gui_buffer *buffer, struct t_gui_buffer *buffer,
struct t_hashtable *extra_info) struct t_hashtable *extra_info)
{ {
const char *dict_list; const char *dict_list;
@ -53,21 +53,21 @@ weechat_aspell_bar_item_dict (const void *pointer, void *data,
if (!buffer) if (!buffer)
return NULL; return NULL;
dict_list = weechat_aspell_get_dict (buffer); dict_list = spell_get_dict (buffer);
return (dict_list) ? strdup (dict_list) : NULL; return (dict_list) ? strdup (dict_list) : NULL;
} }
/* /*
* Returns content of bar item "aspell_suggest": aspell suggestions. * Returns content of bar item "spell_suggest": spell checker suggestions.
*/ */
char * char *
weechat_aspell_bar_item_suggest (const void *pointer, void *data, spell_bar_item_suggest (const void *pointer, void *data,
struct t_gui_bar_item *item, struct t_gui_bar_item *item,
struct t_gui_window *window, struct t_gui_window *window,
struct t_gui_buffer *buffer, struct t_gui_buffer *buffer,
struct t_hashtable *extra_info) struct t_hashtable *extra_info)
{ {
const char *ptr_suggestions, *pos; const char *ptr_suggestions, *pos;
char **suggestions, **suggestions2, **str_suggest; char **suggestions, **suggestions2, **str_suggest;
@ -80,14 +80,14 @@ weechat_aspell_bar_item_suggest (const void *pointer, void *data,
(void) window; (void) window;
(void) extra_info; (void) extra_info;
if (!aspell_enabled) if (!spell_enabled)
return NULL; return NULL;
if (!buffer) if (!buffer)
return NULL; return NULL;
ptr_suggestions = weechat_buffer_get_string (buffer, ptr_suggestions = weechat_buffer_get_string (buffer,
"localvar_aspell_suggest"); "localvar_spell_suggest");
if (!ptr_suggestions) if (!ptr_suggestions)
return NULL; return NULL;
@ -113,11 +113,11 @@ weechat_aspell_bar_item_suggest (const void *pointer, void *data,
str_suggest, str_suggest,
weechat_color ( weechat_color (
weechat_config_string ( weechat_config_string (
weechat_aspell_config_color_suggestion_delimiter_dict))); spell_config_color_suggestion_delimiter_dict)));
weechat_string_dyn_concat ( weechat_string_dyn_concat (
str_suggest, str_suggest,
weechat_config_string ( weechat_config_string (
weechat_aspell_config_look_suggestion_delimiter_dict)); spell_config_look_suggestion_delimiter_dict));
} }
suggestions2 = weechat_string_split (suggestions[i], ",", 0, 0, suggestions2 = weechat_string_split (suggestions[i], ",", 0, 0,
&num_suggestions2); &num_suggestions2);
@ -131,17 +131,17 @@ weechat_aspell_bar_item_suggest (const void *pointer, void *data,
str_suggest, str_suggest,
weechat_color ( weechat_color (
weechat_config_string ( weechat_config_string (
weechat_aspell_config_color_suggestion_delimiter_word))); spell_config_color_suggestion_delimiter_word)));
weechat_string_dyn_concat ( weechat_string_dyn_concat (
str_suggest, str_suggest,
weechat_config_string ( weechat_config_string (
weechat_aspell_config_look_suggestion_delimiter_word)); spell_config_look_suggestion_delimiter_word));
} }
weechat_string_dyn_concat ( weechat_string_dyn_concat (
str_suggest, str_suggest,
weechat_color ( weechat_color (
weechat_config_string ( weechat_config_string (
weechat_aspell_config_color_suggestion))); spell_config_color_suggestion)));
weechat_string_dyn_concat (str_suggest, suggestions2[j]); weechat_string_dyn_concat (str_suggest, suggestions2[j]);
} }
weechat_string_free_split (suggestions2); weechat_string_free_split (suggestions2);
@ -154,14 +154,14 @@ end:
} }
/* /*
* Initializes aspell bar items. * Initializes spell bar items.
*/ */
void void
weechat_aspell_bar_item_init () spell_bar_item_init ()
{ {
weechat_bar_item_new ("aspell_dict", weechat_bar_item_new ("spell_dict",
&weechat_aspell_bar_item_dict, NULL, NULL); &spell_bar_item_dict, NULL, NULL);
weechat_bar_item_new ("aspell_suggest", weechat_bar_item_new ("spell_suggest",
&weechat_aspell_bar_item_suggest, NULL, NULL); &spell_bar_item_suggest, NULL, NULL);
} }

View File

@ -17,9 +17,9 @@
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>. * along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
*/ */
#ifndef WEECHAT_PLUGIN_ASPELL_BAR_ITEM_H #ifndef WEECHAT_PLUGIN_SPELL_BAR_ITEM_H
#define WEECHAT_PLUGIN_ASPELL_BAR_ITEM_H #define WEECHAT_PLUGIN_SPELL_BAR_ITEM_H
extern void weechat_aspell_bar_item_init (); extern void spell_bar_item_init ();
#endif /* WEECHAT_PLUGIN_ASPELL_BAR_ITEM_H */ #endif /* WEECHAT_PLUGIN_SPELL_BAR_ITEM_H */

View File

@ -1,5 +1,5 @@
/* /*
* weechat-aspell-command.c - aspell commands * spell-command.c - spell checker commands
* *
* Copyright (C) 2013-2019 Sébastien Helleu <flashcode@flashtux.org> * Copyright (C) 2013-2019 Sébastien Helleu <flashcode@flashtux.org>
* *
@ -24,26 +24,26 @@
#include <string.h> #include <string.h>
#include "../weechat-plugin.h" #include "../weechat-plugin.h"
#include "weechat-aspell.h" #include "spell.h"
#include "weechat-aspell-config.h" #include "spell-config.h"
#include "weechat-aspell-speller.h" #include "spell-speller.h"
/* /*
* Converts an aspell ISO lang code in its English full name. * Converts an ISO lang code in its English full name.
* *
* Note: result must be freed after use. * Note: result must be freed after use.
*/ */
char * char *
weechat_aspell_command_iso_to_lang (const char *code) spell_command_iso_to_lang (const char *code)
{ {
int i; int i;
for (i = 0; aspell_langs[i].code; i++) for (i = 0; spell_langs[i].code; i++)
{ {
if (strcmp (aspell_langs[i].code, code) == 0) if (strcmp (spell_langs[i].code, code) == 0)
return strdup (aspell_langs[i].name); return strdup (spell_langs[i].name);
} }
/* lang code not found */ /* lang code not found */
@ -51,20 +51,20 @@ weechat_aspell_command_iso_to_lang (const char *code)
} }
/* /*
* Converts an aspell ISO country code in its English full name. * Converts an ISO country code in its English full name.
* *
* Note: result must be freed after use. * Note: result must be freed after use.
*/ */
char * char *
weechat_aspell_command_iso_to_country (const char *code) spell_command_iso_to_country (const char *code)
{ {
int i; int i;
for (i = 0; aspell_countries[i].code; i++) for (i = 0; spell_countries[i].code; i++)
{ {
if (strcmp (aspell_countries[i].code, code) == 0) if (strcmp (spell_countries[i].code, code) == 0)
return strdup (aspell_countries[i].name); return strdup (spell_countries[i].name);
} }
/* country code not found */ /* country code not found */
@ -77,11 +77,11 @@ weechat_aspell_command_iso_to_country (const char *code)
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
void void
weechat_aspell_enchant_dict_describe_cb (const char *lang_tag, spell_enchant_dict_describe_cb (const char *lang_tag,
const char *provider_name, const char *provider_name,
const char *provider_desc, const char *provider_desc,
const char *provider_file, const char *provider_file,
void *user_data) void *user_data)
{ {
char *country, *lang, *pos, *iso; char *country, *lang, *pos, *iso;
char str_dict[256]; char str_dict[256];
@ -102,13 +102,13 @@ weechat_aspell_enchant_dict_describe_cb (const char *lang_tag,
iso = weechat_strndup (lang_tag, pos - lang_tag); iso = weechat_strndup (lang_tag, pos - lang_tag);
if (iso) if (iso)
{ {
lang = weechat_aspell_command_iso_to_lang (iso); lang = spell_command_iso_to_lang (iso);
country = weechat_aspell_command_iso_to_country (pos + 1); country = spell_command_iso_to_country (pos + 1);
free (iso); free (iso);
} }
} }
else else
lang = weechat_aspell_command_iso_to_lang ((char *)lang_tag); lang = spell_command_iso_to_lang ((char *)lang_tag);
if (lang) if (lang)
{ {
@ -133,11 +133,11 @@ weechat_aspell_enchant_dict_describe_cb (const char *lang_tag,
#endif /* USE_ENCHANT */ #endif /* USE_ENCHANT */
/* /*
* Displays list of aspell dictionaries installed on system. * Displays list of dictionaries installed on system.
*/ */
void void
weechat_aspell_command_speller_list_dicts () spell_command_speller_list_dicts ()
{ {
#ifndef USE_ENCHANT #ifndef USE_ENCHANT
char *country, *lang, *pos, *iso; char *country, *lang, *pos, *iso;
@ -150,12 +150,12 @@ weechat_aspell_command_speller_list_dicts ()
weechat_printf (NULL, ""); weechat_printf (NULL, "");
weechat_printf (NULL, weechat_printf (NULL,
/* TRANSLATORS: "%s" is "aspell" */ /* TRANSLATORS: "%s" is "spell" (name of plugin) */
_( "%s dictionaries list:"), _( "%s dictionaries list:"),
ASPELL_PLUGIN_NAME); SPELL_PLUGIN_NAME);
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
enchant_broker_list_dicts (broker, weechat_aspell_enchant_dict_describe_cb, enchant_broker_list_dicts (broker, spell_enchant_dict_describe_cb,
NULL); NULL);
#else #else
config = new_aspell_config (); config = new_aspell_config ();
@ -173,13 +173,13 @@ weechat_aspell_command_speller_list_dicts ()
iso = weechat_strndup (dict->code, pos - dict->code); iso = weechat_strndup (dict->code, pos - dict->code);
if (iso) if (iso)
{ {
lang = weechat_aspell_command_iso_to_lang (iso); lang = spell_command_iso_to_lang (iso);
country = weechat_aspell_command_iso_to_country (pos + 1); country = spell_command_iso_to_country (pos + 1);
free (iso); free (iso);
} }
} }
else else
lang = weechat_aspell_command_iso_to_lang ((char*)dict->code); lang = spell_command_iso_to_lang ((char*)dict->code);
str_country[0] = '\0'; str_country[0] = '\0';
if (country || dict->jargon[0]) if (country || dict->jargon[0])
@ -213,22 +213,22 @@ weechat_aspell_command_speller_list_dicts ()
*/ */
void void
weechat_aspell_command_set_dict (struct t_gui_buffer *buffer, const char *value) spell_command_set_dict (struct t_gui_buffer *buffer, const char *value)
{ {
char *name; char *name;
name = weechat_aspell_build_option_name (buffer); name = spell_build_option_name (buffer);
if (!name) if (!name)
return; return;
if (weechat_aspell_config_set_dict (name, value) > 0) if (spell_config_set_dict (name, value) > 0)
{ {
if (value && value[0]) if (value && value[0])
weechat_printf (NULL, "%s: \"%s\" => %s", weechat_printf (NULL, "%s: \"%s\" => %s",
ASPELL_PLUGIN_NAME, name, value); SPELL_PLUGIN_NAME, name, value);
else else
weechat_printf (NULL, _("%s: \"%s\" removed"), weechat_printf (NULL, _("%s: \"%s\" removed"),
ASPELL_PLUGIN_NAME, name); SPELL_PLUGIN_NAME, name);
} }
free (name); free (name);
@ -239,10 +239,10 @@ weechat_aspell_command_set_dict (struct t_gui_buffer *buffer, const char *value)
*/ */
void void
weechat_aspell_command_add_word (struct t_gui_buffer *buffer, const char *dict, spell_command_add_word (struct t_gui_buffer *buffer, const char *dict,
const char *word) const char *word)
{ {
struct t_aspell_speller_buffer *ptr_speller_buffer; struct t_spell_speller_buffer *ptr_speller_buffer;
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
EnchantDict *new_speller, *ptr_speller; EnchantDict *new_speller, *ptr_speller;
#else #else
@ -253,18 +253,18 @@ weechat_aspell_command_add_word (struct t_gui_buffer *buffer, const char *dict,
if (dict) if (dict)
{ {
ptr_speller = weechat_hashtable_get (weechat_aspell_spellers, dict); ptr_speller = weechat_hashtable_get (spell_spellers, dict);
if (!ptr_speller) if (!ptr_speller)
{ {
if (!weechat_aspell_speller_dict_supported (dict)) if (!spell_speller_dict_supported (dict))
{ {
weechat_printf (NULL, weechat_printf (NULL,
_("%s: error: dictionary \"%s\" is not " _("%s: error: dictionary \"%s\" is not "
"available on your system"), "available on your system"),
ASPELL_PLUGIN_NAME, dict); SPELL_PLUGIN_NAME, dict);
return; return;
} }
new_speller = weechat_aspell_speller_new (dict); new_speller = spell_speller_new (dict);
if (!new_speller) if (!new_speller)
return; return;
ptr_speller = new_speller; ptr_speller = new_speller;
@ -272,10 +272,10 @@ weechat_aspell_command_add_word (struct t_gui_buffer *buffer, const char *dict,
} }
else else
{ {
ptr_speller_buffer = weechat_hashtable_get (weechat_aspell_speller_buffer, ptr_speller_buffer = weechat_hashtable_get (spell_speller_buffer,
buffer); buffer);
if (!ptr_speller_buffer) if (!ptr_speller_buffer)
ptr_speller_buffer = weechat_aspell_speller_buffer_new (buffer); ptr_speller_buffer = spell_speller_buffer_new (buffer);
if (!ptr_speller_buffer) if (!ptr_speller_buffer)
goto error; goto error;
if (!ptr_speller_buffer->spellers || !ptr_speller_buffer->spellers[0]) if (!ptr_speller_buffer->spellers || !ptr_speller_buffer->spellers[0])
@ -284,7 +284,7 @@ weechat_aspell_command_add_word (struct t_gui_buffer *buffer, const char *dict,
_("%s%s: no dictionary on this buffer for " _("%s%s: no dictionary on this buffer for "
"adding word"), "adding word"),
weechat_prefix ("error"), weechat_prefix ("error"),
ASPELL_PLUGIN_NAME); SPELL_PLUGIN_NAME);
return; return;
} }
else if (ptr_speller_buffer->spellers[1]) else if (ptr_speller_buffer->spellers[1])
@ -293,7 +293,7 @@ weechat_aspell_command_add_word (struct t_gui_buffer *buffer, const char *dict,
_("%s%s: many dictionaries are defined for " _("%s%s: many dictionaries are defined for "
"this buffer, please specify dictionary"), "this buffer, please specify dictionary"),
weechat_prefix ("error"), weechat_prefix ("error"),
ASPELL_PLUGIN_NAME); SPELL_PLUGIN_NAME);
return; return;
} }
ptr_speller = ptr_speller_buffer->spellers[0]; ptr_speller = ptr_speller_buffer->spellers[0];
@ -308,7 +308,7 @@ weechat_aspell_command_add_word (struct t_gui_buffer *buffer, const char *dict,
{ {
weechat_printf (NULL, weechat_printf (NULL,
_("%s: word \"%s\" added to personal dictionary"), _("%s: word \"%s\" added to personal dictionary"),
ASPELL_PLUGIN_NAME, word); SPELL_PLUGIN_NAME, word);
} }
else else
goto error; goto error;
@ -320,21 +320,21 @@ error:
weechat_printf (NULL, weechat_printf (NULL,
_("%s%s: failed to add word to personal " _("%s%s: failed to add word to personal "
"dictionary"), "dictionary"),
weechat_prefix ("error"), ASPELL_PLUGIN_NAME); weechat_prefix ("error"), SPELL_PLUGIN_NAME);
end: end:
if (new_speller) if (new_speller)
weechat_hashtable_remove (weechat_aspell_spellers, dict); weechat_hashtable_remove (spell_spellers, dict);
} }
/* /*
* Callback for command "/aspell". * Callback for command "/spell".
*/ */
int int
weechat_aspell_command_cb (const void *pointer, void *data, spell_command_cb (const void *pointer, void *data,
struct t_gui_buffer *buffer, struct t_gui_buffer *buffer,
int argc, char **argv, char **argv_eol) int argc, char **argv, char **argv_eol)
{ {
char *dicts; char *dicts;
const char *default_dict; const char *default_dict;
@ -347,25 +347,25 @@ weechat_aspell_command_cb (const void *pointer, void *data,
if (argc == 1) if (argc == 1)
{ {
/* display aspell status */ /* display spell status */
weechat_printf (NULL, ""); weechat_printf (NULL, "");
weechat_printf (NULL, weechat_printf (NULL,
/* TRANSLATORS: second "%s" is "aspell" or "enchant" */ /* TRANSLATORS: second "%s" is "aspell" or "enchant" */
_("%s (using %s)"), _("%s (using %s)"),
(aspell_enabled) ? _("Spell checking is enabled") : _("Spell checking is disabled"), (spell_enabled) ? _("Spell checking is enabled") : _("Spell checking is disabled"),
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
"enchant" "enchant"
#else #else
"aspell" "aspell"
#endif /* USE_ENCHANT */ #endif /* USE_ENCHANT */
); );
default_dict = weechat_config_string (weechat_aspell_config_check_default_dict); default_dict = weechat_config_string (spell_config_check_default_dict);
weechat_printf (NULL, weechat_printf (NULL,
_("Default dictionary: %s"), _("Default dictionary: %s"),
(default_dict && default_dict[0]) ? (default_dict && default_dict[0]) ?
default_dict : _("(not set)")); default_dict : _("(not set)"));
number = 0; number = 0;
infolist = weechat_infolist_get ("option", NULL, "aspell.dict.*"); infolist = weechat_infolist_get ("option", NULL, "spell.dict.*");
if (infolist) if (infolist)
{ {
while (weechat_infolist_next (infolist)) while (weechat_infolist_next (infolist))
@ -382,34 +382,34 @@ weechat_aspell_command_cb (const void *pointer, void *data,
return WEECHAT_RC_OK; return WEECHAT_RC_OK;
} }
/* enable aspell */ /* enable spell */
if (weechat_strcasecmp (argv[1], "enable") == 0) if (weechat_strcasecmp (argv[1], "enable") == 0)
{ {
weechat_config_option_set (weechat_aspell_config_check_enabled, "1", 1); weechat_config_option_set (spell_config_check_enabled, "1", 1);
weechat_printf (NULL, _("Aspell enabled")); weechat_printf (NULL, _("Spell checker enabled"));
return WEECHAT_RC_OK; return WEECHAT_RC_OK;
} }
/* disable aspell */ /* disable spell */
if (weechat_strcasecmp (argv[1], "disable") == 0) if (weechat_strcasecmp (argv[1], "disable") == 0)
{ {
weechat_config_option_set (weechat_aspell_config_check_enabled, "0", 1); weechat_config_option_set (spell_config_check_enabled, "0", 1);
weechat_printf (NULL, _("Aspell disabled")); weechat_printf (NULL, _("Spell checker disabled"));
return WEECHAT_RC_OK; return WEECHAT_RC_OK;
} }
/* toggle aspell */ /* toggle spell */
if (weechat_strcasecmp (argv[1], "toggle") == 0) if (weechat_strcasecmp (argv[1], "toggle") == 0)
{ {
if (aspell_enabled) if (spell_enabled)
{ {
weechat_config_option_set (weechat_aspell_config_check_enabled, "0", 1); weechat_config_option_set (spell_config_check_enabled, "0", 1);
weechat_printf (NULL, _("Aspell disabled")); weechat_printf (NULL, _("Spell checker disabled"));
} }
else else
{ {
weechat_config_option_set (weechat_aspell_config_check_enabled, "1", 1); weechat_config_option_set (spell_config_check_enabled, "1", 1);
weechat_printf (NULL, _("Aspell enabled")); weechat_printf (NULL, _("Spell checker enabled"));
} }
return WEECHAT_RC_OK; return WEECHAT_RC_OK;
} }
@ -417,7 +417,7 @@ weechat_aspell_command_cb (const void *pointer, void *data,
/* list of dictionaries */ /* list of dictionaries */
if (weechat_strcasecmp (argv[1], "listdict") == 0) if (weechat_strcasecmp (argv[1], "listdict") == 0)
{ {
weechat_aspell_command_speller_list_dicts (); spell_command_speller_list_dicts ();
return WEECHAT_RC_OK; return WEECHAT_RC_OK;
} }
@ -426,8 +426,8 @@ weechat_aspell_command_cb (const void *pointer, void *data,
{ {
WEECHAT_COMMAND_MIN_ARGS(3, "setdict"); WEECHAT_COMMAND_MIN_ARGS(3, "setdict");
dicts = weechat_string_replace (argv_eol[2], " ", ""); dicts = weechat_string_replace (argv_eol[2], " ", "");
weechat_aspell_command_set_dict (buffer, spell_command_set_dict (buffer,
(dicts) ? dicts : argv[2]); (dicts) ? dicts : argv[2]);
if (dicts) if (dicts)
free (dicts); free (dicts);
return WEECHAT_RC_OK; return WEECHAT_RC_OK;
@ -436,7 +436,7 @@ weechat_aspell_command_cb (const void *pointer, void *data,
/* delete dictionary used on current buffer */ /* delete dictionary used on current buffer */
if (weechat_strcasecmp (argv[1], "deldict") == 0) if (weechat_strcasecmp (argv[1], "deldict") == 0)
{ {
weechat_aspell_command_set_dict (buffer, NULL); spell_command_set_dict (buffer, NULL);
return WEECHAT_RC_OK; return WEECHAT_RC_OK;
} }
@ -447,12 +447,12 @@ weechat_aspell_command_cb (const void *pointer, void *data,
if (argc > 3) if (argc > 3)
{ {
/* use a given dict */ /* use a given dict */
weechat_aspell_command_add_word (buffer, argv[2], argv_eol[3]); spell_command_add_word (buffer, argv[2], argv_eol[3]);
} }
else else
{ {
/* use default dict */ /* use default dict */
weechat_aspell_command_add_word (buffer, NULL, argv_eol[2]); spell_command_add_word (buffer, NULL, argv_eol[2]);
} }
return WEECHAT_RC_OK; return WEECHAT_RC_OK;
} }
@ -461,47 +461,47 @@ weechat_aspell_command_cb (const void *pointer, void *data,
} }
/* /*
* Hooks aspell command. * Hooks spell command.
*/ */
void void
weechat_aspell_command_init () spell_command_init ()
{ {
weechat_hook_command ( weechat_hook_command (
"aspell", "spell",
N_("aspell plugin configuration"), N_("spell plugin configuration"),
N_("enable|disable|toggle" N_("enable|disable|toggle"
" || listdict" " || listdict"
" || setdict <dict>[,<dict>...]" " || setdict <dict>[,<dict>...]"
" || deldict" " || deldict"
" || addword [<dict>] <word>"), " || addword [<dict>] <word>"),
N_(" enable: enable aspell\n" N_(" enable: enable spell checker\n"
" disable: disable aspell\n" " disable: disable spell checker\n"
" toggle: toggle aspell\n" " toggle: toggle spell checker\n"
"listdict: show installed dictionaries\n" "listdict: show installed dictionaries\n"
" setdict: set dictionary for current buffer (multiple dictionaries " " setdict: set dictionary for current buffer (multiple dictionaries "
"can be separated by a comma)\n" "can be separated by a comma)\n"
" deldict: delete dictionary used on current buffer\n" " deldict: delete dictionary used on current buffer\n"
" addword: add a word in personal aspell dictionary\n" " addword: add a word in personal dictionary\n"
"\n" "\n"
"Input line beginning with a '/' is not checked, except for some " "Input line beginning with a '/' is not checked, except for some "
"commands (see /set aspell.check.commands).\n" "commands (see /set spell.check.commands).\n"
"\n" "\n"
"To enable aspell on all buffers, use option \"default_dict\", then " "To enable spell checker on all buffers, use option \"default_dict\", "
"enable aspell, for example:\n" "then enable spell checker, for example:\n"
" /set aspell.check.default_dict \"en\"\n" " /set spell.check.default_dict \"en\"\n"
" /aspell enable\n" " /spell enable\n"
"\n" "\n"
"To display a list of suggestions in a bar, use item " "To display a list of suggestions in a bar, use item "
"\"aspell_suggest\".\n" "\"spell_suggest\".\n"
"\n" "\n"
"Default key to toggle aspell is alt-s."), "Default key to toggle spell checker is alt-s."),
"enable" "enable"
" || disable" " || disable"
" || toggle" " || toggle"
" || listdict" " || listdict"
" || setdict %(aspell_dicts)" " || setdict %(spell_dicts)"
" || deldict" " || deldict"
" || addword", " || addword",
&weechat_aspell_command_cb, NULL, NULL); &spell_command_cb, NULL, NULL);
} }

View File

@ -17,9 +17,9 @@
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>. * along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
*/ */
#ifndef WEECHAT_PLUGIN_ASPELL_INFO_H #ifndef WEECHAT_PLUGIN_SPELL_COMMAND_H
#define WEECHAT_PLUGIN_ASPELL_INFO_H #define WEECHAT_PLUGIN_SPELL_COMMAND_H
extern void weechat_aspell_info_init (); extern void spell_command_init ();
#endif /* WEECHAT_PLUGIN_ASPELL_INFO_H */ #endif /* WEECHAT_PLUGIN_SPELL_COMMAND_H */

View File

@ -1,5 +1,5 @@
/* /*
* weechat-aspell-completion.c - completion for aspell commands * spell-completion.c - completion for spell checker commands
* *
* Copyright (C) 2013-2019 Sébastien Helleu <flashcode@flashtux.org> * Copyright (C) 2013-2019 Sébastien Helleu <flashcode@flashtux.org>
* *
@ -24,19 +24,19 @@
#include <string.h> #include <string.h>
#include "../weechat-plugin.h" #include "../weechat-plugin.h"
#include "weechat-aspell.h" #include "spell.h"
/* /*
* Adds aspell langs (all langs, even for dictionaries not installed) to * Adds spell langs (all langs, even for dictionaries not installed) to
* completion list. * completion list.
*/ */
int int
weechat_aspell_completion_langs_cb (const void *pointer, void *data, spell_completion_langs_cb (const void *pointer, void *data,
const char *completion_item, const char *completion_item,
struct t_gui_buffer *buffer, struct t_gui_buffer *buffer,
struct t_gui_completion *completion) struct t_gui_completion *completion)
{ {
int i; int i;
@ -46,10 +46,10 @@ weechat_aspell_completion_langs_cb (const void *pointer, void *data,
(void) completion_item; (void) completion_item;
(void) buffer; (void) buffer;
for (i = 0; aspell_langs[i].code; i++) for (i = 0; spell_langs[i].code; i++)
{ {
weechat_hook_completion_list_add (completion, weechat_hook_completion_list_add (completion,
aspell_langs[i].code, spell_langs[i].code,
0, WEECHAT_LIST_POS_SORT); 0, WEECHAT_LIST_POS_SORT);
} }
@ -62,11 +62,11 @@ weechat_aspell_completion_langs_cb (const void *pointer, void *data,
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
void void
weechat_aspell_completion_enchant_add_dict_cb (const char *lang_tag, spell_completion_enchant_add_dict_cb (const char *lang_tag,
const char *provider_name, const char *provider_name,
const char *provider_desc, const char *provider_desc,
const char *provider_file, const char *provider_file,
void *user_data) void *user_data)
{ {
/* make C compiler happy */ /* make C compiler happy */
(void) provider_name; (void) provider_name;
@ -79,14 +79,14 @@ weechat_aspell_completion_enchant_add_dict_cb (const char *lang_tag,
#endif /* USE_ENCHANT */ #endif /* USE_ENCHANT */
/* /*
* Adds aspell dictionaries (only installed dictionaries) to completion list. * Adds spell dictionaries (only installed dictionaries) to completion list.
*/ */
int int
weechat_aspell_completion_dicts_cb (const void *pointer, void *data, spell_completion_dicts_cb (const void *pointer, void *data,
const char *completion_item, const char *completion_item,
struct t_gui_buffer *buffer, struct t_gui_buffer *buffer,
struct t_gui_completion *completion) struct t_gui_completion *completion)
{ {
#ifndef USE_ENCHANT #ifndef USE_ENCHANT
struct AspellConfig *config; struct AspellConfig *config;
@ -103,7 +103,7 @@ weechat_aspell_completion_dicts_cb (const void *pointer, void *data,
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
enchant_broker_list_dicts (broker, enchant_broker_list_dicts (broker,
weechat_aspell_completion_enchant_add_dict_cb, spell_completion_enchant_add_dict_cb,
completion); completion);
#else #else
config = new_aspell_config (); config = new_aspell_config ();
@ -128,12 +128,12 @@ weechat_aspell_completion_dicts_cb (const void *pointer, void *data,
*/ */
void void
weechat_aspell_completion_init () spell_completion_init ()
{ {
weechat_hook_completion ("aspell_langs", weechat_hook_completion ("spell_langs",
N_("list of all languages supported by aspell"), N_("list of all languages supported"),
&weechat_aspell_completion_langs_cb, NULL, NULL); &spell_completion_langs_cb, NULL, NULL);
weechat_hook_completion ("aspell_dicts", weechat_hook_completion ("spell_dicts",
N_("list of aspell installed dictionaries"), N_("list of installed dictionaries"),
&weechat_aspell_completion_dicts_cb, NULL, NULL); &spell_completion_dicts_cb, NULL, NULL);
} }

View File

@ -17,9 +17,9 @@
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>. * along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
*/ */
#ifndef WEECHAT_PLUGIN_ASPELL_COMMAND_H #ifndef WEECHAT_PLUGIN_SPELL_COMPLETION_H
#define WEECHAT_PLUGIN_ASPELL_COMMAND_H #define WEECHAT_PLUGIN_SPELL_COMPLETION_H
extern void weechat_aspell_command_init (); extern void spell_completion_init ();
#endif /* WEECHAT_PLUGIN_ASPELL_COMMAND_H */ #endif /* WEECHAT_PLUGIN_SPELL_COMPLETION_H */

View File

@ -0,0 +1,676 @@
/*
* spell-config.c - spell checker configuration options (file spell.conf)
*
* Copyright (C) 2006 Emmanuel Bouthenot <kolter@openics.org>
* Copyright (C) 2006-2019 Sébastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include "../weechat-plugin.h"
#include "spell.h"
#include "spell-config.h"
#include "spell-speller.h"
struct t_config_file *spell_config_file = NULL;
struct t_config_section *spell_config_section_dict = NULL;
int spell_config_loading = 0;
/* spell config, color section */
struct t_config_option *spell_config_color_misspelled;
struct t_config_option *spell_config_color_suggestion;
struct t_config_option *spell_config_color_suggestion_delimiter_dict;
struct t_config_option *spell_config_color_suggestion_delimiter_word;
/* spell config, check section */
struct t_config_option *spell_config_check_commands;
struct t_config_option *spell_config_check_default_dict;
struct t_config_option *spell_config_check_during_search;
struct t_config_option *spell_config_check_enabled;
struct t_config_option *spell_config_check_real_time;
struct t_config_option *spell_config_check_suggestions;
struct t_config_option *spell_config_check_word_min_length;
/* spell config, look section */
struct t_config_option *spell_config_look_suggestion_delimiter_dict;
struct t_config_option *spell_config_look_suggestion_delimiter_word;
char **spell_commands_to_check = NULL;
int spell_count_commands_to_check = 0;
int *spell_length_commands_to_check = NULL;
/*
* Callback for changes on option "spell.check.commands".
*/
void
spell_config_change_commands (const void *pointer, void *data,
struct t_config_option *option)
{
const char *value;
int i;
/* make C compiler happy */
(void) pointer;
(void) data;
if (spell_commands_to_check)
{
weechat_string_free_split (spell_commands_to_check);
spell_commands_to_check = NULL;
spell_count_commands_to_check = 0;
}
if (spell_length_commands_to_check)
{
free (spell_length_commands_to_check);
spell_length_commands_to_check = NULL;
}
value = weechat_config_string (option);
if (value && value[0])
{
spell_commands_to_check = weechat_string_split (value,
",", 0, 0,
&spell_count_commands_to_check);
if (spell_count_commands_to_check > 0)
{
spell_length_commands_to_check = malloc (spell_count_commands_to_check *
sizeof (int));
for (i = 0; i < spell_count_commands_to_check; i++)
{
spell_length_commands_to_check[i] = strlen (spell_commands_to_check[i]);
}
}
}
}
/*
* Callback for changes on option "spell.check.default_dict".
*/
void
spell_config_change_default_dict (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
weechat_hashtable_remove_all (spell_speller_buffer);
if (!spell_config_loading)
spell_speller_remove_unused ();
}
/*
* Callback for changes on option "spell.check.enabled".
*/
void
spell_config_change_enabled (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
spell_enabled = weechat_config_boolean (option);
/* refresh input and spell suggestions */
weechat_bar_item_update ("input_text");
weechat_bar_item_update ("spell_suggest");
}
/*
* Callback for changes on option "spell.check.suggestions".
*/
void
spell_config_change_suggestions (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
weechat_bar_item_update ("spell_suggest");
}
/*
* Callback for changes on a dictionary.
*/
void
spell_config_dict_change (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
weechat_hashtable_remove_all (spell_speller_buffer);
if (!spell_config_loading)
spell_speller_remove_unused ();
}
/*
* Callback called when an option is deleted in section "dict".
*/
int
spell_config_dict_delete_option (const void *pointer, void *data,
struct t_config_file *config_file,
struct t_config_section *section,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) config_file;
(void) section;
weechat_config_option_free (option);
weechat_hashtable_remove_all (spell_speller_buffer);
if (!spell_config_loading)
spell_speller_remove_unused ();
return WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED;
}
/*
* Creates an option in section "dict".
*/
int
spell_config_dict_create_option (const void *pointer, void *data,
struct t_config_file *config_file,
struct t_config_section *section,
const char *option_name,
const char *value)
{
struct t_config_option *ptr_option;
int rc;
/* make C compiler happy */
(void) pointer;
(void) data;
rc = WEECHAT_CONFIG_OPTION_SET_ERROR;
if (value && value[0])
spell_speller_check_dictionaries (value);
if (option_name)
{
ptr_option = weechat_config_search_option (config_file, section,
option_name);
if (ptr_option)
{
if (value && value[0])
rc = weechat_config_option_set (ptr_option, value, 0);
else
{
weechat_config_option_free (ptr_option);
rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
}
}
else
{
if (value && value[0])
{
ptr_option = weechat_config_new_option (
config_file, section,
option_name, "string",
_("comma separated list of dictionaries to use on this buffer"),
NULL, 0, 0, "", value, 0,
NULL, NULL, NULL,
&spell_config_dict_change, NULL, NULL,
NULL, NULL, NULL);
rc = (ptr_option) ?
WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE : WEECHAT_CONFIG_OPTION_SET_ERROR;
}
else
rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
}
}
if (rc == WEECHAT_CONFIG_OPTION_SET_ERROR)
{
weechat_printf (NULL,
_("%s%s: error creating spell dictionary \"%s\" => \"%s\""),
weechat_prefix ("error"), SPELL_PLUGIN_NAME,
option_name, value);
}
else
{
weechat_hashtable_remove_all (spell_speller_buffer);
if (!spell_config_loading)
spell_speller_remove_unused ();
}
return rc;
}
/*
* Callback for changes on an spell option.
*/
void
spell_config_option_change (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
weechat_hashtable_remove_all (spell_speller_buffer);
if (!spell_config_loading)
spell_speller_remove_unused ();
}
/*
* Callback called when an option is deleted in section "option".
*/
int
spell_config_option_delete_option (const void *pointer, void *data,
struct t_config_file *config_file,
struct t_config_section *section,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) config_file;
(void) section;
weechat_config_option_free (option);
weechat_hashtable_remove_all (spell_speller_buffer);
if (!spell_config_loading)
spell_speller_remove_unused ();
return WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED;
}
/*
* Callback called when an option is created in section "option".
*/
int
spell_config_option_create_option (const void *pointer, void *data,
struct t_config_file *config_file,
struct t_config_section *section,
const char *option_name,
const char *value)
{
struct t_config_option *ptr_option;
int rc;
/* make C compiler happy */
(void) pointer;
(void) data;
rc = WEECHAT_CONFIG_OPTION_SET_ERROR;
if (option_name)
{
ptr_option = weechat_config_search_option (config_file, section,
option_name);
if (ptr_option)
{
if (value && value[0])
rc = weechat_config_option_set (ptr_option, value, 1);
else
{
weechat_config_option_free (ptr_option);
rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
}
}
else
{
if (value && value[0])
{
ptr_option = weechat_config_new_option (
config_file, section,
option_name, "string",
_("option for aspell (for list of available options and "
"format, run command \"aspell config\" in a shell)"),
NULL, 0, 0, "", value, 0,
NULL, NULL, NULL,
&spell_config_option_change, NULL, NULL,
NULL, NULL, NULL);
rc = (ptr_option) ?
WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE : WEECHAT_CONFIG_OPTION_SET_ERROR;
}
else
rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
}
}
if (rc == WEECHAT_CONFIG_OPTION_SET_ERROR)
{
weechat_printf (NULL,
_("%s%s: error creating spell option \"%s\" => \"%s\""),
weechat_prefix ("error"), SPELL_PLUGIN_NAME,
option_name, value);
}
else
{
weechat_hashtable_remove_all (spell_speller_buffer);
if (!spell_config_loading)
spell_speller_remove_unused ();
}
return rc;
}
/*
* Gets a list of dictionaries for a buffer.
*/
struct t_config_option *
spell_config_get_dict (const char *name)
{
return weechat_config_search_option (spell_config_file,
spell_config_section_dict,
name);
}
/*
* Sets a list of dictionaries for a buffer.
*/
int
spell_config_set_dict (const char *name, const char *value)
{
return spell_config_dict_create_option (NULL, NULL,
spell_config_file,
spell_config_section_dict,
name,
value);
}
/*
* Initializes spell configuration file.
*
* Returns:
* 1: OK
* 0: error
*/
int
spell_config_init ()
{
struct t_config_section *ptr_section;
spell_config_file = weechat_config_new (SPELL_CONFIG_NAME,
NULL, NULL, NULL);
if (!spell_config_file)
return 0;
/* color */
ptr_section = weechat_config_new_section (
spell_config_file, "color",
0, 0,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
if (!ptr_section)
{
weechat_config_free (spell_config_file);
spell_config_file = NULL;
return 0;
}
spell_config_color_misspelled = weechat_config_new_option (
spell_config_file, ptr_section,
"misspelled", "color",
N_("text color for misspelled words (input bar)"),
NULL, 0, 0, "lightred", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
spell_config_color_suggestion = weechat_config_new_option (
spell_config_file, ptr_section,
"suggestion", "color",
N_("text color for suggestion on a misspelled word in bar item "
"\"spell_suggest\""),
NULL, 0, 0, "default", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
spell_config_color_suggestion_delimiter_dict = weechat_config_new_option (
spell_config_file, ptr_section,
"suggestion_delimiter_dict", "color",
N_("text color for delimiters displayed between two dictionaries "
"in bar item \"spell_suggest\""),
NULL, 0, 0, "cyan", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
spell_config_color_suggestion_delimiter_word = weechat_config_new_option (
spell_config_file, ptr_section,
"suggestion_delimiter_word", "color",
N_("text color for delimiters displayed between two words in bar item "
"\"spell_suggest\""),
NULL, 0, 0, "cyan", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
/* check */
ptr_section = weechat_config_new_section (
spell_config_file, "check",
0, 0,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
if (!ptr_section)
{
weechat_config_free (spell_config_file);
spell_config_file = NULL;
return 0;
}
spell_config_check_commands = weechat_config_new_option (
spell_config_file, ptr_section,
"commands", "string",
N_("comma separated list of commands for which spell checking is "
"enabled (spell checking is disabled for all other commands)"),
NULL, 0, 0,
"ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,"
"quit,topic", NULL, 0,
NULL, NULL, NULL,
&spell_config_change_commands, NULL, NULL,
NULL, NULL, NULL);
spell_config_check_default_dict = weechat_config_new_option (
spell_config_file, ptr_section,
"default_dict", "string",
N_("default dictionary (or comma separated list of dictionaries) to "
"use when buffer has no dictionary defined (leave blank to disable "
"spell checker on buffers for which you didn't explicitly "
"enabled it)"),
NULL, 0, 0, "", NULL, 0,
NULL, NULL, NULL,
&spell_config_change_default_dict, NULL, NULL,
NULL, NULL, NULL);
spell_config_check_during_search = weechat_config_new_option (
spell_config_file, ptr_section,
"during_search", "boolean",
N_("check words during text search in buffer"),
NULL, 0, 0, "off", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
spell_config_check_enabled = weechat_config_new_option (
spell_config_file, ptr_section,
"enabled", "boolean",
N_("enable spell checker for command line"),
NULL, 0, 0, "off", NULL, 0,
NULL, NULL, NULL,
&spell_config_change_enabled, NULL, NULL,
NULL, NULL, NULL);
spell_config_check_real_time = weechat_config_new_option (
spell_config_file, ptr_section,
"real_time", "boolean",
N_("real-time spell checking of words (slower, disabled by default: "
"words are checked only if there's delimiter after)"),
NULL, 0, 0, "off", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
spell_config_check_suggestions = weechat_config_new_option (
spell_config_file, ptr_section,
"suggestions", "integer",
N_("number of suggestions to display in bar item \"spell_suggest\" "
"for each dictionary set in buffer (-1 = disable suggestions, "
"0 = display all possible suggestions in all languages)"),
NULL, -1, INT_MAX, "-1", NULL, 0,
NULL, NULL, NULL,
&spell_config_change_suggestions, NULL, NULL,
NULL, NULL, NULL);
spell_config_check_word_min_length = weechat_config_new_option (
spell_config_file, ptr_section,
"word_min_length", "integer",
N_("minimum length for a word to be spell checked (use 0 to check all "
"words)"),
NULL, 0, INT_MAX, "2", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
/* dict */
ptr_section = weechat_config_new_section (
spell_config_file, "dict",
1, 1,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
&spell_config_dict_create_option, NULL, NULL,
&spell_config_dict_delete_option, NULL, NULL);
if (!ptr_section)
{
weechat_config_free (spell_config_file);
spell_config_file = NULL;
return 0;
}
spell_config_section_dict = ptr_section;
/* look */
ptr_section = weechat_config_new_section (
spell_config_file, "look",
0, 0,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
if (!ptr_section)
{
weechat_config_free (spell_config_file);
spell_config_file = NULL;
return 0;
}
spell_config_look_suggestion_delimiter_dict = weechat_config_new_option (
spell_config_file, ptr_section,
"suggestion_delimiter_dict", "string",
N_("delimiter displayed between two dictionaries in bar item "
"\"spell_suggest\""),
NULL, 0, 0, " / ", NULL, 0,
NULL, NULL, NULL,
&spell_config_change_suggestions, NULL, NULL,
NULL, NULL, NULL);
spell_config_look_suggestion_delimiter_word = weechat_config_new_option (
spell_config_file, ptr_section,
"suggestion_delimiter_word", "string",
N_("delimiter displayed between two words in bar item "
"\"spell_suggest\""),
NULL, 0, 0, ",", NULL, 0,
NULL, NULL, NULL,
&spell_config_change_suggestions, NULL, NULL,
NULL, NULL, NULL);
/* option */
ptr_section = weechat_config_new_section (
spell_config_file, "option",
1, 1,
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL,
&spell_config_option_create_option, NULL, NULL,
&spell_config_option_delete_option, NULL, NULL);
if (!ptr_section)
{
weechat_config_free (spell_config_file);
spell_config_file = NULL;
return 0;
}
return 1;
}
/*
* Reads spell configuration file.
*/
int
spell_config_read ()
{
int rc;
spell_config_loading = 1;
rc = weechat_config_read (spell_config_file);
spell_config_loading = 0;
if (rc == WEECHAT_CONFIG_READ_OK)
spell_config_change_commands (NULL, NULL, spell_config_check_commands);
spell_speller_remove_unused ();
return rc;
}
/*
* Writes spell configuration file.
*/
int
spell_config_write ()
{
return weechat_config_write (spell_config_file);
}
/*
* Frees spell configuration.
*/
void
spell_config_free ()
{
weechat_config_free (spell_config_file);
if (spell_commands_to_check)
weechat_string_free_split (spell_commands_to_check);
if (spell_length_commands_to_check)
free (spell_length_commands_to_check);
}

View File

@ -0,0 +1,54 @@
/*
* Copyright (C) 2006 Emmanuel Bouthenot <kolter@openics.org>
* Copyright (C) 2006-2019 Sébastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef WEECHAT_PLUGIN_SPELL_CONFIG_H
#define WEECHAT_PLUGIN_SPELL_CONFIG_H
#define SPELL_CONFIG_NAME "spell"
extern struct t_config_option *spell_config_color_misspelled;
extern struct t_config_option *spell_config_color_suggestion;
extern struct t_config_option *spell_config_color_suggestion_delimiter_dict;
extern struct t_config_option *spell_config_color_suggestion_delimiter_word;
extern struct t_config_option *spell_config_check_commands;
extern struct t_config_option *spell_config_check_default_dict;
extern struct t_config_option *spell_config_check_during_search;
extern struct t_config_option *spell_config_check_enabled;
extern struct t_config_option *spell_config_check_real_time;
extern struct t_config_option *spell_config_check_suggestions;
extern struct t_config_option *spell_config_check_word_min_length;
extern struct t_config_option *spell_config_look_suggestion_delimiter_dict;
extern struct t_config_option *spell_config_look_suggestion_delimiter_word;
extern char **spell_commands_to_check;
extern int spell_count_commands_to_check;
extern int *spell_length_commands_to_check;
extern struct t_config_option *spell_config_get_dict (const char *name);
extern int spell_config_set_dict (const char *name, const char *value);
extern int spell_config_init ();
extern int spell_config_read ();
extern int spell_config_write ();
extern void spell_config_free ();
#endif /* WEECHAT_PLUGIN_SPELL_CONFIG_H */

View File

@ -1,5 +1,5 @@
/* /*
* weechat-aspell-info.c - info for aspell plugin * spell-info.c - info for spell checker plugin
* *
* Copyright (C) 2013-2019 Sébastien Helleu <flashcode@flashtux.org> * Copyright (C) 2013-2019 Sébastien Helleu <flashcode@flashtux.org>
* *
@ -24,17 +24,17 @@
#include <string.h> #include <string.h>
#include "../weechat-plugin.h" #include "../weechat-plugin.h"
#include "weechat-aspell.h" #include "spell.h"
/* /*
* Returns aspell info "aspell_dict". * Returns spell info "spell_dict".
*/ */
const char * const char *
weechat_aspell_info_info_aspell_dict_cb (const void *pointer, void *data, spell_info_info_spell_dict_cb (const void *pointer, void *data,
const char *info_name, const char *info_name,
const char *arguments) const char *arguments)
{ {
int rc; int rc;
unsigned long value; unsigned long value;
@ -67,23 +67,23 @@ weechat_aspell_info_info_aspell_dict_cb (const void *pointer, void *data,
buffer_full_name = arguments; buffer_full_name = arguments;
if (buffer_full_name) if (buffer_full_name)
return weechat_aspell_get_dict_with_buffer_name (buffer_full_name); return spell_get_dict_with_buffer_name (buffer_full_name);
return NULL; return NULL;
} }
/* /*
* Hooks info for aspell plugin. * Hooks info for spell plugin.
*/ */
void void
weechat_aspell_info_init () spell_info_init ()
{ {
/* info hooks */ /* info hooks */
weechat_hook_info ( weechat_hook_info (
"aspell_dict", "spell_dict",
N_("comma-separated list of dictionaries used in buffer"), N_("comma-separated list of dictionaries used in buffer"),
N_("buffer pointer (\"0x12345678\") or buffer full name " N_("buffer pointer (\"0x12345678\") or buffer full name "
"(\"irc.freenode.#weechat\")"), "(\"irc.freenode.#weechat\")"),
&weechat_aspell_info_info_aspell_dict_cb, NULL, NULL); &spell_info_info_spell_dict_cb, NULL, NULL);
} }

View File

@ -17,9 +17,9 @@
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>. * along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
*/ */
#ifndef WEECHAT_PLUGIN_ASPELL_COMPLETION_H #ifndef WEECHAT_PLUGIN_SPELL_INFO_H
#define WEECHAT_PLUGIN_ASPELL_COMPLETION_H #define WEECHAT_PLUGIN_SPELL_INFO_H
extern void weechat_aspell_completion_init (); extern void spell_info_init ();
#endif /* WEECHAT_PLUGIN_ASPELL_COMPLETION_H */ #endif /* WEECHAT_PLUGIN_SPELL_INFO_H */

View File

@ -1,5 +1,5 @@
/* /*
* weechat-aspell-speller.c - speller management for aspell plugin * spell-speller.c - speller management for spell checker plugin
* *
* Copyright (C) 2006 Emmanuel Bouthenot <kolter@openics.org> * Copyright (C) 2006 Emmanuel Bouthenot <kolter@openics.org>
* Copyright (C) 2006-2019 Sébastien Helleu <flashcode@flashtux.org> * Copyright (C) 2006-2019 Sébastien Helleu <flashcode@flashtux.org>
@ -24,34 +24,34 @@
#include <string.h> #include <string.h>
#include "../weechat-plugin.h" #include "../weechat-plugin.h"
#include "weechat-aspell.h" #include "spell.h"
#include "weechat-aspell-speller.h" #include "spell-speller.h"
#include "weechat-aspell-config.h" #include "spell-config.h"
/* /*
* spellers: one by dictionary (key is name of dictionary (eg: "fr"), value is * spellers: one by dictionary (key is name of dictionary (eg: "fr"), value is
* pointer on AspellSpeller) * pointer on AspellSpeller)
*/ */
struct t_hashtable *weechat_aspell_spellers = NULL; struct t_hashtable *spell_spellers = NULL;
/* /*
* spellers by buffer (key is buffer pointer, value is pointer on * spellers by buffer (key is buffer pointer, value is pointer on
* struct t_aspell_speller_buffer) * struct t_spell_speller_buffer)
*/ */
struct t_hashtable *weechat_aspell_speller_buffer = NULL; struct t_hashtable *spell_speller_buffer = NULL;
/* /*
* Checks if an aspell dictionary is supported (installed on system). * Checks if a spelling dictionary is supported (installed on system).
* *
* Returns: * Returns:
* 1: aspell dict is supported * 1: spell dict is supported
* 0: aspell dict is NOT supported * 0: spell dict is NOT supported
*/ */
int int
weechat_aspell_speller_dict_supported (const char *lang) spell_speller_dict_supported (const char *lang)
{ {
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
return enchant_broker_dict_exists (broker, lang); return enchant_broker_dict_exists (broker, lang);
@ -92,7 +92,7 @@ weechat_aspell_speller_dict_supported (const char *lang)
*/ */
void void
weechat_aspell_speller_check_dictionaries (const char *dict_list) spell_speller_check_dictionaries (const char *dict_list)
{ {
char **argv; char **argv;
int argc, i; int argc, i;
@ -104,12 +104,12 @@ weechat_aspell_speller_check_dictionaries (const char *dict_list)
{ {
for (i = 0; i < argc; i++) for (i = 0; i < argc; i++)
{ {
if (!weechat_aspell_speller_dict_supported (argv[i])) if (!spell_speller_dict_supported (argv[i]))
{ {
weechat_printf (NULL, weechat_printf (NULL,
_("%s: warning: dictionary \"%s\" is not " _("%s: warning: dictionary \"%s\" is not "
"available on your system"), "available on your system"),
ASPELL_PLUGIN_NAME, argv[i]); SPELL_PLUGIN_NAME, argv[i]);
} }
} }
weechat_string_free_split (argv); weechat_string_free_split (argv);
@ -120,7 +120,7 @@ weechat_aspell_speller_check_dictionaries (const char *dict_list)
/* /*
* Creates and adds a new speller instance in the hashtable. * Creates and adds a new speller instance in the hashtable.
* *
* Returns pointer to new aspell speller, NULL if error. * Returns pointer to new speller, NULL if error.
*/ */
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
@ -128,7 +128,7 @@ EnchantDict *
#else #else
AspellSpeller * AspellSpeller *
#endif /* USE_ENCHANT */ #endif /* USE_ENCHANT */
weechat_aspell_speller_new (const char *lang) spell_speller_new (const char *lang)
{ {
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
EnchantDict *new_speller; EnchantDict *new_speller;
@ -142,11 +142,11 @@ weechat_aspell_speller_new (const char *lang)
if (!lang) if (!lang)
return NULL; return NULL;
if (weechat_aspell_plugin->debug) if (weechat_spell_plugin->debug)
{ {
weechat_printf (NULL, weechat_printf (NULL,
"%s: creating new speller for lang \"%s\"", "%s: creating new speller for lang \"%s\"",
ASPELL_PLUGIN_NAME, lang); SPELL_PLUGIN_NAME, lang);
} }
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
@ -155,7 +155,7 @@ weechat_aspell_speller_new (const char *lang)
{ {
weechat_printf (NULL, weechat_printf (NULL,
_("%s%s: error: unable to create speller for lang \"%s\""), _("%s%s: error: unable to create speller for lang \"%s\""),
weechat_prefix ("error"), ASPELL_PLUGIN_NAME, weechat_prefix ("error"), SPELL_PLUGIN_NAME,
lang); lang);
return NULL; return NULL;
} }
@ -166,7 +166,7 @@ weechat_aspell_speller_new (const char *lang)
#endif /* USE_ENCHANT */ #endif /* USE_ENCHANT */
/* apply all options */ /* apply all options */
infolist = weechat_infolist_get ("option", NULL, "aspell.option.*"); infolist = weechat_infolist_get ("option", NULL, "spell.option.*");
if (infolist) if (infolist)
{ {
while (weechat_infolist_next (infolist)) while (weechat_infolist_next (infolist))
@ -189,7 +189,7 @@ weechat_aspell_speller_new (const char *lang)
{ {
weechat_printf (NULL, weechat_printf (NULL,
"%s%s: error: %s", "%s%s: error: %s",
weechat_prefix ("error"), ASPELL_PLUGIN_NAME, weechat_prefix ("error"), SPELL_PLUGIN_NAME,
aspell_error_message (ret)); aspell_error_message (ret));
delete_aspell_config (config); delete_aspell_config (config);
delete_aspell_can_have_error (ret); delete_aspell_can_have_error (ret);
@ -199,7 +199,7 @@ weechat_aspell_speller_new (const char *lang)
new_speller = to_aspell_speller (ret); new_speller = to_aspell_speller (ret);
#endif /* USE_ENCHANT */ #endif /* USE_ENCHANT */
weechat_hashtable_set (weechat_aspell_spellers, lang, new_speller); weechat_hashtable_set (spell_spellers, lang, new_speller);
#ifndef USE_ENCHANT #ifndef USE_ENCHANT
/* free configuration */ /* free configuration */
@ -209,9 +209,13 @@ weechat_aspell_speller_new (const char *lang)
return new_speller; return new_speller;
} }
/*
* Creates hashtable entries with a string containing a list of dicts.
*/
void void
weechat_aspell_speller_add_dicts_to_hash (struct t_hashtable *hashtable, spell_speller_add_dicts_to_hash (struct t_hashtable *hashtable,
const char *dict) const char *dict)
{ {
char **dicts; char **dicts;
int num_dicts, i; int num_dicts, i;
@ -235,9 +239,9 @@ weechat_aspell_speller_add_dicts_to_hash (struct t_hashtable *hashtable,
*/ */
void void
weechat_aspell_speller_remove_unused_cb (void *data, spell_speller_remove_unused_cb (void *data,
struct t_hashtable *hashtable, struct t_hashtable *hashtable,
const void *key, const void *value) const void *key, const void *value)
{ {
struct t_hashtable *used_spellers; struct t_hashtable *used_spellers;
@ -252,20 +256,20 @@ weechat_aspell_speller_remove_unused_cb (void *data,
} }
/* /*
* Removes unused spellers from hashtable "weechat_aspell_spellers". * Removes unused spellers from hashtable "spell_spellers".
*/ */
void void
weechat_aspell_speller_remove_unused () spell_speller_remove_unused ()
{ {
struct t_hashtable *used_spellers; struct t_hashtable *used_spellers;
struct t_infolist *infolist; struct t_infolist *infolist;
if (weechat_aspell_plugin->debug) if (weechat_spell_plugin->debug)
{ {
weechat_printf (NULL, weechat_printf (NULL,
"%s: removing unused spellers", "%s: removing unused spellers",
ASPELL_PLUGIN_NAME); SPELL_PLUGIN_NAME);
} }
/* create a hashtable that will contain all used spellers */ /* create a hashtable that will contain all used spellers */
@ -277,15 +281,15 @@ weechat_aspell_speller_remove_unused ()
return; return;
/* collect used spellers and store them in hashtable "used_spellers" */ /* collect used spellers and store them in hashtable "used_spellers" */
weechat_aspell_speller_add_dicts_to_hash (used_spellers, spell_speller_add_dicts_to_hash (used_spellers,
weechat_config_string (weechat_aspell_config_check_default_dict)); weechat_config_string (spell_config_check_default_dict));
infolist = weechat_infolist_get ("option", NULL, "aspell.dict.*"); infolist = weechat_infolist_get ("option", NULL, "spell.dict.*");
if (infolist) if (infolist)
{ {
while (weechat_infolist_next (infolist)) while (weechat_infolist_next (infolist))
{ {
weechat_aspell_speller_add_dicts_to_hash (used_spellers, spell_speller_add_dicts_to_hash (used_spellers,
weechat_infolist_string (infolist, "value")); weechat_infolist_string (infolist, "value"));
} }
weechat_infolist_free (infolist); weechat_infolist_free (infolist);
} }
@ -294,19 +298,19 @@ weechat_aspell_speller_remove_unused ()
* look at current spellers, and remove spellers that are not in hashtable * look at current spellers, and remove spellers that are not in hashtable
* "used_spellers" * "used_spellers"
*/ */
weechat_hashtable_map (weechat_aspell_spellers, weechat_hashtable_map (spell_spellers,
&weechat_aspell_speller_remove_unused_cb, &spell_speller_remove_unused_cb,
used_spellers); used_spellers);
weechat_hashtable_free (used_spellers); weechat_hashtable_free (used_spellers);
} }
/* /*
* Callback called when a key is removed in hashtable "weechat_aspell_spellers". * Callback called when a key is removed in hashtable "spell_spellers".
*/ */
void void
weechat_aspell_speller_free_value_cb (struct t_hashtable *hashtable, spell_speller_free_value_cb (struct t_hashtable *hashtable,
const void *key, void *value) const void *key, void *value)
{ {
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
@ -318,11 +322,11 @@ weechat_aspell_speller_free_value_cb (struct t_hashtable *hashtable,
/* make C compiler happy */ /* make C compiler happy */
(void) hashtable; (void) hashtable;
if (weechat_aspell_plugin->debug) if (weechat_spell_plugin->debug)
{ {
weechat_printf (NULL, weechat_printf (NULL,
"%s: removing speller for lang \"%s\"", "%s: removing speller for lang \"%s\"",
ASPELL_PLUGIN_NAME, (const char *)key); SPELL_PLUGIN_NAME, (const char *)key);
} }
/* free speller */ /* free speller */
@ -338,16 +342,16 @@ weechat_aspell_speller_free_value_cb (struct t_hashtable *hashtable,
/* /*
* Creates a structure for buffer speller info in hashtable * Creates a structure for buffer speller info in hashtable
* "weechat_aspell_buffer_spellers". * "spell_buffer_spellers".
*/ */
struct t_aspell_speller_buffer * struct t_spell_speller_buffer *
weechat_aspell_speller_buffer_new (struct t_gui_buffer *buffer) spell_speller_buffer_new (struct t_gui_buffer *buffer)
{ {
const char *buffer_dicts; const char *buffer_dicts;
char **dicts; char **dicts;
int num_dicts, i; int num_dicts, i;
struct t_aspell_speller_buffer *new_speller_buffer; struct t_spell_speller_buffer *new_speller_buffer;
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
EnchantDict *ptr_speller; EnchantDict *ptr_speller;
#else #else
@ -357,7 +361,7 @@ weechat_aspell_speller_buffer_new (struct t_gui_buffer *buffer)
if (!buffer) if (!buffer)
return NULL; return NULL;
weechat_hashtable_remove (weechat_aspell_speller_buffer, buffer); weechat_hashtable_remove (spell_speller_buffer, buffer);
new_speller_buffer = malloc (sizeof (*new_speller_buffer)); new_speller_buffer = malloc (sizeof (*new_speller_buffer));
if (!new_speller_buffer) if (!new_speller_buffer)
@ -368,7 +372,7 @@ weechat_aspell_speller_buffer_new (struct t_gui_buffer *buffer)
new_speller_buffer->input_pos = -1; new_speller_buffer->input_pos = -1;
new_speller_buffer->modifier_result = NULL; new_speller_buffer->modifier_result = NULL;
buffer_dicts = weechat_aspell_get_dict (buffer); buffer_dicts = spell_get_dict (buffer);
if (buffer_dicts) if (buffer_dicts)
{ {
dicts = weechat_string_split (buffer_dicts, ",", 0, 0, &num_dicts); dicts = weechat_string_split (buffer_dicts, ",", 0, 0, &num_dicts);
@ -384,10 +388,10 @@ weechat_aspell_speller_buffer_new (struct t_gui_buffer *buffer)
{ {
for (i = 0; i < num_dicts; i++) for (i = 0; i < num_dicts; i++)
{ {
ptr_speller = weechat_hashtable_get (weechat_aspell_spellers, ptr_speller = weechat_hashtable_get (spell_spellers,
dicts[i]); dicts[i]);
if (!ptr_speller) if (!ptr_speller)
ptr_speller = weechat_aspell_speller_new (dicts[i]); ptr_speller = spell_speller_new (dicts[i]);
new_speller_buffer->spellers[i] = ptr_speller; new_speller_buffer->spellers[i] = ptr_speller;
} }
new_speller_buffer->spellers[num_dicts] = NULL; new_speller_buffer->spellers[num_dicts] = NULL;
@ -397,31 +401,31 @@ weechat_aspell_speller_buffer_new (struct t_gui_buffer *buffer)
weechat_string_free_split (dicts); weechat_string_free_split (dicts);
} }
weechat_hashtable_set (weechat_aspell_speller_buffer, weechat_hashtable_set (spell_speller_buffer,
buffer, buffer,
new_speller_buffer); new_speller_buffer);
weechat_bar_item_update ("aspell_dict"); weechat_bar_item_update ("spell_dict");
return new_speller_buffer; return new_speller_buffer;
} }
/* /*
* Callback called when a key is removed in hashtable * Callback called when a key is removed in hashtable
* "weechat_aspell_speller_buffer". * "spell_speller_buffer".
*/ */
void void
weechat_aspell_speller_buffer_free_value_cb (struct t_hashtable *hashtable, spell_speller_buffer_free_value_cb (struct t_hashtable *hashtable,
const void *key, void *value) const void *key, void *value)
{ {
struct t_aspell_speller_buffer *ptr_speller_buffer; struct t_spell_speller_buffer *ptr_speller_buffer;
/* make C compiler happy */ /* make C compiler happy */
(void) hashtable; (void) hashtable;
(void) key; (void) key;
ptr_speller_buffer = (struct t_aspell_speller_buffer *)value; ptr_speller_buffer = (struct t_spell_speller_buffer *)value;
if (ptr_speller_buffer->spellers) if (ptr_speller_buffer->spellers)
free (ptr_speller_buffer->spellers); free (ptr_speller_buffer->spellers);
@ -442,30 +446,30 @@ weechat_aspell_speller_buffer_free_value_cb (struct t_hashtable *hashtable,
*/ */
int int
weechat_aspell_speller_init () spell_speller_init ()
{ {
weechat_aspell_spellers = weechat_hashtable_new (32, spell_spellers = weechat_hashtable_new (32,
WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_POINTER, WEECHAT_HASHTABLE_POINTER,
NULL, NULL); NULL, NULL);
if (!weechat_aspell_spellers) if (!spell_spellers)
return 0; return 0;
weechat_hashtable_set_pointer (weechat_aspell_spellers, weechat_hashtable_set_pointer (spell_spellers,
"callback_free_value", "callback_free_value",
&weechat_aspell_speller_free_value_cb); &spell_speller_free_value_cb);
weechat_aspell_speller_buffer = weechat_hashtable_new (32, spell_speller_buffer = weechat_hashtable_new (32,
WEECHAT_HASHTABLE_POINTER, WEECHAT_HASHTABLE_POINTER,
WEECHAT_HASHTABLE_POINTER, WEECHAT_HASHTABLE_POINTER,
NULL, NULL); NULL, NULL);
if (!weechat_aspell_speller_buffer) if (!spell_speller_buffer)
{ {
weechat_hashtable_free (weechat_aspell_spellers); weechat_hashtable_free (spell_spellers);
return 0; return 0;
} }
weechat_hashtable_set_pointer (weechat_aspell_speller_buffer, weechat_hashtable_set_pointer (spell_speller_buffer,
"callback_free_value", "callback_free_value",
&weechat_aspell_speller_buffer_free_value_cb); &spell_speller_buffer_free_value_cb);
return 1; return 1;
} }
@ -475,8 +479,8 @@ weechat_aspell_speller_init ()
*/ */
void void
weechat_aspell_speller_end () spell_speller_end ()
{ {
weechat_hashtable_free (weechat_aspell_spellers); weechat_hashtable_free (spell_spellers);
weechat_hashtable_free (weechat_aspell_speller_buffer); weechat_hashtable_free (spell_speller_buffer);
} }

View File

@ -18,10 +18,10 @@
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>. * along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
*/ */
#ifndef WEECHAT_PLUGIN_ASPELL_SPELLER_H #ifndef WEECHAT_PLUGIN_SPELL_SPELLER_H
#define WEECHAT_PLUGIN_ASPELL_SPELLER_H #define WEECHAT_PLUGIN_SPELL_SPELLER_H
struct t_aspell_speller_buffer struct t_spell_speller_buffer
{ {
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
EnchantDict **spellers; /* enchant spellers for buffer */ EnchantDict **spellers; /* enchant spellers for buffer */
@ -33,19 +33,19 @@ struct t_aspell_speller_buffer
char *modifier_result; /* last modifier result */ char *modifier_result; /* last modifier result */
}; };
extern struct t_hashtable *weechat_aspell_spellers; extern struct t_hashtable *spell_spellers;
extern struct t_hashtable *weechat_aspell_speller_buffer; extern struct t_hashtable *spell_speller_buffer;
extern int weechat_aspell_speller_dict_supported (const char *lang); extern int spell_speller_dict_supported (const char *lang);
extern void weechat_aspell_speller_check_dictionaries (const char *dict_list); extern void spell_speller_check_dictionaries (const char *dict_list);
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
extern EnchantDict *weechat_aspell_speller_new (const char *lang); extern EnchantDict *spell_speller_new (const char *lang);
#else #else
extern AspellSpeller *weechat_aspell_speller_new (const char *lang); extern AspellSpeller *spell_speller_new (const char *lang);
#endif /* USE_ENCHANT */ #endif /* USE_ENCHANT */
extern void weechat_aspell_speller_remove_unused (); extern void spell_speller_remove_unused ();
extern struct t_aspell_speller_buffer *weechat_aspell_speller_buffer_new (struct t_gui_buffer *buffer); extern struct t_spell_speller_buffer *spell_speller_buffer_new (struct t_gui_buffer *buffer);
extern int weechat_aspell_speller_init (); extern int spell_speller_init ();
extern void weechat_aspell_speller_end (); extern void spell_speller_end ();
#endif /* WEECHAT_PLUGIN_ASPELL_SPELLER_H */ #endif /* WEECHAT_PLUGIN_SPELL_SPELLER_H */

View File

@ -1,5 +1,5 @@
/* /*
* weechat-aspell.c - aspell plugin for WeeChat: color for misspelled words * spell.c - spell checker plugin for WeeChat
* *
* Copyright (C) 2006 Emmanuel Bouthenot <kolter@openics.org> * Copyright (C) 2006 Emmanuel Bouthenot <kolter@openics.org>
* Copyright (C) 2006-2019 Sébastien Helleu <flashcode@flashtux.org> * Copyright (C) 2006-2019 Sébastien Helleu <flashcode@flashtux.org>
@ -32,28 +32,28 @@
#include <wctype.h> #include <wctype.h>
#include "../weechat-plugin.h" #include "../weechat-plugin.h"
#include "weechat-aspell.h" #include "spell.h"
#include "weechat-aspell-bar-item.h" #include "spell-bar-item.h"
#include "weechat-aspell-command.h" #include "spell-command.h"
#include "weechat-aspell-completion.h" #include "spell-completion.h"
#include "weechat-aspell-config.h" #include "spell-config.h"
#include "weechat-aspell-info.h" #include "spell-info.h"
#include "weechat-aspell-speller.h" #include "spell-speller.h"
WEECHAT_PLUGIN_NAME(ASPELL_PLUGIN_NAME); WEECHAT_PLUGIN_NAME(SPELL_PLUGIN_NAME);
WEECHAT_PLUGIN_DESCRIPTION(N_("Spell checker for input (with Aspell)")); WEECHAT_PLUGIN_DESCRIPTION(N_("Spell checker for input"));
WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>"); WEECHAT_PLUGIN_AUTHOR("Sébastien Helleu <flashcode@flashtux.org>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE); WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
WEECHAT_PLUGIN_PRIORITY(11000); WEECHAT_PLUGIN_PRIORITY(11000);
struct t_weechat_plugin *weechat_aspell_plugin = NULL; struct t_weechat_plugin *weechat_spell_plugin = NULL;
int aspell_enabled = 0; int spell_enabled = 0;
char *aspell_nick_completer = NULL; char *spell_nick_completer = NULL;
int aspell_len_nick_completer = 0; int spell_len_nick_completer = 0;
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
EnchantBroker *broker = NULL; EnchantBroker *broker = NULL;
@ -64,7 +64,7 @@ EnchantBroker *broker = NULL;
* URL: ftp://ftp.gnu.org/gnu/aspell/dict/0index.html * URL: ftp://ftp.gnu.org/gnu/aspell/dict/0index.html
*/ */
struct t_aspell_code aspell_langs[] = struct t_spell_code spell_langs[] =
{ {
{ "af", "Afrikaans" }, { "af", "Afrikaans" },
{ "am", "Amharic" }, { "am", "Amharic" },
@ -160,7 +160,7 @@ struct t_aspell_code aspell_langs[] =
{ NULL, NULL} { NULL, NULL}
}; };
struct t_aspell_code aspell_countries[] = struct t_spell_code spell_countries[] =
{ {
{ "AT", "Austria" }, { "AT", "Austria" },
{ "BR", "Brazil" }, { "BR", "Brazil" },
@ -175,7 +175,7 @@ struct t_aspell_code aspell_countries[] =
{ NULL, NULL} { NULL, NULL}
}; };
char *aspell_url_prefix[] = char *spell_url_prefix[] =
{ "http:", "https:", "ftp:", "tftp:", "ftps:", "ssh:", "fish:", "dict:", { "http:", "https:", "ftp:", "tftp:", "ftps:", "ssh:", "fish:", "dict:",
"ldap:", "file:", "telnet:", "gopher:", "irc:", "ircs:", "irc6:", "irc6s:", "ldap:", "file:", "telnet:", "gopher:", "irc:", "ircs:", "irc6:", "irc6s:",
"cvs:", "svn:", "svn+ssh:", "git:", NULL }; "cvs:", "svn:", "svn+ssh:", "git:", NULL };
@ -188,7 +188,7 @@ char *aspell_url_prefix[] =
*/ */
char * char *
weechat_aspell_build_option_name (struct t_gui_buffer *buffer) spell_build_option_name (struct t_gui_buffer *buffer)
{ {
const char *plugin_name, *name; const char *plugin_name, *name;
char *option_name; char *option_name;
@ -218,7 +218,7 @@ weechat_aspell_build_option_name (struct t_gui_buffer *buffer)
*/ */
const char * const char *
weechat_aspell_get_dict_with_buffer_name (const char *name) spell_get_dict_with_buffer_name (const char *name)
{ {
char *option_name, *ptr_end; char *option_name, *ptr_end;
struct t_config_option *ptr_option; struct t_config_option *ptr_option;
@ -232,7 +232,7 @@ weechat_aspell_get_dict_with_buffer_name (const char *name)
ptr_end = option_name + strlen (option_name); ptr_end = option_name + strlen (option_name);
while (ptr_end >= option_name) while (ptr_end >= option_name)
{ {
ptr_option = weechat_aspell_config_get_dict (option_name); ptr_option = spell_config_get_dict (option_name);
if (ptr_option) if (ptr_option)
{ {
free (option_name); free (option_name);
@ -246,7 +246,7 @@ weechat_aspell_get_dict_with_buffer_name (const char *name)
if ((ptr_end >= option_name) && (ptr_end[0] == '.')) if ((ptr_end >= option_name) && (ptr_end[0] == '.'))
ptr_end[0] = '\0'; ptr_end[0] = '\0';
} }
ptr_option = weechat_aspell_config_get_dict (option_name); ptr_option = spell_config_get_dict (option_name);
free (option_name); free (option_name);
@ -255,10 +255,10 @@ weechat_aspell_get_dict_with_buffer_name (const char *name)
} }
/* nothing found => return default dictionary (if set) */ /* nothing found => return default dictionary (if set) */
if (weechat_config_string (weechat_aspell_config_check_default_dict) if (weechat_config_string (spell_config_check_default_dict)
&& weechat_config_string (weechat_aspell_config_check_default_dict)[0]) && weechat_config_string (spell_config_check_default_dict)[0])
{ {
return weechat_config_string (weechat_aspell_config_check_default_dict); return weechat_config_string (spell_config_check_default_dict);
} }
/* no default dictionary set */ /* no default dictionary set */
@ -273,16 +273,16 @@ weechat_aspell_get_dict_with_buffer_name (const char *name)
*/ */
const char * const char *
weechat_aspell_get_dict (struct t_gui_buffer *buffer) spell_get_dict (struct t_gui_buffer *buffer)
{ {
char *name; char *name;
const char *dict; const char *dict;
name = weechat_aspell_build_option_name (buffer); name = spell_build_option_name (buffer);
if (!name) if (!name)
return NULL; return NULL;
dict = weechat_aspell_get_dict_with_buffer_name (name); dict = spell_get_dict_with_buffer_name (name);
free (name); free (name);
@ -298,7 +298,7 @@ weechat_aspell_get_dict (struct t_gui_buffer *buffer)
*/ */
int int
weechat_aspell_command_authorized (const char *command) spell_command_authorized (const char *command)
{ {
int length_command, i; int length_command, i;
@ -307,11 +307,11 @@ weechat_aspell_command_authorized (const char *command)
length_command = strlen (command); length_command = strlen (command);
for (i = 0; i < weechat_aspell_count_commands_to_check; i++) for (i = 0; i < spell_count_commands_to_check; i++)
{ {
if ((weechat_aspell_length_commands_to_check[i] == length_command) if ((spell_length_commands_to_check[i] == length_command)
&& (weechat_strcasecmp (command, && (weechat_strcasecmp (command,
weechat_aspell_commands_to_check[i]) == 0)) spell_commands_to_check[i]) == 0))
{ {
/* command is authorized */ /* command is authorized */
return 1; return 1;
@ -331,14 +331,14 @@ weechat_aspell_command_authorized (const char *command)
*/ */
int int
weechat_aspell_string_is_url (const char *word) spell_string_is_url (const char *word)
{ {
int i; int i;
for (i = 0; aspell_url_prefix[i]; i++) for (i = 0; spell_url_prefix[i]; i++)
{ {
if (weechat_strncasecmp (word, aspell_url_prefix[i], if (weechat_strncasecmp (word, spell_url_prefix[i],
strlen (aspell_url_prefix[i])) == 0) strlen (spell_url_prefix[i])) == 0)
return 1; return 1;
} }
@ -355,21 +355,21 @@ weechat_aspell_string_is_url (const char *word)
*/ */
int int
weechat_aspell_string_is_nick (struct t_gui_buffer *buffer, const char *word) spell_string_is_nick (struct t_gui_buffer *buffer, const char *word)
{ {
char *pos, *pos_nick_completer, *pos_space, saved_char; char *pos, *pos_nick_completer, *pos_space, saved_char;
const char *buffer_type, *buffer_nick, *buffer_channel; const char *buffer_type, *buffer_nick, *buffer_channel;
int rc; int rc;
pos_nick_completer = (aspell_nick_completer) ? pos_nick_completer = (spell_nick_completer) ?
strstr (word, aspell_nick_completer) : NULL; strstr (word, spell_nick_completer) : NULL;
pos_space = strchr (word, ' '); pos_space = strchr (word, ' ');
pos = NULL; pos = NULL;
if (pos_nick_completer && pos_space) if (pos_nick_completer && pos_space)
{ {
if ((pos_nick_completer < pos_space) if ((pos_nick_completer < pos_space)
&& (pos_nick_completer + aspell_len_nick_completer == pos_space)) && (pos_nick_completer + spell_len_nick_completer == pos_space))
{ {
pos = pos_nick_completer; pos = pos_nick_completer;
} }
@ -378,7 +378,8 @@ weechat_aspell_string_is_nick (struct t_gui_buffer *buffer, const char *word)
} }
else else
{ {
pos = (pos_nick_completer && !pos_nick_completer[aspell_len_nick_completer]) ? pos = (pos_nick_completer
&& !pos_nick_completer[spell_len_nick_completer]) ?
pos_nick_completer : pos_space; pos_nick_completer : pos_space;
} }
@ -431,7 +432,7 @@ weechat_aspell_string_is_nick (struct t_gui_buffer *buffer, const char *word)
*/ */
int int
weechat_aspell_string_is_simili_number (const char *word) spell_string_is_simili_number (const char *word)
{ {
int code_point; int code_point;
@ -459,18 +460,18 @@ weechat_aspell_string_is_simili_number (const char *word)
*/ */
int int
weechat_aspell_check_word (struct t_aspell_speller_buffer *speller_buffer, spell_check_word (struct t_spell_speller_buffer *speller_buffer,
const char *word) const char *word)
{ {
int i; int i;
/* word too small? then do not check word */ /* word too small? then do not check word */
if ((weechat_config_integer (weechat_aspell_config_check_word_min_length) > 0) if ((weechat_config_integer (spell_config_check_word_min_length) > 0)
&& ((int)strlen (word) < weechat_config_integer (weechat_aspell_config_check_word_min_length))) && ((int)strlen (word) < weechat_config_integer (spell_config_check_word_min_length)))
return 1; return 1;
/* word is a number? then do not check word */ /* word is a number? then do not check word */
if (weechat_aspell_string_is_simili_number (word)) if (spell_string_is_simili_number (word))
return 1; return 1;
/* check word with all spellers (order is important) */ /* check word with all spellers (order is important) */
@ -500,8 +501,8 @@ weechat_aspell_check_word (struct t_aspell_speller_buffer *speller_buffer,
*/ */
char * char *
weechat_aspell_get_suggestions (struct t_aspell_speller_buffer *speller_buffer, spell_get_suggestions (struct t_spell_speller_buffer *speller_buffer,
const char *word) const char *word)
{ {
int i, size, max_suggestions, num_suggestions; int i, size, max_suggestions, num_suggestions;
char *suggestions, *suggestions2; char *suggestions, *suggestions2;
@ -514,7 +515,7 @@ weechat_aspell_get_suggestions (struct t_aspell_speller_buffer *speller_buffer,
AspellStringEnumeration *elements; AspellStringEnumeration *elements;
#endif /* USE_ENCHANT */ #endif /* USE_ENCHANT */
max_suggestions = weechat_config_integer (weechat_aspell_config_check_suggestions); max_suggestions = weechat_config_integer (spell_config_check_suggestions);
if (max_suggestions < 0) if (max_suggestions < 0)
return NULL; return NULL;
@ -603,13 +604,13 @@ weechat_aspell_get_suggestions (struct t_aspell_speller_buffer *speller_buffer,
*/ */
char * char *
weechat_aspell_modifier_cb (const void *pointer, void *data, spell_modifier_cb (const void *pointer, void *data,
const char *modifier, const char *modifier,
const char *modifier_data, const char *string) const char *modifier_data, const char *string)
{ {
unsigned long value; unsigned long value;
struct t_gui_buffer *buffer; struct t_gui_buffer *buffer;
struct t_aspell_speller_buffer *ptr_speller_buffer; struct t_spell_speller_buffer *ptr_speller_buffer;
char *result, *ptr_string, *ptr_string_orig, *pos_space; char *result, *ptr_string, *ptr_string_orig, *pos_space;
char *ptr_end, *ptr_end_valid, save_end; char *ptr_end, *ptr_end_valid, save_end;
char *misspelled_word, *old_misspelled_word, *old_suggestions, *suggestions; char *misspelled_word, *old_misspelled_word, *old_suggestions, *suggestions;
@ -625,7 +626,7 @@ weechat_aspell_modifier_cb (const void *pointer, void *data,
(void) data; (void) data;
(void) modifier; (void) modifier;
if (!aspell_enabled) if (!spell_enabled)
return NULL; return NULL;
if (!string) if (!string)
@ -639,15 +640,15 @@ weechat_aspell_modifier_cb (const void *pointer, void *data,
/* check text during search only if option is enabled */ /* check text during search only if option is enabled */
if (weechat_buffer_get_integer (buffer, "text_search") if (weechat_buffer_get_integer (buffer, "text_search")
&& !weechat_config_boolean (weechat_aspell_config_check_during_search)) && !weechat_config_boolean (spell_config_check_during_search))
return NULL; return NULL;
/* get structure with speller info for buffer */ /* get structure with speller info for buffer */
ptr_speller_buffer = weechat_hashtable_get (weechat_aspell_speller_buffer, ptr_speller_buffer = weechat_hashtable_get (spell_speller_buffer,
buffer); buffer);
if (!ptr_speller_buffer) if (!ptr_speller_buffer)
{ {
ptr_speller_buffer = weechat_aspell_speller_buffer_new (buffer); ptr_speller_buffer = spell_speller_buffer_new (buffer);
if (!ptr_speller_buffer) if (!ptr_speller_buffer)
return NULL; return NULL;
} }
@ -661,7 +662,7 @@ weechat_aspell_modifier_cb (const void *pointer, void *data,
input_pos = weechat_buffer_get_integer (buffer, "input_pos"); input_pos = weechat_buffer_get_integer (buffer, "input_pos");
if (ptr_speller_buffer->modifier_string if (ptr_speller_buffer->modifier_string
&& (strcmp (string, ptr_speller_buffer->modifier_string) == 0) && (strcmp (string, ptr_speller_buffer->modifier_string) == 0)
&& ((weechat_config_integer (weechat_aspell_config_check_suggestions) < 0) && ((weechat_config_integer (spell_config_check_suggestions) < 0)
|| (input_pos == ptr_speller_buffer->input_pos))) || (input_pos == ptr_speller_buffer->input_pos)))
{ {
return (ptr_speller_buffer->modifier_result) ? return (ptr_speller_buffer->modifier_result) ?
@ -688,7 +689,7 @@ weechat_aspell_modifier_cb (const void *pointer, void *data,
color_normal = weechat_color ("bar_fg"); color_normal = weechat_color ("bar_fg");
length_color_normal = strlen (color_normal); length_color_normal = strlen (color_normal);
color_error = weechat_color (weechat_config_string (weechat_aspell_config_color_misspelled)); color_error = weechat_color (weechat_config_string (spell_config_color_misspelled));
length_color_error = strlen (color_error); length_color_error = strlen (color_error);
length = strlen (string); length = strlen (string);
@ -720,7 +721,7 @@ weechat_aspell_modifier_cb (const void *pointer, void *data,
pos_space[0] = '\0'; pos_space[0] = '\0';
/* exit if command is not authorized for spell checking */ /* exit if command is not authorized for spell checking */
if (!weechat_aspell_command_authorized (ptr_string)) if (!spell_command_authorized (ptr_string))
{ {
free (result); free (result);
return NULL; return NULL;
@ -787,8 +788,8 @@ weechat_aspell_modifier_cb (const void *pointer, void *data,
ptr_end = (char *)weechat_utf8_next_char (ptr_end_valid); ptr_end = (char *)weechat_utf8_next_char (ptr_end_valid);
word_end_pos = word_end_pos_valid; word_end_pos = word_end_pos_valid;
word_ok = 0; word_ok = 0;
if (weechat_aspell_string_is_url (ptr_string) if (spell_string_is_url (ptr_string)
|| weechat_aspell_string_is_nick (buffer, ptr_string_orig)) || spell_string_is_nick (buffer, ptr_string_orig))
{ {
/* /*
* word is an URL or a nick, then it is OK: search for next * word is an URL or a nick, then it is OK: search for next
@ -814,10 +815,10 @@ weechat_aspell_modifier_cb (const void *pointer, void *data,
if (!word_ok) if (!word_ok)
{ {
if ((save_end != '\0') if ((save_end != '\0')
|| (weechat_config_integer (weechat_aspell_config_check_real_time))) || (weechat_config_integer (spell_config_check_real_time)))
{ {
word_ok = weechat_aspell_check_word (ptr_speller_buffer, word_ok = spell_check_word (ptr_speller_buffer,
ptr_string); ptr_string);
if (!word_ok && (input_pos >= word_start_pos)) if (!word_ok && (input_pos >= word_start_pos))
{ {
/* /*
@ -864,7 +865,7 @@ weechat_aspell_modifier_cb (const void *pointer, void *data,
/* save old suggestions in buffer */ /* save old suggestions in buffer */
ptr_suggestions = weechat_buffer_get_string (buffer, ptr_suggestions = weechat_buffer_get_string (buffer,
"localvar_aspell_suggest"); "localvar_spell_suggest");
old_suggestions = (ptr_suggestions) ? strdup (ptr_suggestions) : NULL; old_suggestions = (ptr_suggestions) ? strdup (ptr_suggestions) : NULL;
/* if there is a misspelled word, get suggestions and set them in buffer */ /* if there is a misspelled word, get suggestions and set them in buffer */
@ -872,7 +873,7 @@ weechat_aspell_modifier_cb (const void *pointer, void *data,
{ {
/* /*
* get the old misspelled word; we'll get suggestions or clear * get the old misspelled word; we'll get suggestions or clear
* local variable "aspell_suggest" only if the current misspelled * local variable "spell_suggest" only if the current misspelled
* word is different * word is different
*/ */
old_misspelled_word = NULL; old_misspelled_word = NULL;
@ -887,8 +888,8 @@ weechat_aspell_modifier_cb (const void *pointer, void *data,
if (!old_misspelled_word if (!old_misspelled_word
|| (strcmp (old_misspelled_word, misspelled_word) != 0)) || (strcmp (old_misspelled_word, misspelled_word) != 0))
{ {
suggestions = weechat_aspell_get_suggestions (ptr_speller_buffer, suggestions = spell_get_suggestions (ptr_speller_buffer,
misspelled_word); misspelled_word);
if (suggestions) if (suggestions)
{ {
length = strlen (misspelled_word) + 1 /* ":" */ length = strlen (misspelled_word) + 1 /* ":" */
@ -898,21 +899,21 @@ weechat_aspell_modifier_cb (const void *pointer, void *data,
{ {
snprintf (word_and_suggestions, length, "%s:%s", snprintf (word_and_suggestions, length, "%s:%s",
misspelled_word, suggestions); misspelled_word, suggestions);
weechat_buffer_set (buffer, "localvar_set_aspell_suggest", weechat_buffer_set (buffer, "localvar_set_spell_suggest",
word_and_suggestions); word_and_suggestions);
free (word_and_suggestions); free (word_and_suggestions);
} }
else else
{ {
weechat_buffer_set (buffer, weechat_buffer_set (buffer,
"localvar_del_aspell_suggest", ""); "localvar_del_spell_suggest", "");
} }
free (suggestions); free (suggestions);
} }
else else
{ {
/* set a misspelled word in buffer, also without suggestions */ /* set a misspelled word in buffer, also without suggestions */
weechat_buffer_set (buffer, "localvar_set_aspell_suggest", weechat_buffer_set (buffer, "localvar_set_spell_suggest",
misspelled_word); misspelled_word);
} }
} }
@ -924,22 +925,22 @@ weechat_aspell_modifier_cb (const void *pointer, void *data,
} }
else else
{ {
weechat_buffer_set (buffer, "localvar_del_aspell_suggest", ""); weechat_buffer_set (buffer, "localvar_del_spell_suggest", "");
} }
/* /*
* if suggestions have changed, update the bar item * if suggestions have changed, update the bar item
* and send signal "aspell_suggest" * and send signal "spell_suggest"
*/ */
ptr_suggestions = weechat_buffer_get_string (buffer, ptr_suggestions = weechat_buffer_get_string (buffer,
"localvar_aspell_suggest"); "localvar_spell_suggest");
if ((old_suggestions && !ptr_suggestions) if ((old_suggestions && !ptr_suggestions)
|| (!old_suggestions && ptr_suggestions) || (!old_suggestions && ptr_suggestions)
|| (old_suggestions && ptr_suggestions || (old_suggestions && ptr_suggestions
&& (strcmp (old_suggestions, ptr_suggestions) != 0))) && (strcmp (old_suggestions, ptr_suggestions) != 0)))
{ {
weechat_bar_item_update ("aspell_suggest"); weechat_bar_item_update ("spell_suggest");
(void) weechat_hook_signal_send ("aspell_suggest", (void) weechat_hook_signal_send ("spell_suggest",
WEECHAT_HOOK_SIGNAL_POINTER, buffer); WEECHAT_HOOK_SIGNAL_POINTER, buffer);
} }
if (old_suggestions) if (old_suggestions)
@ -958,9 +959,8 @@ weechat_aspell_modifier_cb (const void *pointer, void *data,
*/ */
int int
weechat_aspell_buffer_switch_cb (const void *pointer, void *data, spell_buffer_switch_cb (const void *pointer, void *data, const char *signal,
const char *signal, const char *type_data, const char *type_data, void *signal_data)
void *signal_data)
{ {
/* make C compiler happy */ /* make C compiler happy */
(void) pointer; (void) pointer;
@ -970,8 +970,8 @@ weechat_aspell_buffer_switch_cb (const void *pointer, void *data,
(void) signal_data; (void) signal_data;
/* refresh bar items (for root bars) */ /* refresh bar items (for root bars) */
weechat_bar_item_update ("aspell_dict"); weechat_bar_item_update ("spell_dict");
weechat_bar_item_update ("aspell_suggest"); weechat_bar_item_update ("spell_suggest");
return WEECHAT_RC_OK; return WEECHAT_RC_OK;
} }
@ -981,9 +981,8 @@ weechat_aspell_buffer_switch_cb (const void *pointer, void *data,
*/ */
int int
weechat_aspell_window_switch_cb (const void *pointer, void *data, spell_window_switch_cb (const void *pointer, void *data, const char *signal,
const char *signal, const char *type_data, void *signal_data)
const char *type_data, void *signal_data)
{ {
/* make C compiler happy */ /* make C compiler happy */
(void) pointer; (void) pointer;
@ -993,21 +992,20 @@ weechat_aspell_window_switch_cb (const void *pointer, void *data,
(void) signal_data; (void) signal_data;
/* refresh bar items (for root bars) */ /* refresh bar items (for root bars) */
weechat_bar_item_update ("aspell_dict"); weechat_bar_item_update ("spell_dict");
weechat_bar_item_update ("aspell_suggest"); weechat_bar_item_update ("spell_suggest");
return WEECHAT_RC_OK; return WEECHAT_RC_OK;
} }
/* /*
* Removes struct for buffer in hashtable "weechat_aspell_speller_buffer" on * Removes struct for buffer in hashtable "spell_speller_buffer" on
* signal "buffer_closed". * signal "buffer_closed".
*/ */
int int
weechat_aspell_buffer_closed_cb (const void *pointer, void *data, spell_buffer_closed_cb (const void *pointer, void *data, const char *signal,
const char *signal, const char *type_data, void *signal_data)
const char *type_data, void *signal_data)
{ {
/* make C compiler happy */ /* make C compiler happy */
(void) pointer; (void) pointer;
@ -1015,7 +1013,7 @@ weechat_aspell_buffer_closed_cb (const void *pointer, void *data,
(void) signal; (void) signal;
(void) type_data; (void) type_data;
weechat_hashtable_remove (weechat_aspell_speller_buffer, signal_data); weechat_hashtable_remove (spell_speller_buffer, signal_data);
return WEECHAT_RC_OK; return WEECHAT_RC_OK;
} }
@ -1025,9 +1023,8 @@ weechat_aspell_buffer_closed_cb (const void *pointer, void *data,
*/ */
int int
weechat_aspell_debug_libs_cb (const void *pointer, void *data, spell_debug_libs_cb (const void *pointer, void *data, const char *signal,
const char *signal, const char *type_data, void *signal_data)
const char *type_data, void *signal_data)
{ {
/* make C compiler happy */ /* make C compiler happy */
(void) pointer; (void) pointer;
@ -1039,16 +1036,16 @@ weechat_aspell_debug_libs_cb (const void *pointer, void *data,
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
#ifdef HAVE_ENCHANT_GET_VERSION #ifdef HAVE_ENCHANT_GET_VERSION
weechat_printf (NULL, " %s: enchant %s", weechat_printf (NULL, " %s: enchant %s",
ASPELL_PLUGIN_NAME, enchant_get_version ()); SPELL_PLUGIN_NAME, enchant_get_version ());
#else #else
weechat_printf (NULL, " %s: enchant (?)", ASPELL_PLUGIN_NAME); weechat_printf (NULL, " %s: enchant (?)", SPELL_PLUGIN_NAME);
#endif /* HAVE_ENCHANT_GET_VERSION */ #endif /* HAVE_ENCHANT_GET_VERSION */
#else #else
#ifdef HAVE_ASPELL_VERSION_STRING #ifdef HAVE_ASPELL_VERSION_STRING
weechat_printf (NULL, " %s: aspell %s", weechat_printf (NULL, " %s: aspell %s",
ASPELL_PLUGIN_NAME, aspell_version_string ()); SPELL_PLUGIN_NAME, aspell_version_string ());
#else #else
weechat_printf (NULL, " %s: aspell (?)", ASPELL_PLUGIN_NAME); weechat_printf (NULL, " %s: aspell (?)", SPELL_PLUGIN_NAME);
#endif /* HAVE_ASPELL_VERSION_STRING */ #endif /* HAVE_ASPELL_VERSION_STRING */
#endif /* USE_ENCHANT */ #endif /* USE_ENCHANT */
@ -1060,27 +1057,26 @@ weechat_aspell_debug_libs_cb (const void *pointer, void *data,
*/ */
int int
weechat_aspell_config_change_nick_completer_cb (const void *pointer, void *data, spell_config_change_nick_completer_cb (const void *pointer, void *data,
const char *option, const char *option, const char *value)
const char *value)
{ {
/* make C compiler happy */ /* make C compiler happy */
(void) pointer; (void) pointer;
(void) data; (void) data;
(void) option; (void) option;
if (aspell_nick_completer) if (spell_nick_completer)
free (aspell_nick_completer); free (spell_nick_completer);
aspell_nick_completer = weechat_string_strip (value, 0, 1, " "); spell_nick_completer = weechat_string_strip (value, 0, 1, " ");
aspell_len_nick_completer = spell_len_nick_completer =
(aspell_nick_completer) ? strlen (aspell_nick_completer) : 0; (spell_nick_completer) ? strlen (spell_nick_completer) : 0;
return WEECHAT_RC_OK; return WEECHAT_RC_OK;
} }
/* /*
* Initializes aspell plugin. * Initializes spell plugin.
*/ */
int int
@ -1099,17 +1095,17 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
return WEECHAT_RC_ERROR; return WEECHAT_RC_ERROR;
#endif /* USE_ENCHANT */ #endif /* USE_ENCHANT */
if (!weechat_aspell_speller_init ()) if (!spell_speller_init ())
return WEECHAT_RC_ERROR; return WEECHAT_RC_ERROR;
if (!weechat_aspell_config_init ()) if (!spell_config_init ())
return WEECHAT_RC_ERROR; return WEECHAT_RC_ERROR;
weechat_aspell_config_read (); spell_config_read ();
weechat_aspell_command_init (); spell_command_init ();
weechat_aspell_completion_init (); spell_completion_init ();
/* /*
* callback for spell checking input text * callback for spell checking input text
@ -1117,26 +1113,26 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
* (from other plugins) will be called before this one * (from other plugins) will be called before this one
*/ */
weechat_hook_modifier ("500|input_text_display", weechat_hook_modifier ("500|input_text_display",
&weechat_aspell_modifier_cb, NULL, NULL); &spell_modifier_cb, NULL, NULL);
weechat_aspell_bar_item_init (); spell_bar_item_init ();
weechat_aspell_info_init (); spell_info_init ();
weechat_hook_signal ("buffer_switch", weechat_hook_signal ("buffer_switch",
&weechat_aspell_buffer_switch_cb, NULL, NULL); &spell_buffer_switch_cb, NULL, NULL);
weechat_hook_signal ("window_switch", weechat_hook_signal ("window_switch",
&weechat_aspell_window_switch_cb, NULL, NULL); &spell_window_switch_cb, NULL, NULL);
weechat_hook_signal ("buffer_closed", weechat_hook_signal ("buffer_closed",
&weechat_aspell_buffer_closed_cb, NULL, NULL); &spell_buffer_closed_cb, NULL, NULL);
weechat_hook_signal ("debug_libs", weechat_hook_signal ("debug_libs",
&weechat_aspell_debug_libs_cb, NULL, NULL); &spell_debug_libs_cb, NULL, NULL);
weechat_hook_config ("weechat.completion.nick_completer", weechat_hook_config ("weechat.completion.nick_completer",
&weechat_aspell_config_change_nick_completer_cb, &spell_config_change_nick_completer_cb,
NULL, NULL); NULL, NULL);
/* manually call callback to initialize */ /* manually call callback to initialize */
weechat_aspell_config_change_nick_completer_cb ( spell_config_change_nick_completer_cb (
NULL, NULL, "weechat.completion.nick_completer", NULL, NULL, "weechat.completion.nick_completer",
weechat_config_string ( weechat_config_string (
weechat_config_get ("weechat.completion.nick_completer"))); weechat_config_get ("weechat.completion.nick_completer")));
@ -1145,7 +1141,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
} }
/* /*
* Ends aspell plugin. * Ends spell plugin.
*/ */
int int
@ -1154,18 +1150,18 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
/* make C compiler happy */ /* make C compiler happy */
(void) plugin; (void) plugin;
weechat_aspell_config_write (); spell_config_write ();
weechat_aspell_config_free (); spell_config_free ();
weechat_aspell_speller_end (); spell_speller_end ();
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
/* release enchant broker */ /* release enchant broker */
enchant_broker_free (broker); enchant_broker_free (broker);
#endif /* USE_ENCHANT */ #endif /* USE_ENCHANT */
if (aspell_nick_completer) if (spell_nick_completer)
free (aspell_nick_completer); free (spell_nick_completer);
return WEECHAT_RC_OK; return WEECHAT_RC_OK;
} }

View File

@ -18,8 +18,8 @@
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>. * along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
*/ */
#ifndef WEECHAT_PLUGIN_ASPELL_H #ifndef WEECHAT_PLUGIN_SPELL_H
#define WEECHAT_PLUGIN_ASPELL_H #define WEECHAT_PLUGIN_SPELL_H
#ifdef USE_ENCHANT #ifdef USE_ENCHANT
#include <enchant.h> #include <enchant.h>
@ -27,10 +27,10 @@
#include <aspell.h> #include <aspell.h>
#endif /* USE_ENCHANT */ #endif /* USE_ENCHANT */
#define weechat_plugin weechat_aspell_plugin #define weechat_plugin weechat_spell_plugin
#define ASPELL_PLUGIN_NAME "aspell" #define SPELL_PLUGIN_NAME "spell"
struct t_aspell_code struct t_spell_code
{ {
char *code; char *code;
char *name; char *name;
@ -40,13 +40,13 @@ struct t_aspell_code
extern EnchantBroker *broker; extern EnchantBroker *broker;
#endif /* USE_ENCHANT */ #endif /* USE_ENCHANT */
extern struct t_weechat_plugin *weechat_aspell_plugin; extern struct t_weechat_plugin *weechat_spell_plugin;
extern int aspell_enabled; extern int spell_enabled;
extern struct t_aspell_code aspell_langs[]; extern struct t_spell_code spell_langs[];
extern struct t_aspell_code aspell_countries[]; extern struct t_spell_code spell_countries[];
extern char *weechat_aspell_build_option_name (struct t_gui_buffer *buffer); extern char *spell_build_option_name (struct t_gui_buffer *buffer);
extern const char *weechat_aspell_get_dict_with_buffer_name (const char *name); extern const char *spell_get_dict_with_buffer_name (const char *name);
extern const char *weechat_aspell_get_dict (struct t_gui_buffer *buffer); extern const char *spell_get_dict (struct t_gui_buffer *buffer);
#endif /* WEECHAT_PLUGIN_ASPELL_H */ #endif /* WEECHAT_PLUGIN_SPELL_H */

View File

@ -52,7 +52,6 @@ TEST(Plugins, Loaded)
/* check that all plugins are properly loaded */ /* check that all plugins are properly loaded */
CHECK(hdata_search (hdata, plugins, "${plugin.name} == alias", 1)); CHECK(hdata_search (hdata, plugins, "${plugin.name} == alias", 1));
CHECK(hdata_search (hdata, plugins, "${plugin.name} == aspell", 1));
CHECK(hdata_search (hdata, plugins, "${plugin.name} == buflist", 1)); CHECK(hdata_search (hdata, plugins, "${plugin.name} == buflist", 1));
CHECK(hdata_search (hdata, plugins, "${plugin.name} == charset", 1)); CHECK(hdata_search (hdata, plugins, "${plugin.name} == charset", 1));
CHECK(hdata_search (hdata, plugins, "${plugin.name} == exec", 1)); CHECK(hdata_search (hdata, plugins, "${plugin.name} == exec", 1));
@ -69,6 +68,7 @@ TEST(Plugins, Loaded)
CHECK(hdata_search (hdata, plugins, "${plugin.name} == relay", 1)); CHECK(hdata_search (hdata, plugins, "${plugin.name} == relay", 1));
CHECK(hdata_search (hdata, plugins, "${plugin.name} == ruby", 1)); CHECK(hdata_search (hdata, plugins, "${plugin.name} == ruby", 1));
CHECK(hdata_search (hdata, plugins, "${plugin.name} == script", 1)); CHECK(hdata_search (hdata, plugins, "${plugin.name} == script", 1));
CHECK(hdata_search (hdata, plugins, "${plugin.name} == spell", 1));
CHECK(hdata_search (hdata, plugins, "${plugin.name} == tcl", 1)); CHECK(hdata_search (hdata, plugins, "${plugin.name} == tcl", 1));
CHECK(hdata_search (hdata, plugins, "${plugin.name} == trigger", 1)); CHECK(hdata_search (hdata, plugins, "${plugin.name} == trigger", 1));
CHECK(hdata_search (hdata, plugins, "${plugin.name} == xfer", 1)); CHECK(hdata_search (hdata, plugins, "${plugin.name} == xfer", 1));

View File

@ -94,7 +94,6 @@ keyboard, it is customizable and extensible with scripts."
weechat_CONTENTS=" weechat_CONTENTS="
usr/bin/ usr/bin/
usr/lib/weechat/plugins/alias.dll usr/lib/weechat/plugins/alias.dll
usr/lib/weechat/plugins/aspell.dll
usr/lib/weechat/plugins/buflist.dll usr/lib/weechat/plugins/buflist.dll
usr/lib/weechat/plugins/charset.dll usr/lib/weechat/plugins/charset.dll
usr/lib/weechat/plugins/exec.dll usr/lib/weechat/plugins/exec.dll
@ -104,6 +103,7 @@ weechat_CONTENTS="
usr/lib/weechat/plugins/logger.dll usr/lib/weechat/plugins/logger.dll
usr/lib/weechat/plugins/relay.dll usr/lib/weechat/plugins/relay.dll
usr/lib/weechat/plugins/script.dll usr/lib/weechat/plugins/script.dll
usr/lib/weechat/plugins/spell.dll
usr/lib/weechat/plugins/trigger.dll usr/lib/weechat/plugins/trigger.dll
usr/lib/weechat/plugins/xfer.dll usr/lib/weechat/plugins/xfer.dll
usr/share/locale/ usr/share/locale/