# HG changeset patch # User Ben Wing # Date 1265087686 21600 # Node ID fc28cc192c91533bfa1528cc67682569e363e8ad # Parent 7eec2a1f3412f0e17f9f007e26ffb76ac5f88632# Parent e99033b7e05c4b516f9a92c7db9d1b7069bffd81 Automated merge with http://hg.debian.org/hg/xemacs/xemacs diff -r 7eec2a1f3412 -r fc28cc192c91 src/ChangeLog --- a/src/ChangeLog Mon Feb 01 17:08:41 2010 -0500 +++ b/src/ChangeLog Mon Feb 01 23:14:46 2010 -0600 @@ -270,6 +270,16 @@ * keymap.c (keymap_hash): Implement. +2010-02-01 Ben Wing + + * syntax.c: + * syntax.c (scan_lists): + * syntax.c (syms_of_syntax): + Declare `scan-error' as a type of `syntax-error'. In `scan-lists' + et al., don't signal a syntax error but instead a `scan-error', and + pass a couple of integer arguments, for GNU compatibility. Fixes + problems with typing double-quote in texinfo.el. + 2010-01-31 Aidan Kehoe * symbols.c (Fspecial_operator_p, syms_of_symbols): diff -r 7eec2a1f3412 -r fc28cc192c91 src/syntax.c --- a/src/syntax.c Mon Feb 01 17:08:41 2010 -0500 +++ b/src/syntax.c Mon Feb 01 23:14:46 2010 -0600 @@ -69,6 +69,8 @@ /* A value that is guaranteed not be in a syntax table. */ Lisp_Object Vbogus_syntax_table_value; +Lisp_Object Qscan_error; + static void syntax_cache_table_was_changed (struct buffer *buf); /* This is the internal form of the parse state used in parse-partial-sexp. */ @@ -1353,6 +1355,7 @@ int syncode; int min_depth = depth; /* Err out if depth gets less than this. */ struct syntax_cache *scache; + Charbpos last_good = from; if (depth > 0) min_depth = 0; @@ -1370,6 +1373,8 @@ c = BUF_FETCH_CHAR (buf, from); syncode = SYNTAX_CODE_FROM_CACHE (scache, c); code = SYNTAX_FROM_CODE (syncode); + if (depth == min_depth) + last_good = from; from++; /* a 1-char comment start sequence */ @@ -1483,8 +1488,9 @@ { if (noerror) return Qnil; - syntax_error ("Containing expression ends prematurely", - Qunbound); + signal_error_2 (Qscan_error, + "Containing expression ends prematurely", + make_int (last_good), make_int (from)); } break; @@ -1656,8 +1662,9 @@ { if (noerror) return Qnil; - syntax_error ("Containing expression ends prematurely", - Qunbound); + signal_error_2 (Qscan_error, + "Containing expression ends prematurely", + make_int (last_good), make_int (from)); } break; @@ -1727,7 +1734,8 @@ lose: if (!noerror) - syntax_error ("Unbalanced parentheses", Qunbound); + signal_error_2 (Qscan_error, "Unbalanced parentheses", + make_int (last_good), make_int (from)); return Qnil; } @@ -2418,6 +2426,8 @@ DEFSUBR (Fscan_sexps); DEFSUBR (Fbackward_prefix_chars); DEFSUBR (Fparse_partial_sexp); + + DEFERROR_STANDARD (Qscan_error, Qsyntax_error); } void