Commit 74910c5d authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Fix bug #18339 with segfault when $ is typed into empty LaTeX buffer.

Back-ported from trunk revision-id: 2014-08-27T19:40:54Z!eliz@gnu.org

 src/syntax.c (scan_lists): Don't examine positions before BEGV.
parent b62da77c
2014-08-28 Eli Zaretskii <eliz@gnu.org>
* syntax.c (scan_lists): Don't examine positions before BEGV.
(Bug#18339)
2014-08-25 Eli Zaretskii <eliz@gnu.org>
* conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Don't define.
......
......@@ -2859,10 +2859,13 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag)
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment