Mercurial > emacs
comparison lisp/composite.el @ 92026:4ad14ee0d40a
(encode-composition-rule): Fix typo in error message.
(composition-function-table, auto-composition-mode): Doc fixes.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 21 Feb 2008 07:53:37 +0000 |
parents | 501d20267e59 |
children | ee5932bf781d |
comparison
equal
deleted
inserted
replaced
92025:038a958de82d | 92026:4ad14ee0d40a |
---|---|
104 (setq xoff (nth 1 nref) | 104 (setq xoff (nth 1 nref) |
105 yoff (nth 2 nref) | 105 yoff (nth 2 nref) |
106 nref (car nref)) | 106 nref (car nref)) |
107 (or (and (>= xoff -100) (<= xoff 100) | 107 (or (and (>= xoff -100) (<= xoff 100) |
108 (>= yoff -100) (<= yoff 100)) | 108 (>= yoff -100) (<= yoff 100)) |
109 (error "Invalid compostion rule: %s" rule)) | 109 (error "Invalid composition rule: %s" rule)) |
110 (setq xoff (+ xoff 128) yoff (+ yoff 128))) | 110 (setq xoff (+ xoff 128) yoff (+ yoff 128))) |
111 ;; (GREF . NREF) | 111 ;; (GREF . NREF) |
112 (setq xoff 0 yoff 0)) | 112 (setq xoff 0 yoff 0)) |
113 (or (integerp gref) | 113 (or (integerp gref) |
114 (setq gref (cdr (assq gref reference-point-alist)))) | 114 (setq gref (cdr (assq gref reference-point-alist)))) |
402 | 402 |
403 Each function is called with 4 arguments, FROM, TO, FONT-OBJECT, | 403 Each function is called with 4 arguments, FROM, TO, FONT-OBJECT, |
404 and STRING. | 404 and STRING. |
405 | 405 |
406 If STRING is nil, FROM and TO are positions specifying the region | 406 If STRING is nil, FROM and TO are positions specifying the region |
407 maching with PATTERN in the current buffer, and the function has | 407 matching with PATTERN in the current buffer, and the function has |
408 to compose character in that region (possibly with characters | 408 to compose character in that region (possibly with characters |
409 preceding FROM). FONT-OBJECT may be nil if not | 409 preceding FROM). FONT-OBJECT may be nil if not |
410 available (e.g. for the case of terminal). The return value of | 410 available (e.g. for the case of terminal). The return value of |
411 the function is the end position where characters are composed, | 411 the function is the end position where characters are composed, |
412 or nil if no compostion is made. | 412 or nil if no composition is made. |
413 | 413 |
414 Otherwise, STRING is a string, and FROM and TO are indices into | 414 Otherwise, STRING is a string, and FROM and TO are indices into |
415 the string. In this case, the function has to compose a | 415 the string. In this case, the function has to compose a |
416 character in the string. The others are the same as above. | 416 character in the string. The others are the same as above. |
417 | 417 |
539 | 539 |
540 (make-variable-buffer-local 'auto-composition-function) | 540 (make-variable-buffer-local 'auto-composition-function) |
541 | 541 |
542 ;;;###autoload | 542 ;;;###autoload |
543 (define-minor-mode auto-composition-mode | 543 (define-minor-mode auto-composition-mode |
544 "Toggle Auto Compostion mode. | 544 "Toggle Auto Composition mode. |
545 With arg, turn Auto Compostion mode off if and only if arg is a non-positive | 545 With ARG, turn Auto Composition mode off if and only if ARG is a non-positive |
546 number; if arg is nil, toggle Auto Compostion mode; anything else turns Auto | 546 number; if ARG is nil, toggle Auto Composition mode; anything else turns Auto |
547 Compostion on. | 547 Composition on. |
548 | 548 |
549 When Auto Composition is enabled, text characters are automatically composed | 549 When Auto Composition is enabled, text characters are automatically composed |
550 by functions registered in `composition-function-table' (which see). | 550 by functions registered in `composition-function-table' (which see). |
551 | 551 |
552 You can use Global Auto Composition mode to automagically turn on | 552 You can use `global-auto-composition-mode' to turn on |
553 Auto Composition mode in all buffers (this is the default)." | 553 Auto Composition mode in all buffers (this is the default)." |
554 nil nil nil | 554 nil nil nil |
555 (if noninteractive | 555 (if noninteractive |
556 (setq auto-composition-mode nil)) | 556 (setq auto-composition-mode nil)) |
557 (cond (auto-composition-mode | 557 (cond (auto-composition-mode |