diff src/abbrev.c @ 484:3165b2697c78

entered into RCS
author Jim Blandy <jimb@redhat.com>
date Mon, 13 Jan 1992 21:48:03 +0000
parents 8f18e7e89008
children 341171b49f96
line wrap: on
line diff
--- a/src/abbrev.c	Mon Jan 13 06:37:58 1992 +0000
+++ b/src/abbrev.c	Mon Jan 13 21:48:03 1992 +0000
@@ -20,7 +20,6 @@
 
 #include "config.h"
 #include <stdio.h>
-#undef NULL
 #include "lisp.h"
 #include "commands.h"
 #include "buffer.h"
@@ -113,9 +112,9 @@
   Lisp_Object sym, oexp, ohook, tem;
   CHECK_VECTOR (table, 0);
   CHECK_STRING (name, 1);
-  if (!NULL (expansion))
+  if (!NILP (expansion))
     CHECK_STRING (expansion, 2);
-  if (NULL (count))
+  if (NILP (count))
     count = make_number (0);
   else
     CHECK_NUMBER (count, 0);
@@ -126,10 +125,10 @@
   ohook = XSYMBOL (sym)->function;
   if (!((EQ (oexp, expansion)
 	 || (XTYPE (oexp) == Lisp_String && XTYPE (expansion) == Lisp_String
-	     && (tem = Fstring_equal (oexp, expansion), !NULL (tem))))
+	     && (tem = Fstring_equal (oexp, expansion), !NILP (tem))))
 	&&
 	(EQ (ohook, hook)
-	 || (tem = Fequal (ohook, hook), !NULL (tem)))))
+	 || (tem = Fequal (ohook, hook), !NILP (tem)))))
     abbrevs_changed = 1;
 
   Fset (sym, expansion);
@@ -156,7 +155,7 @@
   (name, expansion)
      Lisp_Object name, expansion;
 {
-  if (NULL (current_buffer->abbrev_table))
+  if (NILP (current_buffer->abbrev_table))
     error ("Major mode has no abbrev table");
 
   Fdefine_abbrev (current_buffer->abbrev_table, Fdowncase (name),
@@ -176,19 +175,19 @@
 {
   Lisp_Object sym;
   CHECK_STRING (abbrev, 0);
-  if (!NULL (table))
+  if (!NILP (table))
     sym = Fintern_soft (abbrev, table);
   else
     {
       sym = Qnil;
-      if (!NULL (current_buffer->abbrev_table))
+      if (!NILP (current_buffer->abbrev_table))
 	sym = Fintern_soft (abbrev, current_buffer->abbrev_table);
-      if (NULL (XSYMBOL (sym)->value))
+      if (NILP (XSYMBOL (sym)->value))
 	sym = Qnil;
-      if (NULL (sym))
+      if (NILP (sym))
 	sym = Fintern_soft (abbrev, Vglobal_abbrev_table);
     }
-  if (NULL (XSYMBOL (sym)->value)) return Qnil;
+  if (NILP (XSYMBOL (sym)->value)) return Qnil;
   return sym;
 }
 
@@ -201,7 +200,7 @@
 {
   Lisp_Object sym;
   sym = Fabbrev_symbol (abbrev, table);
-  if (NULL (sym)) return sym;
+  if (NILP (sym)) return sym;
   return Fsymbol_value (sym);
 }
 
@@ -221,12 +220,12 @@
   register Lisp_Object sym;
   Lisp_Object expansion, hook, tem;
 
-  if (!NULL (Vrun_hooks))
+  if (!NILP (Vrun_hooks))
     call1 (Vrun_hooks, Qpre_abbrev_expand_hook);
 
   if (XBUFFER (Vabbrev_start_location_buffer) != current_buffer)
     Vabbrev_start_location = Qnil;
-  if (!NULL (Vabbrev_start_location))
+  if (!NILP (Vabbrev_start_location))
     {
       tem = Vabbrev_start_location;
       CHECK_NUMBER_COERCE_MARKER (tem, 0);
@@ -267,9 +266,9 @@
     sym = oblookup (current_buffer->abbrev_table, buffer, p - buffer);
   else
     XFASTINT (sym) = 0;
-  if (XTYPE (sym) == Lisp_Int || NULL (XSYMBOL (sym)->value))
+  if (XTYPE (sym) == Lisp_Int || NILP (XSYMBOL (sym)->value))
     sym = oblookup (Vglobal_abbrev_table, buffer, p - buffer);
-  if (XTYPE (sym) == Lisp_Int || NULL (XSYMBOL (sym)->value))
+  if (XTYPE (sym) == Lisp_Int || NILP (XSYMBOL (sym)->value))
     return Qnil;
 
   if (INTERACTIVE && !EQ (minibuf_window, selected_window))
@@ -327,7 +326,7 @@
     }
 
   hook = XSYMBOL (sym)->function;
-  if (!NULL (hook))
+  if (!NILP (hook))
     call0 (hook);
 
   return Qt;
@@ -367,7 +366,7 @@
      Lisp_Object sym, stream;
 {
   Lisp_Object name;
-  if (NULL (XSYMBOL (sym)->value))
+  if (NILP (XSYMBOL (sym)->value))
     return;
   insert ("    (", 5);
   XSET (name, Lisp_String, XSYMBOL (sym)->name);
@@ -387,7 +386,7 @@
 {
   Lisp_Object one;
 
-  if (NULL (XSYMBOL (sym)->value))
+  if (NILP (XSYMBOL (sym)->value))
     return;
   one = make_number (1);
   Fprin1 (Fsymbol_name (sym), stream);
@@ -395,7 +394,7 @@
   Fprin1 (XSYMBOL (sym)->plist, stream);
   Findent_to (make_number (20), one);
   Fprin1 (XSYMBOL (sym)->value, stream);
-  if (!NULL (XSYMBOL (sym)->function))
+  if (!NILP (XSYMBOL (sym)->function))
     {
       Findent_to (make_number (45), one);
       Fprin1 (XSYMBOL (sym)->function, stream);
@@ -424,7 +423,7 @@
 
   XSET (stream, Lisp_Buffer, current_buffer);
 
-  if (!NULL (readable))
+  if (!NILP (readable))
     {
       insert_string ("(");
       Fprin1 (name, stream);
@@ -457,7 +456,7 @@
 
   CHECK_SYMBOL (tabname, 0);
   table = Fboundp (tabname);
-  if (NULL (table) || (table = Fsymbol_value (tabname), NULL (table)))
+  if (NILP (table) || (table = Fsymbol_value (tabname), NILP (table)))
     {
       table = Fmake_abbrev_table ();
       Fset (tabname, table);
@@ -466,7 +465,7 @@
     }
   CHECK_VECTOR (table, 0);
 
-  for (;!NULL (defns); defns = Fcdr (defns))
+  for (;!NILP (defns); defns = Fcdr (defns))
     {
       elt = Fcar (defns);
       name = Fcar (elt);