changeset 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 3e55b265569a
children 0d5e7fb9d38b
files lisp/ps-mule.el
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ps-mule.el	Thu Aug 16 19:48:00 2001 +0000
+++ b/lisp/ps-mule.el	Fri Aug 17 09:02:04 2001 +0000
@@ -7,7 +7,7 @@
 ;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters)
 ;;	Vinicius Jose Latorre <vinicius@cpqd.com.br>
 ;; Keywords: wp, print, PostScript, multibyte, mule
-;; Time-stamp: <2001/08/07 13:50:53 vinicius>
+;; Time-stamp: <2001/08/15 15:34:11 vinicius>
 
 ;; This file is part of GNU Emacs.
 
@@ -242,11 +242,11 @@
 	  (+ (* (car rule) 12) (cdr rule)))
 	(defun find-composition (pos &rest ignore)
 	  (let ((ch (char-after pos)))
-	    (if (eq (char-charset ch) 'composition)
-		(let ((components (decompose-composite-char ch 'vector t)))
-		  (list pos (ps-mule-next-point pos) components
-			(integerp (aref components 1)) nil
-			(char-width ch)))))))
+	    (and ch (eq (char-charset ch) 'composition)
+		 (let ((components (decompose-composite-char ch 'vector t)))
+		   (list pos (ps-mule-next-point pos) components
+			 (integerp (aref components 1)) nil
+			 (char-width ch)))))))
     ;; mule package isn't loaded
     (or (fboundp 'encode-composition-rule)
 	(defun encode-composition-rule (rule)
@@ -1130,10 +1130,10 @@
 	} ifelse } ifelse } ifelse
     } forall ] /components exch def
     grestore
-    
+
     %% Reflect special effects.
     SpecialEffect
-    
+
     %% Draw components while ignoring effects other than shadow and outline.
     components ShowComponents