aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 1a74345ca0d..6a75c16ac48 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -126,10 +126,11 @@ static void
126check_syntax_table (obj) 126check_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 133
132
133DEFUN ("syntax-table", Fsyntax_table, Ssyntax_table, 0, 0, 0, 134DEFUN ("syntax-table", Fsyntax_table, Ssyntax_table, 0, 0, 0,
134 "Return the current syntax table.\n\ 135 "Return the current syntax table.\n\
135This is the one specified by the current buffer.") 136This is the one specified by the current buffer.")
@@ -338,8 +339,12 @@ DEFUN ("modify-syntax-entry", Fmodify_syntax_entry, Smodify_syntax_entry, 2, 3,
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;