summaryrefslogtreecommitdiff
path: root/lisp/composite.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2001-01-05 05:29:56 +0000
committerKenichi Handa <handa@m17n.org>2001-01-05 05:29:56 +0000
commit3b923ad8dc1c3667452dff1de43a837ba3ce8ba7 (patch)
tree1cbd68ffb05f97641b37a16556e512910dfd95a9 /lisp/composite.el
parent3970013f7d7ba4b9b0d8ab72dd552632415d882f (diff)
downloademacs-3b923ad8dc1c3667452dff1de43a837ba3ce8ba7.tar.gz
(compose-last-chars): New argument COMPONENTS. It
it is non-nil, compose preceding characters by compose-region with COMPONENTS.
Diffstat (limited to 'lisp/composite.el')
-rw-r--r--lisp/composite.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/composite.el b/lisp/composite.el
index 102f962151a..1119295fa53 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -340,17 +340,23 @@ This function is the default value of `compose-chars-after-function'."
;;;###autoload
(defun compose-last-chars (args)
"Compose last characters.
-The argument is a parameterized event of the form (compose-last-chars N),
-where N is the number of characters before point to compose.
+The argument is a parameterized event of the form
+ \(compose-last-chars N COMPONENTS),
+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,
+and that function find a proper rule to compose the target characters.
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)
+function. Input method may generate an event (compose-last-chars N COMPONENTS)
after a sequence character events."
(interactive "e")
(let ((chars (nth 1 args)))
(if (and (numberp chars)
(>= (- (point) (point-min)) chars))
- (compose-chars-after (- (point) chars) (point)))))
+ (if (nth 2 args)
+ (compose-region (- (point) chars) (point) (nth 2 args))
+ (compose-chars-after (- (point) chars) (point))))))
;;;###autoload(global-set-key [compose-last-chars] 'compose-last-chars)