Commit 265a9e55 authored by Jim Blandy's avatar Jim Blandy

*** empty log message ***

parent d427b66a
......@@ -329,7 +329,7 @@ Any number of arguments, even zero arguments, are allowed.")
XFASTINT (len) = nargs;
val = Fmake_list (len, Qnil);
val_tail = val;
while (!NULL (val_tail))
while (!NILP (val_tail))
{
XCONS (val_tail)->car = *args++;
val_tail = XCONS (val_tail)->cdr;
......@@ -425,14 +425,14 @@ significance.")
register struct Lisp_Vector *p;
XFASTINT (len) = nargs;
if (!NULL (Vpurify_flag))
if (!NILP (Vpurify_flag))
val = make_pure_vector (len);
else
val = Fmake_vector (len, Qnil);
p = XVECTOR (val);
for (index = 0; index < nargs; index++)
{
if (!NULL (Vpurify_flag))
if (!NILP (Vpurify_flag))
args[index] = Fpurecopy (args[index]);
p->contents[index] = args[index];
}
......@@ -905,7 +905,7 @@ Does not copy symbols.")
register Lisp_Object new, tem;
register int i;
if (NULL (Vpurify_flag))
if (NILP (Vpurify_flag))
return obj;
if ((PNTR_COMPARISON_TYPE) XPNTR (obj) < (PNTR_COMPARISON_TYPE) ((char *) pure + PURESIZE)
......@@ -1041,7 +1041,7 @@ Garbage collection happens automatically if you cons more than\n\
/* Save a copy of the contents of the stack, for debugging. */
#if MAX_SAVE_STACK > 0
if (NULL (Vpurify_flag))
if (NILP (Vpurify_flag))
{
i = &stack_top_variable - stack_bottom;
if (i < 0) i = -i;
......
......@@ -25,9 +25,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define MAXPATHLEN 1024
#endif /* not MAXPATHLEN */
#ifdef NULL
#undef NULL
#endif
#include "config.h"
#include "lisp.h"
#include "window.h"
......@@ -163,7 +160,7 @@ If there is no such live buffer, return nil.")
if (XTYPE (buf) != Lisp_Buffer) continue;
if (XTYPE (XBUFFER (buf)->filename) != Lisp_String) continue;
tem = Fstring_equal (XBUFFER (buf)->filename, filename);
if (!NULL (tem))
if (!NILP (tem))
return buf;
}
return Qnil;
......@@ -185,7 +182,7 @@ The value is never nil.")
register struct buffer *b;
buf = Fget_buffer (name);
if (!NULL (buf))
if (!NILP (buf))
return buf;
b = (struct buffer *) malloc (sizeof (struct buffer));
......@@ -227,14 +224,14 @@ The value is never nil.")
b->name = name;
function = buffer_defaults.major_mode;
if (NULL (function))
if (NILP (function))
{
tem = Fget (current_buffer->major_mode, Qmode_class);
if (EQ (tem, Qnil))
function = current_buffer->major_mode;
}
if (NULL (function) || EQ (function, Qfundamental_mode))
if (NILP (function) || EQ (function, Qfundamental_mode))
return buf;
/* To select a nonfundamental mode,
......@@ -327,7 +324,7 @@ until an unused name is found, and then return that name.")
CHECK_STRING (name, 0);
tem = Fget_buffer (name);
if (NULL (tem))
if (NILP (tem))
return name;
count = 1;
......@@ -336,7 +333,7 @@ until an unused name is found, and then return that name.")
sprintf (number, "<%d>", ++count);
gentemp = concat2 (name, build_string (number));
tem = Fget_buffer (gentemp);
if (NULL (tem))
if (NILP (tem))
return gentemp;
}
}
......@@ -348,7 +345,7 @@ With no argument or nil as argument, return the name of the current buffer.")
(buffer)
register Lisp_Object buffer;
{
if (NULL (buffer))
if (NILP (buffer))
return current_buffer->name;
CHECK_BUFFER (buffer, 0);
return XBUFFER (buffer)->name;
......@@ -360,7 +357,7 @@ No argument or nil as argument means use the current buffer.")
(buffer)
register Lisp_Object buffer;
{
if (NULL (buffer))
if (NILP (buffer))
return current_buffer->filename;
CHECK_BUFFER (buffer, 0);
return XBUFFER (buffer)->filename;
......@@ -378,7 +375,7 @@ No argument or nil as argument means use current buffer as BUFFER.")
register struct buffer *buf;
register Lisp_Object val;
if (NULL (buffer))
if (NILP (buffer))
buf = current_buffer;
else
{
......@@ -433,7 +430,7 @@ No argument or nil as argument means use current buffer as BUFFER.")
register Lisp_Object buffer;
{
register struct buffer *buf;
if (NULL (buffer))
if (NILP (buffer))
buf = current_buffer;
else
{
......@@ -459,17 +456,17 @@ A non-nil FLAG means mark the buffer modified.")
If buffer becoming unmodified, unlock the file. */
fn = current_buffer->filename;
if (!NULL (fn))
if (!NILP (fn))
{
already = current_buffer->save_modified < MODIFF;
if (!already && !NULL (flag))
if (!already && !NILP (flag))
lock_file (fn);
else if (already && NULL (flag))
else if (already && NILP (flag))
unlock_file (fn);
}
#endif /* CLASH_DETECTION */
current_buffer->save_modified = NULL (flag) ? MODIFF : 0;
current_buffer->save_modified = NILP (flag) ? MODIFF : 0;
update_mode_lines++;
return flag;
}
......@@ -484,7 +481,7 @@ No argument or nil as argument means use current buffer as BUFFER.")
register Lisp_Object buffer;
{
register struct buffer *buf;
if (NULL (buffer))
if (NILP (buffer))
buf = current_buffer;
else
{
......@@ -513,9 +510,9 @@ This does not change the name of the visited file (if any).")
tem = Fget_buffer (name);
if (XBUFFER (tem) == current_buffer)
return current_buffer->name;
if (!NULL (tem))
if (!NILP (tem))
{
if (!NULL (distinguish))
if (!NILP (distinguish))
name = Fgenerate_new_buffer_name (name);
else
error ("Buffer name \"%s\" is in use", XSTRING (name)->data);
......@@ -524,7 +521,7 @@ This does not change the name of the visited file (if any).")
current_buffer->name = name;
XSET (buf, Lisp_Buffer, current_buffer);
Fsetcar (Frassq (buf, Vbuffer_alist), name);
if (NULL (current_buffer->filename) && !NULL (current_buffer->auto_save_file_name))
if (NILP (current_buffer->filename) && !NILP (current_buffer->auto_save_file_name))
call0 (intern ("rename-auto-save-file"));
return name;
}
......@@ -540,7 +537,7 @@ If BUFFER is omitted or nil, some interesting buffer is returned.")
register Lisp_Object tail, buf, notsogood, tem;
notsogood = Qnil;
for (tail = Vbuffer_alist; !NULL (tail); tail = Fcdr (tail))
for (tail = Vbuffer_alist; !NILP (tail); tail = Fcdr (tail))
{
buf = Fcdr (Fcar (tail));
if (EQ (buf, buffer))
......@@ -548,12 +545,12 @@ If BUFFER is omitted or nil, some interesting buffer is returned.")
if (XSTRING (XBUFFER (buf)->name)->data[0] == ' ')
continue;
tem = Fget_buffer_window (buf, Qnil);
if (NULL (tem))
if (NILP (tem))
return buf;
if (NULL (notsogood))
if (NILP (notsogood))
notsogood = buf;
}
if (!NULL (notsogood))
if (!NILP (notsogood))
return notsogood;
return Fget_buffer_create (build_string ("*scratch*"));
}
......@@ -579,12 +576,12 @@ No argument or nil as argument means do this for the current buffer.")
register struct buffer *b;
register Lisp_Object buf1;
if (NULL (buf))
if (NILP (buf))
b = current_buffer;
else
{
buf1 = Fget_buffer (buf);
if (NULL (buf1)) nsberror (buf);
if (NILP (buf1)) nsberror (buf);
b = XBUFFER (buf1);
}
......@@ -620,24 +617,24 @@ with `delete-process'.")
register struct Lisp_Marker *m;
struct gcpro gcpro1, gcpro2;
if (NULL (bufname))
if (NILP (bufname))
buf = Fcurrent_buffer ();
else
buf = Fget_buffer (bufname);
if (NULL (buf))
if (NILP (buf))
nsberror (bufname);
b = XBUFFER (buf);
/* Query if the buffer is still modified. */
if (INTERACTIVE && !NULL (b->filename)
if (INTERACTIVE && !NILP (b->filename)
&& BUF_MODIFF (b) > b->save_modified)
{
GCPRO2 (buf, bufname);
tem = do_yes_or_no_p (format1 ("Buffer %s modified; kill anyway? ",
XSTRING (b->name)->data));
UNGCPRO;
if (NULL (tem))
if (NILP (tem))
return Qnil;
}
......@@ -660,7 +657,7 @@ with `delete-process'.")
if (EQ (buf, XWINDOW (minibuf_window)->buffer))
return Qnil;
if (NULL (b->name))
if (NILP (b->name))
return Qnil;
/* Make this buffer not be current.
......@@ -696,7 +693,7 @@ with `delete-process'.")
{
Lisp_Object tem;
tem = Fsymbol_value (intern ("delete-auto-save-files"));
if (! NULL (tem))
if (! NILP (tem))
unlink (XSTRING (b->auto_save_file_name)->data);
}
......@@ -739,7 +736,7 @@ record_buffer (buf)
/* Effectively do Vbuffer_alist = Fdelq (link, Vbuffer_alist)
but cannot use Fdelq here it that allows quitting. */
if (NULL (prev))
if (NILP (prev))
Vbuffer_alist = XCONS (Vbuffer_alist)->cdr;
else
XCONS (prev)->cdr = XCONS (XCONS (prev)->cdr)->cdr;
......@@ -766,15 +763,15 @@ the window-buffer correspondences.")
if (EQ (minibuf_window, selected_window))
error ("Cannot switch buffers in minibuffer window");
tem = Fwindow_dedicated_p (selected_window);
if (!NULL (tem))
if (!NILP (tem))
error ("Cannot switch buffers in a dedicated window");
if (NULL (bufname))
if (NILP (bufname))
buf = Fother_buffer (Fcurrent_buffer ());
else
buf = Fget_buffer_create (bufname);
Fset_buffer (buf);
if (NULL (norecord))
if (NILP (norecord))
record_buffer (buf);
Fset_window_buffer (EQ (selected_window, minibuf_window)
......@@ -794,7 +791,7 @@ window even if BUFFER is already visible in the selected window.")
Lisp_Object bufname, other;
{
register Lisp_Object buf;
if (NULL (bufname))
if (NILP (bufname))
buf = Fother_buffer (Fcurrent_buffer ());
else
buf = Fget_buffer_create (bufname);
......@@ -834,7 +831,7 @@ set_buffer_internal (b)
/* Look down buffer's list of local Lisp variables
to find and update any that forward into C variables. */
for (tail = b->local_var_alist; !NULL (tail); tail = XCONS (tail)->cdr)
for (tail = b->local_var_alist; !NILP (tail); tail = XCONS (tail)->cdr)
{
valcontents = XSYMBOL (XCONS (XCONS (tail)->car)->car)->value;
if ((XTYPE (valcontents) == Lisp_Buffer_Local_Value
......@@ -850,7 +847,7 @@ set_buffer_internal (b)
/* Do the same with any others that were local to the previous buffer */
if (old_buf)
for (tail = old_buf->local_var_alist; !NULL (tail); tail = XCONS (tail)->cdr)
for (tail = old_buf->local_var_alist; !NILP (tail); tail = XCONS (tail)->cdr)
{
valcontents = XSYMBOL (XCONS (XCONS (tail)->car)->car)->value;
if ((XTYPE (valcontents) == Lisp_Buffer_Local_Value
......@@ -876,9 +873,9 @@ Use `switch-to-buffer' or `pop-to-buffer' to switch buffers permanently.")
{
register Lisp_Object buffer;
buffer = Fget_buffer (bufname);
if (NULL (buffer))
if (NILP (buffer))
nsberror (bufname);
if (NULL (XBUFFER (buffer)->name))
if (NILP (XBUFFER (buffer)->name))
error ("Selecting deleted buffer");
set_buffer_internal (XBUFFER (buffer));
return buffer;
......@@ -889,7 +886,7 @@ DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only,
"Signal a `buffer-read-only' error if the current buffer is read-only.")
()
{
while (!NULL (current_buffer->read_only))
while (!NILP (current_buffer->read_only))
Fsignal (Qbuffer_read_only, (Fcons (Fcurrent_buffer (), Qnil)));
return Qnil;
}
......@@ -903,7 +900,7 @@ thus, the least likely buffer for \\[switch-to-buffer] to select by default.")
{
register Lisp_Object aelt, link;
if (NULL (buf))
if (NILP (buf))
{
XSET (buf, Lisp_Buffer, current_buffer);
Fswitch_to_buffer (Fother_buffer (buf), Qnil);
......@@ -913,7 +910,7 @@ thus, the least likely buffer for \\[switch-to-buffer] to select by default.")
Lisp_Object buf1;
buf1 = Fget_buffer (buf);
if (NULL (buf1))
if (NILP (buf1))
nsberror (buf);
buf = buf1;
}
......@@ -983,7 +980,7 @@ list_buffers_1 (files)
tail = intern ("Buffer-menu-mode");
if (!EQ (tail, current_buffer->major_mode)
&& (tem = Ffboundp (tail), !NULL (tem)))
&& (tem = Ffboundp (tail), !NILP (tem)))
call0 (tail);
Fbuffer_disable_undo (Vstandard_output);
current_buffer->read_only = Qnil;
......@@ -992,7 +989,7 @@ list_buffers_1 (files)
MR Buffer Size Mode File\n\
-- ------ ---- ---- ----\n", -1);
for (tail = Vbuffer_alist; !NULL (tail); tail = Fcdr (tail))
for (tail = Vbuffer_alist; !NILP (tail); tail = Fcdr (tail))
{
buf = Fcdr (Fcar (tail));
b = XBUFFER (buf);
......@@ -1000,7 +997,7 @@ list_buffers_1 (files)
if (XSTRING (b->name)->data[0] == ' ')
continue;
/* Optionally don't mention buffers that lack files. */
if (!NULL (files) && NULL (b->filename))
if (!NILP (files) && NILP (b->filename))
continue;
/* Identify the current buffer. */
if (b == old)
......@@ -1008,7 +1005,7 @@ list_buffers_1 (files)
write_string (b == old ? "." : " ", -1);
/* Identify modified buffers */
write_string (BUF_MODIFF (b) > b->save_modified ? "*" : " ", -1);
write_string (NULL (b->read_only) ? " " : "% ", -1);
write_string (NILP (b->read_only) ? " " : "% ", -1);
Fprinc (b->name, Qnil);
Findent_to (col1, make_number (2));
XFASTINT (tem) = BUF_Z (b) - BUF_BEG (b);
......@@ -1017,7 +1014,7 @@ list_buffers_1 (files)
Fprinc (b->mode_name, Qnil);
Findent_to (col3, minspace);
if (!NULL (b->filename))
if (!NILP (b->filename))
Fprinc (b->filename, Qnil);
else
{
......@@ -1025,7 +1022,7 @@ list_buffers_1 (files)
Lisp_Object tem;
set_buffer_internal (b);
tem = Fboundp (other_file_symbol);
if (!NULL (tem))
if (!NILP (tem))
{
tem = Fsymbol_value (other_file_symbol);
Fset_buffer (Vstandard_output);
......@@ -1085,7 +1082,7 @@ a non-nil `permanent-local' property are not eliminated by this function.")
/* Make sure no local variables remain set up with this buffer
for their current values. */
for (alist = oalist; !NULL (alist); alist = XCONS (alist)->cdr)
for (alist = oalist; !NILP (alist); alist = XCONS (alist)->cdr)
{
sym = XCONS (XCONS (alist)->car)->car;
......@@ -1115,11 +1112,11 @@ a non-nil `permanent-local' property are not eliminated by this function.")
/* Any which are supposed to be permanent,
make local again, with the same values they had. */
for (alist = oalist; !NULL (alist); alist = XCONS (alist)->cdr)
for (alist = oalist; !NILP (alist); alist = XCONS (alist)->cdr)
{
sym = XCONS (XCONS (alist)->car)->car;
tem = Fget (sym, Qpermanent_local);
if (! NULL (tem))
if (! NILP (tem))
{
Fmake_local_variable (sym);
Fset (sym, XCONS (XCONS (alist)->car)->cdr);
......@@ -1146,7 +1143,7 @@ if any protected fields overlap this portion.")
Lisp_Object fieldlist;
Lisp_Object collector;
if (NULL (buffer))
if (NILP (buffer))
fieldlist = current_buffer->fieldlist;
else
{
......@@ -1174,9 +1171,9 @@ if any protected fields overlap this portion.")
if ((start_loc < field_start && end_loc > field_start)
|| (start_loc >= field_start && start_loc < field_end))
{
if (!NULL (error_check))
if (!NILP (error_check))
{
if (!NULL (FIELD_PROTECTED_FLAG (field)))
if (!NILP (FIELD_PROTECTED_FLAG (field)))
{
struct gcpro gcpro1;
GCPRO1 (fieldlist);
......
......@@ -128,7 +128,6 @@ struct buffer_text
for this buffer. It is incremented for
each such event, and never otherwise
changed. */
};
struct buffer
......@@ -148,7 +147,7 @@ struct buffer
/* Flags saying which DEFVAR_PER_BUFFER variables
are local to this buffer. */
int local_var_flags;
/* Value of text.modified as of when visited file was read or written. */
/* Value of text.modiff as of when visited file was read or written. */
int save_modified;
/* Set to the modtime of the visited file when read or written.
-1 means visited file was nonexistent.
......
......@@ -450,7 +450,7 @@ If the third argument is incorrect, Emacs may crash.")
case Bgotoifnil:
op = FETCH2;
if (NULL (POP))
if (NILP (POP))
{
QUIT;
pc = XSTRING (string_saved)->data + op;
......@@ -459,7 +459,7 @@ If the third argument is incorrect, Emacs may crash.")
case Bgotoifnonnil:
op = FETCH2;
if (!NULL (POP))
if (!NILP (POP))
{
QUIT;
pc = XSTRING (string_saved)->data + op;
......@@ -468,7 +468,7 @@ If the third argument is incorrect, Emacs may crash.")
case Bgotoifnilelsepop:
op = FETCH2;
if (NULL (TOP))
if (NILP (TOP))
{
QUIT;
pc = XSTRING (string_saved)->data + op;
......@@ -478,7 +478,7 @@ If the third argument is incorrect, Emacs may crash.")
case Bgotoifnonnilelsepop:
op = FETCH2;
if (!NULL (TOP))
if (!NILP (TOP))
{
QUIT;
pc = XSTRING (string_saved)->data + op;
......@@ -492,7 +492,7 @@ If the third argument is incorrect, Emacs may crash.")
break;
case BRgotoifnil:
if (NULL (POP))
if (NILP (POP))
{
QUIT;
pc += *pc - 128;
......@@ -501,7 +501,7 @@ If the third argument is incorrect, Emacs may crash.")
break;
case BRgotoifnonnil:
if (!NULL (POP))
if (!NILP (POP))
{
QUIT;
pc += *pc - 128;
......@@ -511,7 +511,7 @@ If the third argument is incorrect, Emacs may crash.")
case BRgotoifnilelsepop:
op = *pc++;
if (NULL (TOP))
if (NILP (TOP))
{
QUIT;
pc += op - 128;
......@@ -521,7 +521,7 @@ If the third argument is incorrect, Emacs may crash.")
case BRgotoifnonnilelsepop:
op = *pc++;
if (!NULL (TOP))
if (!NILP (TOP))
{
QUIT;
pc += op - 128;
......@@ -598,7 +598,7 @@ If the third argument is incorrect, Emacs may crash.")
{
if (CONSP (v1))
v1 = XCONS (v1)->cdr;
else if (!NULL (v1))
else if (!NILP (v1))
{
immediate_quit = 0;
v1 = wrong_type_argument (Qlistp, v1);
......@@ -622,7 +622,7 @@ If the third argument is incorrect, Emacs may crash.")
break;
case Blistp:
TOP = CONSP (TOP) || NULL (TOP) ? Qt : Qnil;
TOP = CONSP (TOP) || NILP (TOP) ? Qt : Qnil;
break;
case Beq:
......@@ -636,21 +636,21 @@ If the third argument is incorrect, Emacs may crash.")
break;
case Bnot:
TOP = NULL (TOP) ? Qt : Qnil;
TOP = NILP (TOP) ? Qt : Qnil;
break;
case Bcar:
v1 = TOP;
docar:
if (CONSP (v1)) TOP = XCONS (v1)->car;
else if (NULL (v1)) TOP = Qnil;
else if (NILP (v1)) TOP = Qnil;
else Fcar (wrong_type_argument (Qlistp, v1));
break;
case Bcdr:
v1 = TOP;
if (CONSP (v1)) TOP = XCONS (v1)->cdr;
else if (NULL (v1)) TOP = Qnil;
else if (NILP (v1)) TOP = Qnil;
else Fcdr (wrong_type_argument (Qlistp, v1));
break;
......
......@@ -103,7 +103,7 @@ quotify_arg (exp)
register Lisp_Object exp;
{
if (XTYPE (exp) != Lisp_Int && XTYPE (exp) != Lisp_String
&& !NULL (exp) && !EQ (exp, Qt))
&& !NILP (exp) && !EQ (exp, Qt))
return Fcons (Qquote, Fcons (exp, Qnil));
return exp;
......@@ -131,7 +131,7 @@ static void
check_mark ()
{
Lisp_Object tem = Fmarker_buffer (current_buffer->mark);
if (NULL (tem) || (XBUFFER (tem) != current_buffer))
if (NILP (tem) || (XBUFFER (tem) != current_buffer))
error ("The mark is not set now");
}
......@@ -221,7 +221,7 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
else if (EQ (funcar, Qlambda))
{
specs = Fassq (Qinteractive, Fcdr (Fcdr (fun)));
if (NULL (specs))
if (NILP (specs))
goto lose;
specs = Fcar (Fcdr (specs));
}
......@@ -236,7 +236,7 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
{
i = num_input_chars;
specs = Feval (specs);
if (i != num_input_chars || !NULL (record))
if (i != num_input_chars || !NILP (record))
Vcommand_history
= Fcons (Fcons (function, quotify_args (Fcopy_sequence (specs))),
Vcommand_history);
......@@ -251,13 +251,13 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
if (*string == '*')
{
string++;
if (!NULL (current_buffer->read_only))
if (!NILP (current_buffer->read_only))
Fbarf_if_buffer_read_only ();
}
else if (*string == '@')
{
string++;
if (!NULL (Vmouse_window))
if (!NILP (Vmouse_window))
Fselect_window (Vmouse_window);
}
else break;
......@@ -379,7 +379,7 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
case 'K': /* Mouse click. */
args[i] = last_command_char;
if (NULL (Fmouse_click_p (args[i])))
if (NILP (Fmouse_click_p (args[i])))
error ("%s must be bound to a mouse click.",
(XTYPE (function) == Lisp_Symbol
? (char *) XSYMBOL (function)->name->data
......@@ -394,7 +394,7 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
break;
case 'N': /* Prefix arg, else number from minibuffer */
if (!NULL (prefix_arg))
if (!NILP (prefix_arg))
goto have_prefix_arg;
case 'n': /* Read number from minibuffer. */
do
......@@ -470,7 +470,7 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
if (varies[i] == 0)
arg_from_tty = 1;