diff options
| author | Michal Nazarewicz <mina86@mina86.com> | 2016-08-03 03:08:48 +0200 |
|---|---|---|
| committer | Michal Nazarewicz <mina86@mina86.com> | 2016-09-09 03:07:15 +0200 |
| commit | c579b28f6281c9cc0b711a012c30bf00036c60bf (patch) | |
| tree | c54b9270ab30dd18239e594b8aee6957162d12d9 /src/regex.c | |
| parent | b1c4c0050057ca982cab28b8ad11b3175c3bb0d2 (diff) | |
| download | emacs-c579b28f6281c9cc0b711a012c30bf00036c60bf.tar.gz | |
Replace decimalnump with alphanumericp
decimalnump was used in regex.c only in ISALNUM macro which ored it with
alphabeticp. Because both of those functions require Unicode general
category lookup, this resulted in unnecessary lookups (if alphabeticp
return false decimalp had to perform another lookup). Drop decimalnump
in favour of alphanumericp which combines decimelnump with alphabeticp.
* src/character.c (decimalnump): Remove in favour of…
(alphanumericp): …new function.
* src/regex.c (ISALNUM): Use alphanumericp.
Diffstat (limited to 'src/regex.c')
| -rw-r--r-- | src/regex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regex.c b/src/regex.c index c808398cda6..5f51b43e6c8 100644 --- a/src/regex.c +++ b/src/regex.c @@ -324,7 +324,7 @@ enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 }; ? (((c) >= 'a' && (c) <= 'z') \ || ((c) >= 'A' && (c) <= 'Z') \ || ((c) >= '0' && (c) <= '9')) \ - : (alphabeticp (c) || decimalnump (c))) + : alphanumericp (c)) # define ISALPHA(c) (IS_REAL_ASCII (c) \ ? (((c) >= 'a' && (c) <= 'z') \ |
