/[emacs]/emacs/lisp/composite.el
ViewVC logotype

Diff of /emacs/lisp/composite.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by pj, Sun Jul 15 19:53:52 2001 UTC revision 1.8.8.1 by miles, Fri Apr 4 06:20:01 2003 UTC
# Line 95  follows (the point `*' corresponds to bo Line 95  follows (the point `*' corresponds to bo
95        (or (integerp nref)        (or (integerp nref)
96            (setq nref (cdr (assq nref reference-point-alist))))            (setq nref (cdr (assq nref reference-point-alist))))
97        (or (and (>= gref 0) (< gref 12) (>= nref 0) (< nref 12))        (or (and (>= gref 0) (< gref 12) (>= nref 0) (< nref 12))
98            (error "Invalid composition rule: %S" rule))              (error "Invalid composition rule: %S" rule))
99        (+ (* gref 12) nref))))        (+ (* gref 12) nref))))
100    
101  ;; Decode encoded composition rule RULE-CODE.  The value is a cons of  ;; Decode encoded composition rule RULE-CODE.  The value is a cons of
# Line 158  follows (the point `*' corresponds to bo Line 158  follows (the point `*' corresponds to bo
158  (defun compose-region (start end &optional components modification-func)  (defun compose-region (start end &optional components modification-func)
159    "Compose characters in the current region.    "Compose characters in the current region.
160    
161    Characters are composed relatively, i.e. composed by overstricking or
162    stacking depending on ascent, descent and other properties.
163    
164  When called from a program, expects these four arguments.  When called from a program, expects these four arguments.
165    
166  First two arguments START and END are positions (integers or markers)  First two arguments START and END are positions (integers or markers)
167  specifying the region.  specifying the region.
168    
169  Optional 3rd argument COMPONENTS, if non-nil, is a character or a  Optional 3rd argument COMPONENTS, if non-nil, is a character or a
170  sequence (vector, list, or string) of integers.  sequence (vector, list, or string) of integers.  In this case,
171    characters are composed not relatively but according to COMPONENTS.
172    
173  If it is a character, it is an alternate character to display instead  If it is a character, it is an alternate character to display instead
174  of the text in the region.  of the text in the region.
# Line 327  This function is the default value of `c Line 331  This function is the default value of `c
331      (when tail      (when tail
332        (save-match-data        (save-match-data
333          (save-excursion          (save-excursion
334            (while (and tail (not func))                        (while (and tail (not func))
335              (setq pattern (car (car tail))              (setq pattern (car (car tail))
336                    func (cdr (car tail)))                    func (cdr (car tail)))
337              (goto-char pos)              (goto-char pos)
# Line 364  after a sequence character events." Line 368  after a sequence character events."
368    
369    
370  ;;; The following codes are only for backward compatibility with Emacs  ;;; The following codes are only for backward compatibility with Emacs
371  ;;; 20.4 and the earlier.  ;;; 20.4 and earlier.
372    
373  ;;;###autoload  ;;;###autoload
374  (defun decompose-composite-char (char &optional type with-composition-rule)  (defun decompose-composite-char (char &optional type with-composition-rule)
375    "Convert CHAR to string.    "Convert CHAR to string.
 This is only for backward compatibility with Emacs 20.4 and the earlier.  
376    
377  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
378  `vector'.  In this case, CHAR is converted string, list of CHAR, or  `vector'.  In this case, CHAR is converted to string, list of CHAR, or
379  vector of CHAR respectively."  vector of CHAR respectively.
380    Optional 3rd arg WITH-COMPOSITION-RULE is ignored."
381    (cond ((or (null type) (eq type 'string)) (char-to-string char))    (cond ((or (null type) (eq type 'string)) (char-to-string char))
382          ((eq type 'list) (list char))          ((eq type 'list) (list char))
383          (t (vector char))))          (t (vector char))))
384    
385    ;;;###autoload
386  (make-obsolete 'decompose-composite-char 'char-to-string "21.1")  (make-obsolete 'decompose-composite-char 'char-to-string "21.1")
387    
388    

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.8.8.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26