From: Kenichi Handa Date: Thu, 27 May 2010 04:24:30 +0000 (+0900) Subject: language/hebrew.el (hebrew-shape-gstring): Check if a glyph element of GSTRING is... X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~185 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2b25da455e14b3712f544ebf7fb1c83d17353130;p=emacs.git language/hebrew.el (hebrew-shape-gstring): Check if a glyph element of GSTRING is nil. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fd5d16a710c..e72dfd2614b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/language/hebrew.el b/lisp/language/hebrew.el index 5c39bb22416..f024251c60b 100644 --- a/lisp/language/hebrew.el +++ b/lisp/language/hebrew.el @@ -92,6 +92,9 @@ Bidirectional editing is supported."))) (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))