Mercurial > emacs
changeset 108803:5a61e28431af
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 16:09:18 +0900 |
parents | 697926009964 (current diff) f1cd90ef7663 (diff) |
children | 9b941507a02c f6714012e3cb |
files | |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed May 26 23:13:23 2010 -0700 +++ b/lisp/ChangeLog Thu May 27 16:09:18 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-27 Stefan Monnier <monnier@iro.umontreal.ca> * emacs-lisp/smie.el (smie-forward-token-function)
--- a/lisp/language/hebrew.el Wed May 26 23:13:23 2010 -0700 +++ b/lisp/language/hebrew.el Thu May 27 16:09:18 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))