aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorAndreas Schwab2004-01-06 16:11:00 +0000
committerAndreas Schwab2004-01-06 16:11:00 +0000
commit57951c2efa53763d47955716556b4f8b88de4417 (patch)
treebd9d5848f03c713f742892a50506374daf89a42e /src/syntax.c
parent2e3b4a0b359380880d5dad013a3286a6217e2ae2 (diff)
downloademacs-57951c2efa53763d47955716556b4f8b88de4417.tar.gz
emacs-57951c2efa53763d47955716556b4f8b88de4417.zip
(skip_chars): Treat '-' at end of string as ordinary
character.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 79df112d265..30fc94267cd 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1,5 +1,5 @@
1/* GNU Emacs routines to deal with syntax tables; also word and list parsing. 1/* GNU Emacs routines to deal with syntax tables; also word and list parsing.
2 Copyright (C) 1985, 87, 93, 94, 95, 97, 1998, 1999 Free Software Foundation, Inc. 2 Copyright (C) 1985, 87, 93, 94, 95, 97, 1998, 1999, 2004 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -1442,10 +1442,13 @@ skip_chars (forwardp, syntaxp, string, lim)
1442 if (i_byte == size_byte) 1442 if (i_byte == size_byte)
1443 break; 1443 break;
1444 1444
1445 c = STRING_CHAR_AND_LENGTH (str+i_byte, size_byte-i_byte, len); 1445 c = STRING_CHAR_AND_LENGTH (str + i_byte,
1446 size_byte - i_byte, len);
1446 i_byte += len; 1447 i_byte += len;
1447 } 1448 }
1448 if (i_byte < size_byte 1449 /* Treat `-' as range character only if another character
1450 follows. */
1451 if (i_byte + 1 < size_byte
1449 && str[i_byte] == '-') 1452 && str[i_byte] == '-')
1450 { 1453 {
1451 unsigned int c2; 1454 unsigned int c2;
@@ -1453,11 +1456,9 @@ skip_chars (forwardp, syntaxp, string, lim)
1453 /* Skip over the dash. */ 1456 /* Skip over the dash. */
1454 i_byte++; 1457 i_byte++;
1455 1458
1456 if (i_byte == size_byte)
1457 break;
1458
1459 /* Get the end of the range. */ 1459 /* Get the end of the range. */
1460 c2 =STRING_CHAR_AND_LENGTH (str+i_byte, size_byte-i_byte, len); 1460 c2 = STRING_CHAR_AND_LENGTH (str + i_byte,
1461 size_byte - i_byte, len);
1461 i_byte += len; 1462 i_byte += len;
1462 1463
1463 if (SINGLE_BYTE_CHAR_P (c)) 1464 if (SINGLE_BYTE_CHAR_P (c))