changeset 108801:023730733576

language/hebrew.el (hebrew-shape-gstring): Check if a glyph element of GSTRING is nil.
author Kenichi Handa <handa@etlken>
date Thu, 27 May 2010 13:24:30 +0900
parents 009ef331a2bc
children f1cd90ef7663
files lisp/ChangeLog lisp/language/hebrew.el
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed May 26 10:14:51 2010 +0900
+++ b/lisp/ChangeLog	Thu May 27 13:24:30 2010 +0900
@@ -1,3 +1,8 @@
+2010-05-27  Kenichi Handa  <handa@m17n.org>
+
+	* language/hebrew.el (hebrew-shape-gstring): Check if a glyph
+	element of GSTRING is nil.
+
 2010-05-25  Chong Yidong  <cyd@stupidchicken.com>
 
 	* log-edit.el (log-edit-strip-single-file-name): Default to nil.
--- a/lisp/language/hebrew.el	Wed May 26 10:14:51 2010 +0900
+++ b/lisp/language/hebrew.el	Thu May 27 13:24:30 2010 +0900
@@ -92,6 +92,9 @@
 	(nchars (lgstring-char-len gstring))
 	(nglyphs (lgstring-glyph-len gstring))
 	(base-width (lglyph-width (lgstring-glyph gstring 0))))
+    (while (and (> nglyphs 1)
+		(not (lgstring-glyph gstring (1- nglyphs))))
+      (setq nglyphs (1- nglyphs)))
     (while (> nglyphs 1)
       (setq nglyphs (1- nglyphs))
       (let* ((glyph (lgstring-glyph gstring nglyphs))