;; Copyright (C) 1999 Electrotechnical Laboratory, JAPAN.
;; Licensed to the Free Software Foundation.
;; Copyright (C) 1999 Electrotechnical Laboratory, JAPAN.
;; Licensed to the Free Software Foundation.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
-;; Encode composition rule RULE into an integer value. RULE is a cons
-;; of global and new reference point symbols.
-;; This must be compatible with C macro COMPOSITION_ENCODE_RULE
-;; defined in composite.h.
+ "Encode composition rule RULE into an integer value.
+RULE is a cons of global and new reference point symbols
+\(see `reference-point-alist')."
+
+ ;; This must be compatible with C macro COMPOSITION_ENCODE_RULE
+ ;; defined in composite.h.
+
(or (integerp nref)
(setq nref (cdr (assq nref reference-point-alist))))
(or (and (>= gref 0) (< gref 12) (>= nref 0) (< nref 12))
(or (integerp nref)
(setq nref (cdr (assq nref reference-point-alist))))
(or (and (>= gref 0) (< gref 12) (>= nref 0) (< nref 12))
(defun compose-region (start end &optional components modification-func)
"Compose characters in the current region.
(defun compose-region (start end &optional components modification-func)
"Compose characters in the current region.
When called from a program, expects these four arguments.
First two arguments START and END are positions (integers or markers)
specifying the region.
Optional 3rd argument COMPONENTS, if non-nil, is a character or a
When called from a program, expects these four arguments.
First two arguments START and END are positions (integers or markers)
specifying the region.
Optional 3rd argument COMPONENTS, if non-nil, is a character or a
-sequence (vector, list, or string) of integers.
+sequence (vector, list, or string) of integers. In this case,
+characters are composed not relatively but according to COMPONENTS.
If it is a character, it is an alternate character to display instead
of the text in the region.
If it is a character, it is an alternate character to display instead
of the text in the region.
(if (or (vectorp components) (listp components))
(setq components (encode-composition-components components)))
(compose-region-internal start end components modification-func)
(if (or (vectorp components) (listp components))
(setq components (encode-composition-components components)))
(compose-region-internal start end components modification-func)
where N is the number of characters before point to compose,
COMPONENTS, if non-nil, is the same as the argument to `compose-region'
\(which see). If it is nil, `compose-chars-after' is called,
where N is the number of characters before point to compose,
COMPONENTS, if non-nil, is the same as the argument to `compose-region'
\(which see). If it is nil, `compose-chars-after' is called,
This function is intended to be used from input methods.
The global keymap binds special event `compose-last-chars' to this
function. Input method may generate an event (compose-last-chars N COMPONENTS)
This function is intended to be used from input methods.
The global keymap binds special event `compose-last-chars' to this
function. Input method may generate an event (compose-last-chars N COMPONENTS)
If optional 2nd arg TYPE is non-nil, it is `string', `list', or
If optional 2nd arg TYPE is non-nil, it is `string', `list', or
-`vector'. In this case, CHAR is converted string, list of CHAR, or
-vector of CHAR respectively."
+`vector'. In this case, CHAR is converted to string, list of CHAR, or
+vector of CHAR respectively.
+Optional 3rd arg WITH-COMPOSITION-RULE is ignored."