/[emacs]/emacs/src/syntax.c
ViewVC logotype

Diff of /emacs/src/syntax.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.152.4.5 by miles, Tue May 11 02:39:01 2004 UTC revision 1.152.4.6 by miles, Tue Jul 6 10:10:54 2004 UTC
# Line 292  char_quoted (charpos, bytepos) Line 292  char_quoted (charpos, bytepos)
292    
293    while (bytepos >= beg)    while (bytepos >= beg)
294      {      {
295          int c;
296    
297        UPDATE_SYNTAX_TABLE_BACKWARD (charpos);        UPDATE_SYNTAX_TABLE_BACKWARD (charpos);
298        code = SYNTAX (FETCH_CHAR (bytepos));        c = FETCH_CHAR (bytepos);
299          code = SYNTAX (c);
300        if (! (code == Scharquote || code == Sescape))        if (! (code == Scharquote || code == Sescape))
301          break;          break;
302    
# Line 380  find_defun_start (pos, pos_byte) Line 383  find_defun_start (pos, pos_byte)
383    gl_state.use_global = 0;    gl_state.use_global = 0;
384    while (PT > BEGV)    while (PT > BEGV)
385      {      {
386          int c;
387    
388        /* Open-paren at start of line means we may have found our        /* Open-paren at start of line means we may have found our
389           defun-start.  */           defun-start.  */
390        if (SYNTAX (FETCH_CHAR (PT_BYTE)) == Sopen)        c = FETCH_CHAR (PT_BYTE);
391          if (SYNTAX (c) == Sopen)
392          {          {
393            SETUP_SYNTAX_TABLE (PT + 1, -1);      /* Try again... */            SETUP_SYNTAX_TABLE (PT + 1, -1);      /* Try again... */
394            if (SYNTAX (FETCH_CHAR (PT_BYTE)) == Sopen)            c = FETCH_CHAR (PT_BYTE);
395              if (SYNTAX (c) == Sopen)
396              break;              break;
397            /* Now fallback to the default value.  */            /* Now fallback to the default value.  */
398            gl_state.current_syntax_table = current_buffer->syntax_table;            gl_state.current_syntax_table = current_buffer->syntax_table;
# Line 2124  scan_lists (from, count, depth, sexpflag Line 2131  scan_lists (from, count, depth, sexpflag
2131            INC_BOTH (from, from_byte);            INC_BOTH (from, from_byte);
2132            UPDATE_SYNTAX_TABLE_FORWARD (from);            UPDATE_SYNTAX_TABLE_FORWARD (from);
2133            if (from < stop && comstart_first            if (from < stop && comstart_first
2134                && SYNTAX_COMSTART_SECOND (FETCH_CHAR (from_byte))                && (c = FETCH_CHAR (from_byte), SYNTAX_COMSTART_SECOND (c))
2135                && parse_sexp_ignore_comments)                && parse_sexp_ignore_comments)
2136              {              {
2137                /* we have encountered a comment start sequence and we                /* we have encountered a comment start sequence and we
# Line 2449  scan_lists (from, count, depth, sexpflag Line 2456  scan_lists (from, count, depth, sexpflag
2456             Fcons (build_string ("Unbalanced parentheses"),             Fcons (build_string ("Unbalanced parentheses"),
2457                    Fcons (make_number (last_good),                    Fcons (make_number (last_good),
2458                           Fcons (make_number (from), Qnil))));                           Fcons (make_number (from), Qnil))));
2459      abort ();
2460    /* NOTREACHED */    /* NOTREACHED */
2461  }  }
2462    
# Line 2588  scan_sexps_forward (stateptr, from, from Line 2595  scan_sexps_forward (stateptr, from, from
2595  #define INC_FROM                                \  #define INC_FROM                                \
2596  do { prev_from = from;                          \  do { prev_from = from;                          \
2597       prev_from_byte = from_byte;                \       prev_from_byte = from_byte;                \
2598       prev_from_syntax                           \       temp = FETCH_CHAR (prev_from_byte);        \
2599         = SYNTAX_WITH_FLAGS (FETCH_CHAR (prev_from_byte)); \       prev_from_syntax = SYNTAX_WITH_FLAGS (temp); \
2600       INC_BOTH (from, from_byte);                \       INC_BOTH (from, from_byte);                \
2601       if (from < end)                            \       if (from < end)                            \
2602         UPDATE_SYNTAX_TABLE_FORWARD (from);      \         UPDATE_SYNTAX_TABLE_FORWARD (from);      \
# Line 2664  do { prev_from = from;                         \ Line 2671  do { prev_from = from;                         \
2671    curlevel->last = -1;    curlevel->last = -1;
2672    
2673    SETUP_SYNTAX_TABLE (prev_from, 1);    SETUP_SYNTAX_TABLE (prev_from, 1);
2674    prev_from_syntax = SYNTAX_WITH_FLAGS (FETCH_CHAR (prev_from_byte));    temp = FETCH_CHAR (prev_from_byte);
2675      prev_from_syntax = SYNTAX_WITH_FLAGS (temp);
2676    UPDATE_SYNTAX_TABLE_FORWARD (from);    UPDATE_SYNTAX_TABLE_FORWARD (from);
2677    
2678    /* Enter the loop at a place appropriate for initial state.  */    /* Enter the loop at a place appropriate for initial state.  */
# Line 2743  do { prev_from = from;                         \ Line 2751  do { prev_from = from;                         \
2751            while (from < end)            while (from < end)
2752              {              {
2753                /* Some compilers can't handle this inside the switch.  */                /* Some compilers can't handle this inside the switch.  */
2754                temp = SYNTAX (FETCH_CHAR (from_byte));                temp = FETCH_CHAR (from_byte);
2755                  temp = SYNTAX (temp);
2756                switch (temp)                switch (temp)
2757                  {                  {
2758                  case Scharquote:                  case Scharquote:

Legend:
Removed from v.1.152.4.5  
changed lines
  Added in v.1.152.4.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26