comparison src/syntax.c @ 13513:907544cb2c7d

(check_syntax_table): Check the purpose slot. Use Qsyntax_table_p for the error message. (Fmodify_syntax_entry): Don't fail to init MATCH.
author Richard M. Stallman <rms@gnu.org>
date Sat, 11 Nov 1995 20:28:26 +0000
parents d2fc560c7740
children 1709d9f11c66
comparison
equal deleted inserted replaced
13512:738750464578 13513:907544cb2c7d
124 124
125 static void 125 static void
126 check_syntax_table (obj) 126 check_syntax_table (obj)
127 Lisp_Object obj; 127 Lisp_Object obj;
128 { 128 {
129 CHECK_CHAR_TABLE (obj, 0); 129 if (!(CHAR_TABLE_P (obj)
130 && XCHAR_TABLE (obj)->purpose == Qsyntax_table))
131 wrong_type_argument (Qsyntax_table_p, obj);
130 } 132 }
131
132 133
133 DEFUN ("syntax-table", Fsyntax_table, Ssyntax_table, 0, 0, 0, 134 DEFUN ("syntax-table", Fsyntax_table, Ssyntax_table, 0, 0, 0,
134 "Return the current syntax table.\n\ 135 "Return the current syntax table.\n\
135 This is the one specified by the current buffer.") 136 This is the one specified by the current buffer.")
136 () 137 ()
336 SET_RAW_SYNTAX_ENTRY (syntax_table, c, Qnil); 337 SET_RAW_SYNTAX_ENTRY (syntax_table, c, Qnil);
337 return Qnil; 338 return Qnil;
338 } 339 }
339 340
340 if (*p) 341 if (*p)
341 XSETINT (match, *p++); 342 {
342 if (XFASTINT (match) == ' ') 343 XSETINT (match, *p++);
344 if (XFASTINT (match) == ' ')
345 match = Qnil;
346 }
347 else
343 match = Qnil; 348 match = Qnil;
344 349
345 val = (int) code; 350 val = (int) code;
346 while (*p) 351 while (*p)
347 switch (*p++) 352 switch (*p++)