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

Diff of /emacs/src/syntax.h

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

revision 1.39 by lektu, Tue Feb 4 14:03:13 2003 UTC revision 1.39.6.1 by handa, Mon Sep 8 12:48:12 2003 UTC
# Line 57  enum syntaxcode Line 57  enum syntaxcode
57    
58  /* Set the syntax entry VAL for char C in table TABLE.  */  /* Set the syntax entry VAL for char C in table TABLE.  */
59    
60  #define SET_RAW_SYNTAX_ENTRY(table, c, val)                             \  #define SET_RAW_SYNTAX_ENTRY(table, c, val)     \
61    ((c) < CHAR_TABLE_SINGLE_BYTE_SLOTS                                   \    CHAR_TABLE_SET ((table), c, (val))
    ? (XCHAR_TABLE (table)->contents[(unsigned char) (c)] = (val))       \  
    : Faset ((table), make_number (c), (val)))  
   
 /* Fetch the syntax entry for char C in syntax table TABLE.  
    This macro is called only when C is less than CHAR_TABLE_ORDINARY_SLOTS.  
    Do inheritance.  */  
62    
63  #ifdef __GNUC__  /* Set the syntax entry VAL for char-range RANGE in table TABLE.
64  #define SYNTAX_ENTRY_FOLLOW_PARENT(table, c)                    \     RANGE is a cons (FROM . TO) specifying the range of characters.  */
   ({ Lisp_Object tbl = table;                                   \  
      Lisp_Object temp = XCHAR_TABLE (tbl)->contents[(c)];       \  
      while (NILP (temp))                                        \  
        {                                                        \  
          tbl = XCHAR_TABLE (tbl)->parent;                       \  
          if (NILP (tbl))                                        \  
            break;                                               \  
          temp = XCHAR_TABLE (tbl)->contents[(c)];               \  
        }                                                        \  
      temp; })  
 #else  
 extern Lisp_Object syntax_temp;  
 extern Lisp_Object syntax_parent_lookup P_ ((Lisp_Object, int));  
65    
66  #define SYNTAX_ENTRY_FOLLOW_PARENT(table, c)            \  #define SET_RAW_SYNTAX_ENTRY_RANGE(table, range, val)   \
67    (syntax_temp = XCHAR_TABLE (table)->contents[(c)],    \    Fset_char_table_range ((table), (range), (val))
    (NILP (syntax_temp)                                  \  
     ? syntax_parent_lookup (table, (c))                 \  
     : syntax_temp))  
 #endif  
68    
69  /* SYNTAX_ENTRY fetches the information from the entry for character C  /* SYNTAX_ENTRY fetches the information from the entry for character C
70     in syntax table TABLE, or from globally kept data (gl_state).     in syntax table TABLE, or from globally kept data (gl_state).
# Line 105  extern Lisp_Object syntax_parent_lookup Line 82  extern Lisp_Object syntax_parent_lookup
82  #  define CURRENT_SYNTAX_TABLE current_buffer->syntax_table  #  define CURRENT_SYNTAX_TABLE current_buffer->syntax_table
83  #endif  #endif
84    
85  #define SYNTAX_ENTRY_INT(c)                             \  #define SYNTAX_ENTRY_INT(c) CHAR_TABLE_REF (CURRENT_SYNTAX_TABLE, (c))
   ((c) < CHAR_TABLE_SINGLE_BYTE_SLOTS                   \  
    ? SYNTAX_ENTRY_FOLLOW_PARENT (CURRENT_SYNTAX_TABLE,  \  
                                  (unsigned char) (c))   \  
    : Faref (CURRENT_SYNTAX_TABLE,                       \  
             make_number (c)))  
86    
87  /* Extract the information from the entry for character C  /* Extract the information from the entry for character C
88     in the current syntax table.  */     in the current syntax table.  */
# Line 137  extern Lisp_Object syntax_parent_lookup Line 109  extern Lisp_Object syntax_parent_lookup
109        ? XCDR (temp)                                             \        ? XCDR (temp)                                             \
110        : Qnil); })        : Qnil); })
111  #else  #else
112    extern Lisp_Object syntax_temp;
113  #define SYNTAX(c)                                                       \  #define SYNTAX(c)                                                       \
114    (syntax_temp = SYNTAX_ENTRY ((c)),                                    \    (syntax_temp = SYNTAX_ENTRY ((c)),                                    \
115     (CONSP (syntax_temp)                                                 \     (CONSP (syntax_temp)                                                 \

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.39.6.1

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