mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-22 21:07:36 +00:00
(check_syntax_table): Check the purpose slot.
Use Qsyntax_table_p for the error message. (Fmodify_syntax_entry): Don't fail to init MATCH.
This commit is contained in:
parent
a084ed10a8
commit
d1be9f0f0d
1 changed files with 9 additions and 4 deletions
13
src/syntax.c
13
src/syntax.c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue