[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src fontset.c
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] emacs/src fontset.c |
Date: |
Thu, 09 Jul 2009 01:05:28 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kenichi Handa <handa> 09/07/09 01:05:27
Modified files:
src : fontset.c
Log message:
(fontset_find_font): Fix previous change.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/fontset.c?cvsroot=emacs&r1=1.177&r2=1.178
Patches:
Index: fontset.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fontset.c,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -b -r1.177 -r1.178
--- fontset.c 8 Jul 2009 03:49:12 -0000 1.177
+++ fontset.c 9 Jul 2009 01:05:27 -0000 1.178
@@ -575,25 +575,25 @@
Lisp_Object font_def;
Lisp_Object font_entity, font_object;
+ found_index = i;
if (i == 0)
{
- /* Try the element matching with the charset ID at first. */
- found_index = charset_matched;
if (charset_matched > 0)
{
+ /* Try the element matching with the charset ID at first. */
+ found_index = charset_matched;
+ /* Make this negative so that we don't come here in the
+ next loop. */
charset_matched = - charset_matched;
+ /* We must try the first element in the next loop. */
i--;
}
}
- else if (i != - charset_matched)
- {
- found_index = i;
- }
- else
+ else if (i == - charset_matched)
{
/* We have already tried this element and the followings
- that have the same font specifications. So, skip them
- all. */
+ that have the same font specifications in the first
+ iteration. So, skip them all. */
rfont_def = AREF (vec, i);
font_def = RFONT_DEF_FONT_DEF (rfont_def);
for (; i + 1 < ASIZE (vec); i++)
@@ -610,7 +610,7 @@
rfont_def = AREF (vec, found_index);
if (NILP (rfont_def))
{
- if (charset_matched < 0)
+ if (i < 0)
continue;
/* This is a sign of not to try the other fonts. */
return Qt;