Index: gtkrc.c
===================================================================
--- gtkrc.c	(revision 18824)
+++ gtkrc.c	(working copy)
@@ -2806,14 +2809,23 @@ gtk_rc_parse_assignment (GScanner      *
 static gboolean
 is_c_identifier (const gchar *string)
 {
-  const gchar *p;
-  gboolean is_varname;
+  if ((string[0] >= 'a' && string[0] <= 'z') ||
+      (string[0] >= 'A' && string[0] <= 'Z') ||
+      string[0] == '_')
+    {
+      const gchar *p;
+
+      for (p = string + 1; *p ; p++)
+        if (! ((*p >= 'a' && *p <= 'z') ||
+               (*p >= 'A' && *p <= 'Z') ||
+               (*p >= '0' && *p <= '9') ||
+               *p == '-' || *p == '_'))
+          return FALSE;
 
-  is_varname = strchr ("_" G_CSET_a_2_z G_CSET_A_2_Z, string[0]) != NULL;
-  for (p = string + 1; *p && is_varname; p++)
-    is_varname &= strchr (G_CSET_DIGITS "-_" G_CSET_a_2_z G_CSET_A_2_Z, *p) != NULL;
+      return TRUE;
+    }
 
-  return is_varname;
+  return FALSE;
 }
 
 static void
