Include <ctype.h>
authorKenichi Handa <handa@m17n.org>
Thu, 19 Jun 2008 10:37:11 +0000 (10:37 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 19 Jun 2008 10:37:11 +0000 (10:37 +0000)
(x_set_font_backend): Allow spacing characters in the X resource
for FontBackend.

src/ChangeLog
src/frame.c

index 6a920f2..bd8d020 100644 (file)
@@ -1,8 +1,15 @@
+2008-06-19  Kenichi Handa  <handa@m17n.org>
+
+       * frame.c: Include <ctype.h>.
+       (x_set_font_backend): Allow spacing characters in the X resource
+       for FontBackend.
+
 2008-06-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * w32fns.c, xfns.c (Qfont_param): New var.
        (syms_of_w32fns): Initialize it.
-       (x_default_font_parameter): Record explicit `font' into `font-parameter'.
+       (x_default_font_parameter): Record explicit `font' into
+       `font-parameter'.
 
 2008-06-18  Kenichi Handa  <handa@m17n.org>
 
index 84a4e54..761e6cc 100644 (file)
@@ -20,6 +20,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <config.h>
 
 #include <stdio.h>
+#include <ctype.h>
 #include "lisp.h"
 #include "character.h"
 #ifdef HAVE_X_WINDOWS
@@ -3419,12 +3420,16 @@ x_set_font_backend (f, new_value, old_value)
       new_value = Qnil;
       while (*p0)
        {
-         while (*p1 && *p1 != ',') p1++;
+         while (*p1 && ! isspace (*p1) && *p1 != ',') p1++;
          if (p0 < p1)
            new_value = Fcons (Fintern (make_string (p0, p1 - p0), Qnil),
                               new_value);
          if (*p1)
-           p1++;
+           {
+             int c;
+
+             while ((c = *++p1) && isspace (c));
+           }
          p0 = p1;
        }
       new_value = Fnreverse (new_value);