]> code.delx.au - gnu-emacs/blobdiff - src/syntax.c
(add_properties, remove_properties, set_properties):
[gnu-emacs] / src / syntax.c
index 1a74345ca0dfe0c8eada8207f2d5071f455b4dce..6a75c16ac48de5dae647d92589ae5b06b21b4bff 100644 (file)
@@ -126,10 +126,11 @@ static void
 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 @@ DEFUN ("modify-syntax-entry", Fmodify_syntax_entry, Smodify_syntax_entry, 2, 3,
     }
 
   if (*p)
-    XSETINT (match, *p++);
-  if (XFASTINT (match) == ' ')
+    {
+      XSETINT (match, *p++);
+      if (XFASTINT (match) == ' ')
+       match = Qnil;
+    }
+  else
     match = Qnil;
 
   val = (int) code;