/* GNU Emacs routines to deal with case tables.
- Copyright (C) 1987 Free Software Foundation, Inc.
+ Copyright (C) 1993 Free Software Foundation, Inc.
This file is part of GNU Emacs.
/* Written by Howard Gayle. See chartab.c for details. */
-#include "config.h"
+#include <config.h>
#include "lisp.h"
#include "buffer.h"
(XTYPE (obj) == Lisp_String && XSTRING (obj)->size == 256)
return (STRING256_P (down)
- && (NULL (up) || STRING256_P (up))
- && ((NULL (canon) && NULL (eqv))
+ && (NILP (up) || STRING256_P (up))
+ && ((NILP (canon) && NILP (eqv))
|| (STRING256_P (canon) && STRING256_P (eqv)))
? Qt : Qnil);
}
{
register Lisp_Object tem;
- while (tem = Fcase_table_p (obj), NULL (tem))
- obj = wrong_type_argument (Qcase_table_p, obj, 0);
+ while (tem = Fcase_table_p (obj), NILP (tem))
+ obj = wrong_type_argument (Qcase_table_p, obj);
return (obj);
}
return Fcons (down, Fcons (up, Fcons (canon, Fcons (eqv, Qnil))));
}
-DEFUN ("standard-case-table", Fstandard_case_table,
- Sstandard_case_table, 0, 0, 0,
+DEFUN ("standard-case-table", Fstandard_case_table, Sstandard_case_table, 0, 0, 0,
"Return the standard case table.\n\
This is the one used for new buffers.")
()
Fcons (Vascii_eqv_table, Qnil))));
}
+static Lisp_Object set_case_table ();
+
DEFUN ("set-case-table", Fset_case_table, Sset_case_table, 1, 1, 0,
"Select a new case table for the current buffer.\n\
A case table is a list (DOWNCASE UPCASE CANONICALIZE EQUIVALENCES)\n\
(table)
Lisp_Object table;
{
- set_case_table (table, 0);
+ return set_case_table (table, 0);
}
-DEFUN ("set-standard-case-table",
- Fset_standard_case_table, Sset_standard_case_table, 1, 1, 0,
+DEFUN ("set-standard-case-table", Fset_standard_case_table, Sset_standard_case_table, 1, 1, 0,
"Select a new standard case table for new buffers.\n\
See `set-case-table' for more info on case tables.")
(table)
Lisp_Object table;
{
- set_case_table (table, 1);
+ return set_case_table (table, 1);
}
+static Lisp_Object
set_case_table (table, standard)
Lisp_Object table;
int standard;
canon = Fcar_safe (Fcdr_safe (Fcdr_safe (table)));
eqv = Fcar_safe (Fcdr_safe (Fcdr_safe (Fcdr_safe (table))));
- if (NULL (up))
+ if (NILP (up))
{
up = Fmake_string (make_number (256), make_number (0));
compute_trt_inverse (XSTRING (down)->data, XSTRING (up)->data);
}
- if (NULL (canon))
+ if (NILP (canon))
{
register int i;
unsigned char *upvec = XSTRING (up)->data;