diff options
Diffstat (limited to 'devdocs/elisp/input-methods.html')
| -rw-r--r-- | devdocs/elisp/input-methods.html | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/devdocs/elisp/input-methods.html b/devdocs/elisp/input-methods.html new file mode 100644 index 00000000..adbd2945 --- /dev/null +++ b/devdocs/elisp/input-methods.html @@ -0,0 +1,23 @@ + <h3 class="section">Input Methods</h3> <p><em>Input methods</em> provide convenient ways of entering non-<acronym>ASCII</acronym> characters from the keyboard. Unlike coding systems, which translate non-<acronym>ASCII</acronym> characters to and from encodings meant to be read by programs, input methods provide human-friendly commands. (See <a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/Input-Methods.html#Input-Methods">Input Methods</a> in <cite>The GNU Emacs Manual</cite>, for information on how users use input methods to enter text.) How to define input methods is not yet documented in this manual, but here we describe how to use them. </p> <p>Each input method has a name, which is currently a string; in the future, symbols may also be usable as input method names. </p> <dl> <dt id="current-input-method">Variable: <strong>current-input-method</strong> +</dt> <dd><p>This variable holds the name of the input method now active in the current buffer. (It automatically becomes local in each buffer when set in any fashion.) It is <code>nil</code> if no input method is active in the buffer now. </p></dd> +</dl> <dl> <dt id="default-input-method">User Option: <strong>default-input-method</strong> +</dt> <dd><p>This variable holds the default input method for commands that choose an input method. Unlike <code>current-input-method</code>, this variable is normally global. </p></dd> +</dl> <dl> <dt id="set-input-method">Command: <strong>set-input-method</strong> <em>input-method</em> +</dt> <dd><p>This command activates input method <var>input-method</var> for the current buffer. It also sets <code>default-input-method</code> to <var>input-method</var>. If <var>input-method</var> is <code>nil</code>, this command deactivates any input method for the current buffer. </p></dd> +</dl> <dl> <dt id="read-input-method-name">Function: <strong>read-input-method-name</strong> <em>prompt &optional default inhibit-null</em> +</dt> <dd> +<p>This function reads an input method name with the minibuffer, prompting with <var>prompt</var>. If <var>default</var> is non-<code>nil</code>, that is returned by default, if the user enters empty input. However, if <var>inhibit-null</var> is non-<code>nil</code>, empty input signals an error. </p> <p>The returned value is a string. </p> +</dd> +</dl> <dl> <dt id="input-method-alist">Variable: <strong>input-method-alist</strong> +</dt> <dd> +<p>This variable defines all the supported input methods. Each element defines one input method, and should have the form: </p> <div class="example"> <pre class="example">(<var>input-method</var> <var>language-env</var> <var>activate-func</var> + <var>title</var> <var>description</var> <var>args</var>...) +</pre> +</div> <p>Here <var>input-method</var> is the input method name, a string; <var>language-env</var> is another string, the name of the language environment this input method is recommended for. (That serves only for documentation purposes.) </p> <p><var>activate-func</var> is a function to call to activate this method. The <var>args</var>, if any, are passed as arguments to <var>activate-func</var>. All told, the arguments to <var>activate-func</var> are <var>input-method</var> and the <var>args</var>. </p> <p><var>title</var> is a string to display in the mode line while this method is active. <var>description</var> is a string describing this method and what it is good for. </p> +</dd> +</dl> <p>The fundamental interface to input methods is through the variable <code>input-method-function</code>. See <a href="reading-one-event">Reading One Event</a>, and <a href="invoking-the-input-method">Invoking the Input Method</a>. </p><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br> + <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Input-Methods.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Input-Methods.html</a> + </p> +</div> |
