diff options
| author | Kenichi Handa | 2004-11-04 02:28:51 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2004-11-04 02:28:51 +0000 |
| commit | b912921c670907a0c62f0f6459fe5f1155eead9a (patch) | |
| tree | a978dc25f89c26f4a4dba24a29eb5c30ae364808 /src | |
| parent | 589f233e08f973b96acfc75b3c53157a807495f5 (diff) | |
| download | emacs-b912921c670907a0c62f0f6459fe5f1155eead9a.tar.gz emacs-b912921c670907a0c62f0f6459fe5f1155eead9a.zip | |
(fontset_pattern_regexp): If '*' is preceded by '\',
treat it as a literal character.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/fontset.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 201bbcba661..01d35ba8e9b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-11-04 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * fontset.c (fontset_pattern_regexp): If '*' is preceded by '\', | ||
| 4 | treat it as a literal character. | ||
| 5 | |||
| 1 | 2004-11-03 Kim F. Storm <storm@cua.dk> | 6 | 2004-11-03 Kim F. Storm <storm@cua.dk> |
| 2 | 7 | ||
| 3 | * .gdbinit (ppt): New function. | 8 | * .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) | |||
| 796 | { | 796 | { |
| 797 | if (*p0 == '-') | 797 | if (*p0 == '-') |
| 798 | ndashes++; | 798 | ndashes++; |
| 799 | else if (*p0 == '*') | 799 | else if (*p0 == '*' && p0 > SDATA (pattern) && p0[-1] != '\\') |
| 800 | nstars++; | 800 | nstars++; |
| 801 | } | 801 | } |
| 802 | 802 | ||
| @@ -811,7 +811,7 @@ fontset_pattern_regexp (pattern) | |||
| 811 | *p1++ = '^'; | 811 | *p1++ = '^'; |
| 812 | for (p0 = (char *) SDATA (pattern); *p0; p0++) | 812 | for (p0 = (char *) SDATA (pattern); *p0; p0++) |
| 813 | { | 813 | { |
| 814 | if (*p0 == '*') | 814 | if (*p0 == '*' && p0 > SDATA (pattern) && p0[-1] != '\\') |
| 815 | { | 815 | { |
| 816 | if (ndashes < 14) | 816 | if (ndashes < 14) |
| 817 | *p1++ = '.'; | 817 | *p1++ = '.'; |