Mercurial > hg > xemacs-beta
changeset 4913:fc28cc192c91
Automated merge with http://hg.debian.org/hg/xemacs/xemacs
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Mon, 01 Feb 2010 23:14:46 -0600 |
parents | 7eec2a1f3412 (current diff) e99033b7e05c (diff) |
children | 1628e3b9601a |
files | src/ChangeLog |
diffstat | 2 files changed, 25 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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 <ben@xemacs.org> + + * 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 <kehoea@parhasard.net> * symbols.c (Fspecial_operator_p, syms_of_symbols):
--- 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