/* Random utility Lisp functions.
Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GNU Emacs.
Lisp_Object list;
{
register Lisp_Object tail;
- for (tail = list; !NILP (tail); tail = XCDR (tail))
+ for (tail = list; CONSP (tail); tail = XCDR (tail))
{
register Lisp_Object tem;
CHECK_LIST_CONS (tail, list);
if (!FLOATP (elt))
return Fmemq (elt, list);
- for (tail = list; !NILP (tail); tail = XCDR (tail))
+ for (tail = list; CONSP (tail); tail = XCDR (tail))
{
register Lisp_Object tem;
CHECK_LIST_CONS (tail, list);
{
Lisp_Object tail, prev;
- for (tail = seq, prev = Qnil; !NILP (tail); tail = XCDR (tail))
+ for (tail = seq, prev = Qnil; CONSP (tail); tail = XCDR (tail))
{
CHECK_LIST_CONS (tail, seq);
{
CHECK_CHAR_TABLE (parent);
- for (temp = parent; !NILP (temp); temp = XCHAR_TABLE (temp)->parent)
+ for (temp = parent; CHAR_TABLE_P (temp);
+ temp = XCHAR_TABLE (temp)->parent)
if (EQ (temp, char_table))
error ("Attempt to make a chartable be its own parent");
}
DEFUN ("clrhash", Fclrhash, Sclrhash, 1, 1, 0,
- doc: /* Clear hash table TABLE. */)
+ doc: /* Clear hash table TABLE and return it. */)
(table)
Lisp_Object table;
{
hash_clear (check_hash_table (table));
- return Qnil;
+ /* Be compatible with XEmacs. */
+ return table;
}
if (STRING_MULTIBYTE (object))
/* use default, we can't guess correct value */
- coding_system = SYMBOL_VALUE (XCAR (Vcoding_category_list));
+ coding_system = find_symbol_value (XCAR (Vcoding_category_list));
else
coding_system = Qraw_text;
}
DEFVAR_BOOL ("use-file-dialog", &use_file_dialog,
doc: /* *Non-nil means mouse commands use a file dialog to ask for files.
-This applies to commands from menus and tool bar buttons. The value of
-`use-dialog-box' takes precedence over this variable, so a file dialog is only
-used if both `use-dialog-box' and this variable are non-nil. */);
+This applies to commands from menus and tool bar buttons even when
+they are initiated from the keyboard. The value of `use-dialog-box'
+takes precedence over this variable, so a file dialog is only used if
+both `use-dialog-box' and this variable are non-nil. */);
use_file_dialog = 1;
defsubr (&Sidentity);