minput_config_variable(3m17n)
π minput_config_variable π
okay bestie, so this one lives in the m17n Library manual (section 3m17n, if you're keeping track), and it's literally the function that lets you set an input method variable to whatever you want. no cap. let's get into it π«Ά
β¨ NAME β¨
minput_config_variable β the configure-the-value-of-an-input-method-variable girlie
πΈ SYNOPSIS πΈ
int minput_config_variable (MSymbol language, MSymbol name, MSymbol
variable, MPlist * value)
π¦ DESCRIPTION π¦
so the whole point of minput_config_variable() is: you're configuring the value of an input method variable. it assigns value to the variable variable of the input method that language and name are pointing at. simple. iconic. periodt. π
if value is a non-empty plist, it has to be a plist of one element, and that element's key must be Minteger, Msymbol, or Mtext, with the value being of the corresponding type. that value gets assigned to the variable. that's the vibe check. β¨
if value is an empty plist, then any configuration and customization of the variable gets canceled, and the default value is assigned to the variable instead. we love a reset arc. π
if value is NULL, then the configuration of the variable is canceled and the original value is assigned to the variable β and by original value we mean whatever was saved in the per-user customization file, or the default value. your fave is back from the group chat hiatus. π
in those last two cases (empty plist /NULL),variablecan beMnil, which makes all the variables of the input method the target of the operation. not one variable, ALL of them. main character behavior fr fr. π
if name is Mnil, this function configures the value of a global variable, not that of a specific input method. so it's not about one IM, it's about everybody. π
okay and here's the part you need to remember, no cap: the configuration takes effect for input methods that get opened or re-opened later in the current session. if you want it to stick around for the future session, you gotta save it in a per-user customization file using the function minput_save_config(). don't skip this step bestie, or your config is giving temporary π
π₯ RETURN VALUE π₯
if everything worked out, this function returns 0. if not, it returns -1. and bestie, the operation fails in these cases:
valueis not in a valid form, the type does not match the definition, or the value is out of range.variableis not available for the input method.languageandnamedo not specify an existing input method.
so yeah, three ways to get humbled π but at least now you know why.
π SEE ALSO π
minput_get_variable()minput_save_config()
π COPYRIGHT π
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.
and that's the whole page bestie!! Version 1.8.4, dated Mon Sep 25 2023 π tysm for reading, go configure something cute, and don't forget to call minput_save_config() or it won't last ππ§ββοΈπ
π¦ where this page comes from
- debian trixie: m17n-docs 1.8.4-1
- ubuntu noble: m17n-docs 1.8.4-1
- ubuntu questing: m17n-docs 1.8.4-1
- ubuntu resolute: m17n-docs 1.8.4-1build1
- ubuntu stonking: m17n-docs 1.8.4-1build1
- Copyright (C) 2001 Information-technology Promotion Agency (IPA)
- Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms