Mercurial > emacs
diff 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 |
line wrap: on
line diff
--- a/src/syntax.c Sat Nov 11 20:27:37 1995 +0000 +++ b/src/syntax.c Sat Nov 11 20:28:26 1995 +0000 @@ -126,10 +126,11 @@ check_syntax_table (obj) Lisp_Object obj; { - CHECK_CHAR_TABLE (obj, 0); + if (!(CHAR_TABLE_P (obj) + && XCHAR_TABLE (obj)->purpose == Qsyntax_table)) + wrong_type_argument (Qsyntax_table_p, obj); } - DEFUN ("syntax-table", Fsyntax_table, Ssyntax_table, 0, 0, 0, "Return the current syntax table.\n\ This is the one specified by the current buffer.") @@ -338,8 +339,12 @@ } if (*p) - XSETINT (match, *p++); - if (XFASTINT (match) == ' ') + { + XSETINT (match, *p++); + if (XFASTINT (match) == ' ') + match = Qnil; + } + else match = Qnil; val = (int) code;
