#define lisp_h_INTEGERP(x) (SCM_I_INUMP (x))
#define lisp_h_MARKERP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Marker)
#define lisp_h_MISCP(x) (SMOB_TYPEP (x, lisp_misc_tag))
-#define lisp_h_NILP(x) EQ (x, Qnil)
+#define lisp_h_NILP(x) (scm_is_lisp_false (x))
#define lisp_h_SET_SYMBOL_VAL(sym, v) \
(eassert ((sym)->redirect == SYMBOL_PLAINVAL), (sym)->val.value = (v))
#define lisp_h_SYMBOL_CONSTANT_P(sym) (XSYMBOL (sym)->constant)
#define lisp_h_SYMBOL_VAL(sym) \
(eassert ((sym)->redirect == SYMBOL_PLAINVAL), (sym)->val.value)
-#define lisp_h_SYMBOLP(x) (x && scm_is_symbol (x))
+#define lisp_h_SYMBOLP(x) \
+ (x && (scm_is_symbol (x) || EQ (x, Qnil) || EQ (x, Qt)))
#define lisp_h_VECTORLIKEP(x) (SMOB_TYPEP (x, lisp_vectorlike_tag))
#define lisp_h_XCAR(c) (scm_car (c))
#define lisp_h_XCDR(c) (scm_cdr (c))
extern Lisp_Object symbol_module;
extern Lisp_Object function_module;
extern Lisp_Object plist_module;
+extern Lisp_Object Qt, Qnil, Qt_, Qnil_;
INLINE struct Lisp_Symbol *
XSYMBOL (Lisp_Object a)
{
Lisp_Object tem;
+ if (EQ (a, Qt)) a = Qt_;
+ if (EQ (a, Qnil)) a = Qnil_;
eassert (SYMBOLP (a));
tem = scm_variable_ref (scm_module_lookup (symbol_module, a));
return scm_to_pointer (tem);
INLINE Lisp_Object
SYMBOL_NAME (Lisp_Object sym)
{
+ if (EQ (sym, Qnil)) sym = Qnil_;
+ if (EQ (sym, Qt)) sym = Qt_;
return build_string (scm_to_locale_string (scm_symbol_to_string (sym)));
}
INLINE bool
SYMBOL_INTERNED_P (Lisp_Object sym)
{
+ if (EQ (sym, Qnil)) sym = Qnil_;
+ if (EQ (sym, Qt)) sym = Qt_;
return scm_is_true (scm_symbol_interned_p (sym));
}
INLINE Lisp_Object
SYMBOL_FUNCTION (Lisp_Object sym)
{
+ if (EQ (sym, Qnil)) sym = Qnil_;
+ if (EQ (sym, Qt)) sym = Qt_;
return scm_variable_ref (scm_module_lookup (function_module, sym));
}
INLINE void
set_symbol_function (Lisp_Object sym, Lisp_Object function)
{
+ if (EQ (sym, Qnil)) sym = Qnil_;
+ if (EQ (sym, Qt)) sym = Qt_;
scm_variable_set_x (scm_module_lookup (function_module, sym), function);
}
INLINE Lisp_Object
symbol_plist (Lisp_Object sym)
{
+ if (EQ (sym, Qnil)) sym = Qnil_;
+ if (EQ (sym, Qt)) sym = Qt_;
return scm_variable_ref (scm_module_lookup (plist_module, sym));
}
INLINE void
set_symbol_plist (Lisp_Object sym, Lisp_Object plist)
{
+ if (EQ (sym, Qnil)) sym = Qnil_;
+ if (EQ (sym, Qt)) sym = Qt_;
scm_variable_set_x (scm_module_lookup (plist_module, sym), plist);
}
}
/* Defined in data.c. */
+extern Lisp_Object Qnil_, Qt_;
extern Lisp_Object Qquote, Qunbound;
extern Lisp_Object Qerror_conditions, Qerror_message, Qtop_level;
extern Lisp_Object Qerror, Qquit, Qargs_out_of_range;