From: Kenichi Handa Date: Thu, 4 Nov 2004 02:28:51 +0000 (+0000) Subject: (fontset_pattern_regexp): If '*' is preceded by '\', X-Git-Tag: ttn-vms-21-2-B4~4209 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b912921c670907a0c62f0f6459fe5f1155eead9a;p=emacs.git (fontset_pattern_regexp): If '*' is preceded by '\', treat it as a literal character. --- diff --git a/src/ChangeLog b/src/ChangeLog index 201bbcba661..01d35ba8e9b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-11-04 Kenichi Handa + + * fontset.c (fontset_pattern_regexp): If '*' is preceded by '\', + treat it as a literal character. + 2004-11-03 Kim F. Storm * .gdbinit (ppt): New function. diff --git a/src/fontset.c b/src/fontset.c index bccbce8bf45..fc4da1305f3 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -796,7 +796,7 @@ fontset_pattern_regexp (pattern) { if (*p0 == '-') ndashes++; - else if (*p0 == '*') + else if (*p0 == '*' && p0 > SDATA (pattern) && p0[-1] != '\\') nstars++; } @@ -811,7 +811,7 @@ fontset_pattern_regexp (pattern) *p1++ = '^'; for (p0 = (char *) SDATA (pattern); *p0; p0++) { - if (*p0 == '*') + if (*p0 == '*' && p0 > SDATA (pattern) && p0[-1] != '\\') { if (ndashes < 14) *p1++ = '.';