Mercurial > emacs
comparison lisp/composite.el @ 97985:26069577e76b
(find-composition): Mention about the automatic
composition in the docstring.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 05 Sep 2008 00:53:00 +0000 |
parents | f5f400126c23 |
children | b74042c3e459 |
comparison
equal
deleted
inserted
replaced
97984:672009e514b4 | 97985:26069577e76b |
---|---|
292 | 292 |
293 If the character at POS has `composition' property, the value is a list | 293 If the character at POS has `composition' property, the value is a list |
294 of FROM, TO, and VALID-P. | 294 of FROM, TO, and VALID-P. |
295 | 295 |
296 FROM and TO specify the range of text that has the same `composition' | 296 FROM and TO specify the range of text that has the same `composition' |
297 property, VALID-P is non-nil if and only if this composition is valid. | 297 property, VALID-P is t if this composition is valid, and nil if not. |
298 | 298 |
299 If there's no composition at POS, and the optional 2nd argument LIMIT | 299 If there's no composition at POS, and the optional 2nd argument LIMIT |
300 is non-nil, search for a composition toward LIMIT. | 300 is non-nil, search for a composition toward LIMIT. |
301 | 301 |
302 If no composition is found, return nil. | 302 If no composition is found, return nil. |
316 composed. If RELATIVE-P is nil, COMPONENTS is a vector of characters | 316 composed. If RELATIVE-P is nil, COMPONENTS is a vector of characters |
317 and composition rules as described in `compose-region'. | 317 and composition rules as described in `compose-region'. |
318 | 318 |
319 MOD-FUNC is a modification function of the composition. | 319 MOD-FUNC is a modification function of the composition. |
320 | 320 |
321 WIDTH is a number of columns the composition occupies on the screen." | 321 WIDTH is a number of columns the composition occupies on the screen. |
322 | |
323 When Automatic Compostion mode is on, this function also finds a | |
324 chunk of text that is automatically composed. If such a chunk is | |
325 found closer to POS than the position that has `composition' | |
326 property, the value is a list of FROM, TO, and a glyph gstring | |
327 the specify how the chunk is composed. See the function | |
328 `composition-get-gstring' for the format of the glyph string." | |
322 (let ((result (find-composition-internal pos limit string detail-p))) | 329 (let ((result (find-composition-internal pos limit string detail-p))) |
323 (if (and detail-p result (nth 2 result) (not (nth 3 result))) | 330 (if (and detail-p (> (length result) 3) (nth 2 result) (not (nth 3 result))) |
324 ;; This is a valid rule-base composition. | 331 ;; This is a valid rule-base composition. |
325 (decode-composition-components (nth 2 result) 'nocopy)) | 332 (decode-composition-components (nth 2 result) 'nocopy)) |
326 result)) | 333 result)) |
327 | 334 |
328 | 335 |