aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorRichard M. Stallman1995-11-11 20:28:26 +0000
committerRichard M. Stallman1995-11-11 20:28:26 +0000
commitd1be9f0f0df6bcefbfa9c874995c067c2f0100c4 (patch)
tree196c0600dec2134f72bb0d6ca43005af529aa311 /src/syntax.c
parenta084ed10a862b83fcbc3c1382a48fa70f087124a (diff)
downloademacs-d1be9f0f0df6bcefbfa9c874995c067c2f0100c4.tar.gz
emacs-d1be9f0f0df6bcefbfa9c874995c067c2f0100c4.zip
(check_syntax_table): Check the purpose slot.
Use Qsyntax_table_p for the error message. (Fmodify_syntax_entry): Don't fail to init MATCH.
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;