]> code.delx.au - gnu-emacs/blobdiff - lisp/composite.el
*** empty log message ***
[gnu-emacs] / lisp / composite.el
index 18c1cc02eee511e4067b06e68e1842c5ab8992e0..6df3b690071f84461c668cf9721232fcca9b41ce 100644 (file)
@@ -94,7 +94,7 @@ follows (the point `*' corresponds to both reference points):
       (or (integerp nref)
          (setq nref (cdr (assq nref reference-point-alist))))
       (or (and (>= gref 0) (< gref 12) (>= nref 0) (< nref 12))
-         (error "Invalid composition rule: %S" rule))  
+         (error "Invalid composition rule: %S" rule))
       (+ (* gref 12) nref))))
 
 ;; Decode encoded composition rule RULE-CODE.  The value is a cons of
@@ -156,13 +156,17 @@ follows (the point `*' corresponds to both reference points):
 (defun compose-region (start end &optional components modification-func)
   "Compose characters in the current region.
 
+Characters are composed relatively, i.e. composed by overstricking or
+stacking depending on ascent, descent and other properties.
+
 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.
@@ -319,7 +323,7 @@ This function is the default value of `compose-chars-after-function'."
     (when tail
       (save-match-data
        (save-excursion
-         (while (and tail (not func))            
+         (while (and tail (not func))
            (setq pattern (car (car tail))
                  func (cdr (car tail)))
            (goto-char pos)
@@ -457,18 +461,17 @@ With arg, enable it iff arg is positive."
       (save-restriction
        (widen)
        (put-text-property (point-min) (point-max) 'auto-composed nil)))))
-
 \f
 ;;; The following codes are only for backward compatibility with Emacs
-;;; 20.4 and the earlier.
+;;; 20.4 and earlier.
 
 (defun decompose-composite-char (char &optional type with-composition-rule)
   "Convert CHAR to string.
-This is only for backward compatibility with Emacs 20.4 and the earlier.
 
 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."
   (cond ((or (null type) (eq type 'string)) (char-to-string char))
        ((eq type 'list) (list char))
        (t (vector char))))