Mercurial > emacs
comparison lisp/ps-mule.el @ 38855:db1312628833
(find-composition): Check if (char-after POS)
returns a valid character.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 17 Aug 2001 09:02:04 +0000 |
parents | e4e0e5593284 |
children | aa246aad950a |
comparison
equal
deleted
inserted
replaced
38854:3e55b265569a | 38855:db1312628833 |
---|---|
5 ;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br> | 5 ;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br> |
6 ;; Kenichi Handa <handa@etl.go.jp> (multi-byte characters) | 6 ;; Kenichi Handa <handa@etl.go.jp> (multi-byte characters) |
7 ;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters) | 7 ;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters) |
8 ;; Vinicius Jose Latorre <vinicius@cpqd.com.br> | 8 ;; Vinicius Jose Latorre <vinicius@cpqd.com.br> |
9 ;; Keywords: wp, print, PostScript, multibyte, mule | 9 ;; Keywords: wp, print, PostScript, multibyte, mule |
10 ;; Time-stamp: <2001/08/07 13:50:53 vinicius> | 10 ;; Time-stamp: <2001/08/15 15:34:11 vinicius> |
11 | 11 |
12 ;; This file is part of GNU Emacs. | 12 ;; This file is part of GNU Emacs. |
13 | 13 |
14 ;; GNU Emacs is free software; you can redistribute it and/or modify | 14 ;; GNU Emacs is free software; you can redistribute it and/or modify |
15 ;; it under the terms of the GNU General Public License as published by | 15 ;; it under the terms of the GNU General Public License as published by |
240 (if (= (car rule) 4) (setcar rule 10)) | 240 (if (= (car rule) 4) (setcar rule 10)) |
241 (if (= (cdr rule) 4) (setcdr rule 10)) | 241 (if (= (cdr rule) 4) (setcdr rule 10)) |
242 (+ (* (car rule) 12) (cdr rule))) | 242 (+ (* (car rule) 12) (cdr rule))) |
243 (defun find-composition (pos &rest ignore) | 243 (defun find-composition (pos &rest ignore) |
244 (let ((ch (char-after pos))) | 244 (let ((ch (char-after pos))) |
245 (if (eq (char-charset ch) 'composition) | 245 (and ch (eq (char-charset ch) 'composition) |
246 (let ((components (decompose-composite-char ch 'vector t))) | 246 (let ((components (decompose-composite-char ch 'vector t))) |
247 (list pos (ps-mule-next-point pos) components | 247 (list pos (ps-mule-next-point pos) components |
248 (integerp (aref components 1)) nil | 248 (integerp (aref components 1)) nil |
249 (char-width ch))))))) | 249 (char-width ch))))))) |
250 ;; mule package isn't loaded | 250 ;; mule package isn't loaded |
251 (or (fboundp 'encode-composition-rule) | 251 (or (fboundp 'encode-composition-rule) |
252 (defun encode-composition-rule (rule) | 252 (defun encode-composition-rule (rule) |
253 130)) | 253 130)) |
254 (or (fboundp 'find-composition) | 254 (or (fboundp 'find-composition) |
1128 bottom height add TOP gt { /TOP bottom height add def } if | 1128 bottom height add TOP gt { /TOP bottom height add def } if |
1129 [ elt left LLX sub bottom LLY sub ] | 1129 [ elt left LLX sub bottom LLY sub ] |
1130 } ifelse } ifelse } ifelse | 1130 } ifelse } ifelse } ifelse |
1131 } forall ] /components exch def | 1131 } forall ] /components exch def |
1132 grestore | 1132 grestore |
1133 | 1133 |
1134 %% Reflect special effects. | 1134 %% Reflect special effects. |
1135 SpecialEffect | 1135 SpecialEffect |
1136 | 1136 |
1137 %% Draw components while ignoring effects other than shadow and outline. | 1137 %% Draw components while ignoring effects other than shadow and outline. |
1138 components ShowComponents | 1138 components ShowComponents |
1139 | 1139 |
1140 /Composing false def | 1140 /Composing false def |
1141 } def | 1141 } def |