[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/syntax.c [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/src/syntax.c [lexbind] |
Date: |
Tue, 06 Jul 2004 07:06:07 -0400 |
Index: emacs/src/syntax.c
diff -c emacs/src/syntax.c:1.152.4.5 emacs/src/syntax.c:1.152.4.6
*** emacs/src/syntax.c:1.152.4.5 Tue May 11 02:39:01 2004
--- emacs/src/syntax.c Tue Jul 6 10:10:54 2004
***************
*** 292,299 ****
while (bytepos >= beg)
{
UPDATE_SYNTAX_TABLE_BACKWARD (charpos);
! code = SYNTAX (FETCH_CHAR (bytepos));
if (! (code == Scharquote || code == Sescape))
break;
--- 292,302 ----
while (bytepos >= beg)
{
+ int c;
+
UPDATE_SYNTAX_TABLE_BACKWARD (charpos);
! c = FETCH_CHAR (bytepos);
! code = SYNTAX (c);
if (! (code == Scharquote || code == Sescape))
break;
***************
*** 380,391 ****
gl_state.use_global = 0;
while (PT > BEGV)
{
/* Open-paren at start of line means we may have found our
defun-start. */
! if (SYNTAX (FETCH_CHAR (PT_BYTE)) == Sopen)
{
SETUP_SYNTAX_TABLE (PT + 1, -1); /* Try again... */
! if (SYNTAX (FETCH_CHAR (PT_BYTE)) == Sopen)
break;
/* Now fallback to the default value. */
gl_state.current_syntax_table = current_buffer->syntax_table;
--- 383,398 ----
gl_state.use_global = 0;
while (PT > BEGV)
{
+ int c;
+
/* Open-paren at start of line means we may have found our
defun-start. */
! c = FETCH_CHAR (PT_BYTE);
! if (SYNTAX (c) == Sopen)
{
SETUP_SYNTAX_TABLE (PT + 1, -1); /* Try again... */
! c = FETCH_CHAR (PT_BYTE);
! if (SYNTAX (c) == Sopen)
break;
/* Now fallback to the default value. */
gl_state.current_syntax_table = current_buffer->syntax_table;
***************
*** 2124,2130 ****
INC_BOTH (from, from_byte);
UPDATE_SYNTAX_TABLE_FORWARD (from);
if (from < stop && comstart_first
! && SYNTAX_COMSTART_SECOND (FETCH_CHAR (from_byte))
&& parse_sexp_ignore_comments)
{
/* we have encountered a comment start sequence and we
--- 2131,2137 ----
INC_BOTH (from, from_byte);
UPDATE_SYNTAX_TABLE_FORWARD (from);
if (from < stop && comstart_first
! && (c = FETCH_CHAR (from_byte), SYNTAX_COMSTART_SECOND (c))
&& parse_sexp_ignore_comments)
{
/* we have encountered a comment start sequence and we
***************
*** 2449,2455 ****
Fcons (build_string ("Unbalanced parentheses"),
Fcons (make_number (last_good),
Fcons (make_number (from), Qnil))));
!
/* NOTREACHED */
}
--- 2456,2462 ----
Fcons (build_string ("Unbalanced parentheses"),
Fcons (make_number (last_good),
Fcons (make_number (from), Qnil))));
! abort ();
/* NOTREACHED */
}
***************
*** 2588,2595 ****
#define INC_FROM \
do { prev_from = from; \
prev_from_byte = from_byte; \
! prev_from_syntax \
! = SYNTAX_WITH_FLAGS (FETCH_CHAR (prev_from_byte)); \
INC_BOTH (from, from_byte); \
if (from < end) \
UPDATE_SYNTAX_TABLE_FORWARD (from); \
--- 2595,2602 ----
#define INC_FROM \
do { prev_from = from; \
prev_from_byte = from_byte; \
! temp = FETCH_CHAR (prev_from_byte); \
! prev_from_syntax = SYNTAX_WITH_FLAGS (temp); \
INC_BOTH (from, from_byte); \
if (from < end) \
UPDATE_SYNTAX_TABLE_FORWARD (from); \
***************
*** 2664,2670 ****
curlevel->last = -1;
SETUP_SYNTAX_TABLE (prev_from, 1);
! prev_from_syntax = SYNTAX_WITH_FLAGS (FETCH_CHAR (prev_from_byte));
UPDATE_SYNTAX_TABLE_FORWARD (from);
/* Enter the loop at a place appropriate for initial state. */
--- 2671,2678 ----
curlevel->last = -1;
SETUP_SYNTAX_TABLE (prev_from, 1);
! temp = FETCH_CHAR (prev_from_byte);
! prev_from_syntax = SYNTAX_WITH_FLAGS (temp);
UPDATE_SYNTAX_TABLE_FORWARD (from);
/* Enter the loop at a place appropriate for initial state. */
***************
*** 2743,2749 ****
while (from < end)
{
/* Some compilers can't handle this inside the switch. */
! temp = SYNTAX (FETCH_CHAR (from_byte));
switch (temp)
{
case Scharquote:
--- 2751,2758 ----
while (from < end)
{
/* Some compilers can't handle this inside the switch. */
! temp = FETCH_CHAR (from_byte);
! temp = SYNTAX (temp);
switch (temp)
{
case Scharquote: