src/syntax.c (scan_lists): Don't examine positions before BEGV.
+2014-08-27 Eli Zaretskii <eliz@gnu.org>
+
+ * syntax.c (scan_lists): Don't examine positions before BEGV.
+ (Bug#18339)
+
2014-08-27 Paul Eggert <eggert@cs.ucla.edu>
Improve robustness of new string-collation code (Bug#18051).
case Smath:
if (!sexpflag)
break;
- temp_pos = dec_bytepos (from_byte);
- UPDATE_SYNTAX_TABLE_BACKWARD (from - 1);
- if (from != stop && c == FETCH_CHAR_AS_MULTIBYTE (temp_pos))
- DEC_BOTH (from, from_byte);
+ if (from > BEGV)
+ {
+ temp_pos = dec_bytepos (from_byte);
+ UPDATE_SYNTAX_TABLE_BACKWARD (from - 1);
+ if (from != stop && c == FETCH_CHAR_AS_MULTIBYTE (temp_pos))
+ DEC_BOTH (from, from_byte);
+ }
if (mathexit)
{
mathexit = 0;