1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 04:46:37 +02:00

scripts: add option "eval_keep_context" in script plugins

This commit is contained in:
Sébastien Helleu
2018-01-15 22:00:15 +01:00
parent 21e63e7958
commit 8fbbe8b0d5
58 changed files with 351 additions and 0 deletions
+6
View File
@@ -7,3 +7,9 @@
** Typ: boolesch
** Werte: on, off
** Standardwert: `+off+`
* [[option_guile.look.eval_keep_context]] *guile.look.eval_keep_context*
** Beschreibung: pass:none[keep context between two calls to /guile eval (or info "guile_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** Typ: boolesch
** Werte: on, off
** Standardwert: `+on+`
@@ -7,3 +7,9 @@
** Typ: boolesch
** Werte: on, off
** Standardwert: `+off+`
* [[option_javascript.look.eval_keep_context]] *javascript.look.eval_keep_context*
** Beschreibung: pass:none[keep context between two calls to /javascript eval (or info "javascript_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** Typ: boolesch
** Werte: on, off
** Standardwert: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** Typ: boolesch
** Werte: on, off
** Standardwert: `+off+`
* [[option_lua.look.eval_keep_context]] *lua.look.eval_keep_context*
** Beschreibung: pass:none[keep context between two calls to /lua eval (or info "lua_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** Typ: boolesch
** Werte: on, off
** Standardwert: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** Typ: boolesch
** Werte: on, off
** Standardwert: `+off+`
* [[option_perl.look.eval_keep_context]] *perl.look.eval_keep_context*
** Beschreibung: pass:none[keep context between two calls to /perl eval (or info "perl_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** Typ: boolesch
** Werte: on, off
** Standardwert: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** Typ: boolesch
** Werte: on, off
** Standardwert: `+off+`
* [[option_php.look.eval_keep_context]] *php.look.eval_keep_context*
** Beschreibung: pass:none[keep context between two calls to /php eval (or info "php_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** Typ: boolesch
** Werte: on, off
** Standardwert: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** Typ: boolesch
** Werte: on, off
** Standardwert: `+off+`
* [[option_python.look.eval_keep_context]] *python.look.eval_keep_context*
** Beschreibung: pass:none[keep context between two calls to /python eval (or info "python_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** Typ: boolesch
** Werte: on, off
** Standardwert: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** Typ: boolesch
** Werte: on, off
** Standardwert: `+off+`
* [[option_ruby.look.eval_keep_context]] *ruby.look.eval_keep_context*
** Beschreibung: pass:none[keep context between two calls to /ruby eval (or info "ruby_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** Typ: boolesch
** Werte: on, off
** Standardwert: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** Typ: boolesch
** Werte: on, off
** Standardwert: `+off+`
* [[option_tcl.look.eval_keep_context]] *tcl.look.eval_keep_context*
** Beschreibung: pass:none[keep context between two calls to /tcl eval (or info "tcl_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** Typ: boolesch
** Werte: on, off
** Standardwert: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** type: boolean
** values: on, off
** default value: `+off+`
* [[option_guile.look.eval_keep_context]] *guile.look.eval_keep_context*
** description: pass:none[keep context between two calls to /guile eval (or info "guile_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: boolean
** values: on, off
** default value: `+on+`
@@ -7,3 +7,9 @@
** type: boolean
** values: on, off
** default value: `+off+`
* [[option_javascript.look.eval_keep_context]] *javascript.look.eval_keep_context*
** description: pass:none[keep context between two calls to /javascript eval (or info "javascript_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: boolean
** values: on, off
** default value: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** type: boolean
** values: on, off
** default value: `+off+`
* [[option_lua.look.eval_keep_context]] *lua.look.eval_keep_context*
** description: pass:none[keep context between two calls to /lua eval (or info "lua_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: boolean
** values: on, off
** default value: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** type: boolean
** values: on, off
** default value: `+off+`
* [[option_perl.look.eval_keep_context]] *perl.look.eval_keep_context*
** description: pass:none[keep context between two calls to /perl eval (or info "perl_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: boolean
** values: on, off
** default value: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** type: boolean
** values: on, off
** default value: `+off+`
* [[option_php.look.eval_keep_context]] *php.look.eval_keep_context*
** description: pass:none[keep context between two calls to /php eval (or info "php_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: boolean
** values: on, off
** default value: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** type: boolean
** values: on, off
** default value: `+off+`
* [[option_python.look.eval_keep_context]] *python.look.eval_keep_context*
** description: pass:none[keep context between two calls to /python eval (or info "python_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: boolean
** values: on, off
** default value: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** type: boolean
** values: on, off
** default value: `+off+`
* [[option_ruby.look.eval_keep_context]] *ruby.look.eval_keep_context*
** description: pass:none[keep context between two calls to /ruby eval (or info "ruby_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: boolean
** values: on, off
** default value: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** type: boolean
** values: on, off
** default value: `+off+`
* [[option_tcl.look.eval_keep_context]] *tcl.look.eval_keep_context*
** description: pass:none[keep context between two calls to /tcl eval (or info "tcl_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: boolean
** values: on, off
** default value: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** type: booléen
** valeurs: on, off
** valeur par défaut: `+off+`
* [[option_guile.look.eval_keep_context]] *guile.look.eval_keep_context*
** description: pass:none[keep context between two calls to /guile eval (or info "guile_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: booléen
** valeurs: on, off
** valeur par défaut: `+on+`
@@ -7,3 +7,9 @@
** type: booléen
** valeurs: on, off
** valeur par défaut: `+off+`
* [[option_javascript.look.eval_keep_context]] *javascript.look.eval_keep_context*
** description: pass:none[keep context between two calls to /javascript eval (or info "javascript_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: booléen
** valeurs: on, off
** valeur par défaut: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** type: booléen
** valeurs: on, off
** valeur par défaut: `+off+`
* [[option_lua.look.eval_keep_context]] *lua.look.eval_keep_context*
** description: pass:none[keep context between two calls to /lua eval (or info "lua_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: booléen
** valeurs: on, off
** valeur par défaut: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** type: booléen
** valeurs: on, off
** valeur par défaut: `+off+`
* [[option_perl.look.eval_keep_context]] *perl.look.eval_keep_context*
** description: pass:none[keep context between two calls to /perl eval (or info "perl_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: booléen
** valeurs: on, off
** valeur par défaut: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** type: booléen
** valeurs: on, off
** valeur par défaut: `+off+`
* [[option_php.look.eval_keep_context]] *php.look.eval_keep_context*
** description: pass:none[keep context between two calls to /php eval (or info "php_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: booléen
** valeurs: on, off
** valeur par défaut: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** type: booléen
** valeurs: on, off
** valeur par défaut: `+off+`
* [[option_python.look.eval_keep_context]] *python.look.eval_keep_context*
** description: pass:none[keep context between two calls to /python eval (or info "python_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: booléen
** valeurs: on, off
** valeur par défaut: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** type: booléen
** valeurs: on, off
** valeur par défaut: `+off+`
* [[option_ruby.look.eval_keep_context]] *ruby.look.eval_keep_context*
** description: pass:none[keep context between two calls to /ruby eval (or info "ruby_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: booléen
** valeurs: on, off
** valeur par défaut: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** type: booléen
** valeurs: on, off
** valeur par défaut: `+off+`
* [[option_tcl.look.eval_keep_context]] *tcl.look.eval_keep_context*
** description: pass:none[keep context between two calls to /tcl eval (or info "tcl_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** type: booléen
** valeurs: on, off
** valeur par défaut: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** tipo: bool
** valori: on, off
** valore predefinito: `+off+`
* [[option_guile.look.eval_keep_context]] *guile.look.eval_keep_context*
** descrizione: pass:none[keep context between two calls to /guile eval (or info "guile_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** tipo: bool
** valori: on, off
** valore predefinito: `+on+`
@@ -7,3 +7,9 @@
** tipo: bool
** valori: on, off
** valore predefinito: `+off+`
* [[option_javascript.look.eval_keep_context]] *javascript.look.eval_keep_context*
** descrizione: pass:none[keep context between two calls to /javascript eval (or info "javascript_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** tipo: bool
** valori: on, off
** valore predefinito: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** tipo: bool
** valori: on, off
** valore predefinito: `+off+`
* [[option_lua.look.eval_keep_context]] *lua.look.eval_keep_context*
** descrizione: pass:none[keep context between two calls to /lua eval (or info "lua_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** tipo: bool
** valori: on, off
** valore predefinito: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** tipo: bool
** valori: on, off
** valore predefinito: `+off+`
* [[option_perl.look.eval_keep_context]] *perl.look.eval_keep_context*
** descrizione: pass:none[keep context between two calls to /perl eval (or info "perl_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** tipo: bool
** valori: on, off
** valore predefinito: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** tipo: bool
** valori: on, off
** valore predefinito: `+off+`
* [[option_php.look.eval_keep_context]] *php.look.eval_keep_context*
** descrizione: pass:none[keep context between two calls to /php eval (or info "php_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** tipo: bool
** valori: on, off
** valore predefinito: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** tipo: bool
** valori: on, off
** valore predefinito: `+off+`
* [[option_python.look.eval_keep_context]] *python.look.eval_keep_context*
** descrizione: pass:none[keep context between two calls to /python eval (or info "python_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** tipo: bool
** valori: on, off
** valore predefinito: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** tipo: bool
** valori: on, off
** valore predefinito: `+off+`
* [[option_ruby.look.eval_keep_context]] *ruby.look.eval_keep_context*
** descrizione: pass:none[keep context between two calls to /ruby eval (or info "ruby_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** tipo: bool
** valori: on, off
** valore predefinito: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** tipo: bool
** valori: on, off
** valore predefinito: `+off+`
* [[option_tcl.look.eval_keep_context]] *tcl.look.eval_keep_context*
** descrizione: pass:none[keep context between two calls to /tcl eval (or info "tcl_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** tipo: bool
** valori: on, off
** valore predefinito: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** タイプ: ブール
** 値: on, off
** デフォルト値: `+off+`
* [[option_guile.look.eval_keep_context]] *guile.look.eval_keep_context*
** 説明: pass:none[keep context between two calls to /guile eval (or info "guile_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** タイプ: ブール
** 値: on, off
** デフォルト値: `+on+`
@@ -7,3 +7,9 @@
** タイプ: ブール
** 値: on, off
** デフォルト値: `+off+`
* [[option_javascript.look.eval_keep_context]] *javascript.look.eval_keep_context*
** 説明: pass:none[keep context between two calls to /javascript eval (or info "javascript_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** タイプ: ブール
** 値: on, off
** デフォルト値: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** タイプ: ブール
** 値: on, off
** デフォルト値: `+off+`
* [[option_lua.look.eval_keep_context]] *lua.look.eval_keep_context*
** 説明: pass:none[keep context between two calls to /lua eval (or info "lua_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** タイプ: ブール
** 値: on, off
** デフォルト値: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** タイプ: ブール
** 値: on, off
** デフォルト値: `+off+`
* [[option_perl.look.eval_keep_context]] *perl.look.eval_keep_context*
** 説明: pass:none[keep context between two calls to /perl eval (or info "perl_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** タイプ: ブール
** 値: on, off
** デフォルト値: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** タイプ: ブール
** 値: on, off
** デフォルト値: `+off+`
* [[option_php.look.eval_keep_context]] *php.look.eval_keep_context*
** 説明: pass:none[keep context between two calls to /php eval (or info "php_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** タイプ: ブール
** 値: on, off
** デフォルト値: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** タイプ: ブール
** 値: on, off
** デフォルト値: `+off+`
* [[option_python.look.eval_keep_context]] *python.look.eval_keep_context*
** 説明: pass:none[keep context between two calls to /python eval (or info "python_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** タイプ: ブール
** 値: on, off
** デフォルト値: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** タイプ: ブール
** 値: on, off
** デフォルト値: `+off+`
* [[option_ruby.look.eval_keep_context]] *ruby.look.eval_keep_context*
** 説明: pass:none[keep context between two calls to /ruby eval (or info "ruby_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** タイプ: ブール
** 値: on, off
** デフォルト値: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** タイプ: ブール
** 値: on, off
** デフォルト値: `+off+`
* [[option_tcl.look.eval_keep_context]] *tcl.look.eval_keep_context*
** 説明: pass:none[keep context between two calls to /tcl eval (or info "tcl_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** タイプ: ブール
** 値: on, off
** デフォルト値: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** typ: bool
** wartości: on, off
** domyślna wartość: `+off+`
* [[option_guile.look.eval_keep_context]] *guile.look.eval_keep_context*
** opis: pass:none[keep context between two calls to /guile eval (or info "guile_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** typ: bool
** wartości: on, off
** domyślna wartość: `+on+`
@@ -7,3 +7,9 @@
** typ: bool
** wartości: on, off
** domyślna wartość: `+off+`
* [[option_javascript.look.eval_keep_context]] *javascript.look.eval_keep_context*
** opis: pass:none[keep context between two calls to /javascript eval (or info "javascript_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** typ: bool
** wartości: on, off
** domyślna wartość: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** typ: bool
** wartości: on, off
** domyślna wartość: `+off+`
* [[option_lua.look.eval_keep_context]] *lua.look.eval_keep_context*
** opis: pass:none[keep context between two calls to /lua eval (or info "lua_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** typ: bool
** wartości: on, off
** domyślna wartość: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** typ: bool
** wartości: on, off
** domyślna wartość: `+off+`
* [[option_perl.look.eval_keep_context]] *perl.look.eval_keep_context*
** opis: pass:none[keep context between two calls to /perl eval (or info "perl_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** typ: bool
** wartości: on, off
** domyślna wartość: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** typ: bool
** wartości: on, off
** domyślna wartość: `+off+`
* [[option_php.look.eval_keep_context]] *php.look.eval_keep_context*
** opis: pass:none[keep context between two calls to /php eval (or info "php_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** typ: bool
** wartości: on, off
** domyślna wartość: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** typ: bool
** wartości: on, off
** domyślna wartość: `+off+`
* [[option_python.look.eval_keep_context]] *python.look.eval_keep_context*
** opis: pass:none[keep context between two calls to /python eval (or info "python_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** typ: bool
** wartości: on, off
** domyślna wartość: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** typ: bool
** wartości: on, off
** domyślna wartość: `+off+`
* [[option_ruby.look.eval_keep_context]] *ruby.look.eval_keep_context*
** opis: pass:none[keep context between two calls to /ruby eval (or info "ruby_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** typ: bool
** wartości: on, off
** domyślna wartość: `+on+`
+6
View File
@@ -7,3 +7,9 @@
** typ: bool
** wartości: on, off
** domyślna wartość: `+off+`
* [[option_tcl.look.eval_keep_context]] *tcl.look.eval_keep_context*
** opis: pass:none[keep context between two calls to /tcl eval (or info "tcl_eval"); a hidden script is used to eval script code; if this option is disabled, this hidden script is unloaded after each eval: this uses less memory, but is slower]
** typ: bool
** wartości: on, off
** domyślna wartość: `+on+`
+8
View File
@@ -50,6 +50,7 @@ struct t_plugin_script_data guile_data;
struct t_config_file *guile_config_file = NULL;
struct t_config_option *guile_config_look_check_license = NULL;
struct t_config_option *guile_config_look_eval_keep_context = NULL;
int guile_quiet = 0;
@@ -749,6 +750,12 @@ weechat_guile_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
guile_eval_exec_commands = 0;
guile_eval_buffer = NULL;
if (!weechat_config_boolean (guile_config_look_eval_keep_context))
{
weechat_guile_unload (guile_script_eval);
guile_script_eval = NULL;
}
return 1;
}
@@ -1187,6 +1194,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
guile_data.config_file = &guile_config_file;
guile_data.config_look_check_license = &guile_config_look_check_license;
guile_data.config_look_eval_keep_context = &guile_config_look_eval_keep_context;
guile_data.scripts = &guile_scripts;
guile_data.last_script = &last_guile_script;
guile_data.callback_command = &weechat_guile_command_cb;
+2
View File
@@ -47,6 +47,7 @@ struct t_plugin_script_data js_data;
struct t_config_file *js_config_file = NULL;
struct t_config_option *js_config_look_check_license = NULL;
struct t_config_option *js_config_look_eval_keep_context = NULL;
int js_quiet = 0;
@@ -918,6 +919,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
js_data.config_file = &js_config_file;
js_data.config_look_check_license = &js_config_look_check_license;
js_data.config_look_eval_keep_context = &js_config_look_eval_keep_context;
js_data.scripts = &js_scripts;
js_data.last_script = &last_js_script;
js_data.callback_command = &weechat_js_command_cb;
+8
View File
@@ -48,6 +48,7 @@ struct t_plugin_script_data lua_data;
struct t_config_file *lua_config_file = NULL;
struct t_config_option *lua_config_look_check_license = NULL;
struct t_config_option *lua_config_look_eval_keep_context = NULL;
int lua_quiet = 0;
@@ -849,6 +850,12 @@ weechat_lua_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
lua_eval_exec_commands = 0;
lua_eval_buffer = NULL;
if (!weechat_config_boolean (lua_config_look_eval_keep_context))
{
weechat_lua_unload (lua_script_eval);
lua_script_eval = NULL;
}
return 1;
}
@@ -1218,6 +1225,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
lua_data.config_file = &lua_config_file;
lua_data.config_look_check_license = &lua_config_look_check_license;
lua_data.config_look_eval_keep_context = &lua_config_look_eval_keep_context;
lua_data.scripts = &lua_scripts;
lua_data.last_script = &last_lua_script;
lua_data.callback_command = &weechat_lua_command_cb;
+8
View File
@@ -45,6 +45,7 @@ struct t_plugin_script_data perl_data;
struct t_config_file *perl_config_file = NULL;
struct t_config_option *perl_config_look_check_license = NULL;
struct t_config_option *perl_config_look_eval_keep_context = NULL;
int perl_quiet = 0;
@@ -841,6 +842,12 @@ weechat_perl_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
perl_eval_exec_commands = 0;
perl_eval_buffer = NULL;
if (!weechat_config_boolean (perl_config_look_eval_keep_context))
{
weechat_perl_unload (perl_script_eval);
perl_script_eval = NULL;
}
return 1;
}
@@ -1259,6 +1266,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
perl_data.config_file = &perl_config_file;
perl_data.config_look_check_license = &perl_config_look_check_license;
perl_data.config_look_eval_keep_context = &perl_config_look_eval_keep_context;
perl_data.scripts = &perl_scripts;
perl_data.last_script = &last_perl_script;
perl_data.callback_command = &weechat_perl_command_cb;
+2
View File
@@ -43,6 +43,7 @@ struct t_plugin_script_data php_data;
struct t_config_file *php_config_file = NULL;
struct t_config_option *php_config_look_check_license = NULL;
struct t_config_option *php_config_look_eval_keep_context = NULL;
int php_quiet = 0;
@@ -1254,6 +1255,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
php_data.config_file = &php_config_file;
php_data.config_look_check_license = &php_config_look_check_license;
php_data.config_look_eval_keep_context = &php_config_look_eval_keep_context;
php_data.scripts = &php_scripts;
php_data.last_script = &last_php_script;
php_data.callback_command = &weechat_php_command_cb;
+16
View File
@@ -20,6 +20,7 @@
*/
#include <stdlib.h>
#include <stdio.h>
#include "weechat-plugin.h"
#include "plugin-script.h"
@@ -38,6 +39,7 @@ plugin_script_config_init (struct t_weechat_plugin *weechat_plugin,
struct t_plugin_script_data *plugin_data)
{
struct t_config_section *ptr_section;
char str_description[4096];
*(plugin_data->config_file) = weechat_config_new (weechat_plugin->name,
NULL, NULL, NULL);
@@ -67,6 +69,20 @@ plugin_script_config_init (struct t_weechat_plugin *weechat_plugin,
"is different from the plugin license, a warning is displayed"),
NULL, 0, 0, "off", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
snprintf (str_description, sizeof (str_description),
N_("keep context between two calls to /%s eval "
"(or info \"%s_eval\"); a hidden script is used to eval "
"script code; if this option is disabled, this hidden script "
"is unloaded after each eval: this uses less memory, but is "
"slower"),
weechat_plugin->name,
weechat_plugin->name);
*(plugin_data->config_look_eval_keep_context) = weechat_config_new_option (
*(plugin_data->config_file), ptr_section,
"eval_keep_context", "boolean",
str_description,
NULL, 0, 0, "on", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
return 1;
}
+1
View File
@@ -74,6 +74,7 @@ struct t_plugin_script_data
/* variables */
struct t_config_file **config_file;
struct t_config_option **config_look_check_license;
struct t_config_option **config_look_eval_keep_context;
struct t_plugin_script **scripts;
struct t_plugin_script **last_script;
+8
View File
@@ -48,6 +48,7 @@ struct t_plugin_script_data python_data;
struct t_config_file *python_config_file = NULL;
struct t_config_option *python_config_look_check_license = NULL;
struct t_config_option *python_config_look_eval_keep_context = NULL;
int python_quiet = 0;
@@ -1094,6 +1095,12 @@ weechat_python_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
python_eval_exec_commands = 0;
python_eval_buffer = NULL;
if (!weechat_config_boolean (python_config_look_eval_keep_context))
{
weechat_python_unload (python_script_eval);
python_script_eval = NULL;
}
return 1;
}
@@ -1534,6 +1541,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
python_data.config_file = &python_config_file;
python_data.config_look_check_license = &python_config_look_check_license;
python_data.config_look_eval_keep_context = &python_config_look_eval_keep_context;
python_data.scripts = &python_scripts;
python_data.last_script = &last_python_script;
python_data.callback_command = &weechat_python_command_cb;
+8
View File
@@ -69,6 +69,7 @@ struct t_plugin_script_data ruby_data;
struct t_config_file *ruby_config_file = NULL;
struct t_config_option *ruby_config_look_check_license = NULL;
struct t_config_option *ruby_config_look_eval_keep_context = NULL;
int ruby_quiet = 0;
int ruby_hide_errors = 0;
@@ -894,6 +895,12 @@ weechat_ruby_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
ruby_eval_exec_commands = 0;
ruby_eval_buffer = NULL;
if (!weechat_config_boolean (ruby_config_look_eval_keep_context))
{
weechat_ruby_unload (ruby_script_eval);
ruby_script_eval = NULL;
}
return 1;
}
@@ -1367,6 +1374,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
ruby_data.config_file = &ruby_config_file;
ruby_data.config_look_check_license = &ruby_config_look_check_license;
ruby_data.config_look_eval_keep_context = &ruby_config_look_eval_keep_context;
ruby_data.scripts = &ruby_scripts;
ruby_data.last_script = &last_ruby_script;
ruby_data.callback_command = &weechat_ruby_command_cb;
+2
View File
@@ -48,6 +48,7 @@ struct t_plugin_script_data tcl_data;
struct t_config_file *tcl_config_file = NULL;
struct t_config_option *tcl_config_look_check_license = NULL;
struct t_config_option *tcl_config_look_eval_keep_context = NULL;
int tcl_quiet = 0;
@@ -924,6 +925,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
tcl_data.config_file = &tcl_config_file;
tcl_data.config_look_check_license = &tcl_config_look_check_license;
tcl_data.config_look_eval_keep_context = &tcl_config_look_eval_keep_context;
tcl_data.scripts = &tcl_scripts;
tcl_data.last_script = &last_tcl_script;
tcl_data.callback_command = &weechat_tcl_command_cb;