# HG changeset patch # User Kenichi Handa # Date 1274934270 -32400 # Node ID 0237307335767bf3dc4c5a75b185160725a305eb # Parent 009ef331a2bc955fb8187f097b56db15fb13f281 language/hebrew.el (hebrew-shape-gstring): Check if a glyph element of GSTRING is nil. diff -r 009ef331a2bc -r 023730733576 lisp/ChangeLog --- 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 + + * language/hebrew.el (hebrew-shape-gstring): Check if a glyph + element of GSTRING is nil. + 2010-05-25 Chong Yidong * log-edit.el (log-edit-strip-single-file-name): Default to nil. diff -r 009ef331a2bc -r 023730733576 lisp/language/hebrew.el --- 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))