diff options
author | Kenichi Handa <handa@m17n.org> | 2008-12-03 05:30:38 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2008-12-03 05:30:38 +0000 |
commit | b1bde62298d30e1f44497e19cf970d34a7850d64 (patch) | |
tree | b31527e8b28bb3575c9b2cfdec803cfeac877b85 | |
parent | 2cf4d521ac33da1905b549374eb6c3b3b0e86867 (diff) | |
download | emacs-b1bde62298d30e1f44497e19cf970d34a7850d64.tar.gz emacs-b1bde62298d30e1f44497e19cf970d34a7850d64.tar.bz2 emacs-b1bde62298d30e1f44497e19cf970d34a7850d64.zip |
(face_for_char): Handle invalid charset property
correctly.
(font_for_char): Likewise.
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/fontset.c | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d32c53c9bb0..cc91c56522d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2008-12-03 Kenichi Handa <handa@m17n.org> + + * fontset.c (face_for_char): Handle invalid charset property + correctly. + (font_for_char): Likewise. + 2008-12-03 Chong Yidong <cyd@stupidchicken.com> * font.c (Fopen_font): Compute pixel size correctly. diff --git a/src/fontset.c b/src/fontset.c index 9053fbdc1f3..efa26ae7679 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -894,9 +894,7 @@ face_for_char (f, face, c, pos, object) else { charset = Fget_char_property (make_number (pos), Qcharset, object); - if (NILP (charset)) - id = -1; - else if (CHARSETP (charset)) + if (CHARSETP (charset)) { Lisp_Object val; @@ -905,6 +903,8 @@ face_for_char (f, face, c, pos, object) charset = XCDR (val); id = XINT (CHARSET_SYMBOL_ID (charset)); } + else + id = -1; } font_deferred_log ("font for", Fcons (make_number (c), charset), Qnil); @@ -966,9 +966,7 @@ font_for_char (face, c, pos, object) else { charset = Fget_char_property (make_number (pos), Qcharset, object); - if (NILP (charset)) - id = -1; - else if (CHARSETP (charset)) + if (CHARSETP (charset)) { Lisp_Object val; @@ -977,6 +975,8 @@ font_for_char (face, c, pos, object) charset = XCDR (val); id = XINT (CHARSET_SYMBOL_ID (charset)); } + else + id = -1; } font_deferred_log ("font for", Fcons (make_number (c), charset), Qnil); |