comparison src/syntax.c @ 71988:8d894204c732

(scan_lists): Use xsignal3.
author Kim F. Storm <storm@cua.dk>
date Tue, 18 Jul 2006 13:29:00 +0000
parents c8c21ddb276e
children d4ecc69b8d2e 8a8e69664178
comparison
equal deleted inserted replaced
71987:6dd00de34fff 71988:8d894204c732
2345 2345
2346 case Sclose: 2346 case Sclose:
2347 close1: 2347 close1:
2348 if (!--depth) goto done; 2348 if (!--depth) goto done;
2349 if (depth < min_depth) 2349 if (depth < min_depth)
2350 Fsignal (Qscan_error, 2350 xsignal3 (Qscan_error,
2351 Fcons (build_string ("Containing expression ends prematurely"), 2351 build_string ("Containing expression ends prematurely"),
2352 Fcons (make_number (last_good), 2352 make_number (last_good), make_number (from));
2353 Fcons (make_number (from), Qnil))));
2354 break; 2353 break;
2355 2354
2356 case Sstring: 2355 case Sstring:
2357 case Sstring_fence: 2356 case Sstring_fence:
2358 temp_pos = dec_bytepos (from_byte); 2357 temp_pos = dec_bytepos (from_byte);
2497 2496
2498 case Sopen: 2497 case Sopen:
2499 open2: 2498 open2:
2500 if (!--depth) goto done2; 2499 if (!--depth) goto done2;
2501 if (depth < min_depth) 2500 if (depth < min_depth)
2502 Fsignal (Qscan_error, 2501 xsignal3 (Qscan_error,
2503 Fcons (build_string ("Containing expression ends prematurely"), 2502 build_string ("Containing expression ends prematurely"),
2504 Fcons (make_number (last_good), 2503 make_number (last_good), make_number (from));
2505 Fcons (make_number (from), Qnil))));
2506 break; 2504 break;
2507 2505
2508 case Sendcomment: 2506 case Sendcomment:
2509 if (!parse_sexp_ignore_comments) 2507 if (!parse_sexp_ignore_comments)
2510 break; 2508 break;
2569 immediate_quit = 0; 2567 immediate_quit = 0;
2570 XSETFASTINT (val, from); 2568 XSETFASTINT (val, from);
2571 return val; 2569 return val;
2572 2570
2573 lose: 2571 lose:
2574 Fsignal (Qscan_error, 2572 xsignal3 (Qscan_error,
2575 Fcons (build_string ("Unbalanced parentheses"), 2573 build_string ("Unbalanced parentheses"),
2576 Fcons (make_number (last_good), 2574 make_number (last_good), make_number (from));
2577 Fcons (make_number (from), Qnil))));
2578 abort ();
2579 /* NOTREACHED */
2580 } 2575 }
2581 2576
2582 DEFUN ("scan-lists", Fscan_lists, Sscan_lists, 3, 3, 0, 2577 DEFUN ("scan-lists", Fscan_lists, Sscan_lists, 3, 3, 0,
2583 doc: /* Scan from character number FROM by COUNT lists. 2578 doc: /* Scan from character number FROM by COUNT lists.
2584 Returns the character number of the position thus found. 2579 Returns the character number of the position thus found.