Function: register-input-method
register-input-method is a byte-compiled function defined in
mule-cmds.el.gz.
Signature
(register-input-method INPUT-METHOD LANG-ENV ACTIVATE-FUNC TITLE DESCRIPTION &rest ARGS)
Documentation
Register INPUT-METHOD as an input method for language environment LANG-ENV.
INPUT-METHOD and LANG-ENV are symbols or strings. ACTIVATE-FUNC is a function to call to activate this method. TITLE is a string to show in the mode line when this method is active. DESCRIPTION is a string describing this method and what it is good for. The ARGS, if any, are passed as arguments to ACTIVATE-FUNC. All told, the arguments to ACTIVATE-FUNC are INPUT-METHOD and the ARGS.
This function is mainly used in the file "leim-list.el" which is created at Emacs build time, registering all Quail input methods contained in the Emacs distribution.
In case you want to register a new Quail input method by yourself, be
careful to use the same input method title as given in the third
parameter of quail-define-package. (If the values are different, the
string specified in this function takes precedence.)
The commands describe-input-method and list-input-methods need
these duplicated values to show some information about input methods
without loading the relevant Quail packages.
Source Code
;; Defined in /usr/src/emacs/lisp/international/mule-cmds.el.gz
(defun register-input-method (input-method lang-env &rest args)
"Register INPUT-METHOD as an input method for language environment LANG-ENV.
INPUT-METHOD and LANG-ENV are symbols or strings.
ACTIVATE-FUNC is a function to call to activate this method.
TITLE is a string to show in the mode line when this method is active.
DESCRIPTION is a string describing this method and what it is good for.
The ARGS, if any, are passed as arguments to ACTIVATE-FUNC.
All told, the arguments to ACTIVATE-FUNC are INPUT-METHOD and the ARGS.
This function is mainly used in the file \"leim-list.el\" which is
created at Emacs build time, registering all Quail input methods
contained in the Emacs distribution.
In case you want to register a new Quail input method by yourself, be
careful to use the same input method title as given in the third
parameter of `quail-define-package'. (If the values are different, the
string specified in this function takes precedence.)
The commands `describe-input-method' and `list-input-methods' need
these duplicated values to show some information about input methods
without loading the relevant Quail packages.
\n(fn INPUT-METHOD LANG-ENV ACTIVATE-FUNC TITLE DESCRIPTION &rest ARGS)"
(setq lang-env (if (symbolp lang-env)
(symbol-name lang-env)
(purecopy lang-env)))
(setq input-method (if (symbolp input-method)
(symbol-name input-method)
(purecopy input-method)))
(setq args (mapcar #'purecopy args))
(let ((info (cons lang-env args))
(slot (assoc input-method input-method-alist)))
(if slot
(setcdr slot info)
(setq slot (cons input-method info))
(setq input-method-alist (cons slot input-method-alist)))))