diff options
author | Jim Blandy <jimb@redhat.com> | 1992-01-13 21:48:03 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1992-01-13 21:48:03 +0000 |
commit | 254f294c2e37a22e04bff74fedfdc9b1fcc93b93 (patch) | |
tree | 060dbe9a444bcf1c2e1bc7802fc4dfc1717520aa /src/abbrev.c | |
parent | a48a36d045feed054f3532c5596449466a60a3cd (diff) | |
download | emacs-254f294c2e37a22e04bff74fedfdc9b1fcc93b93.tar.gz |
entered into RCS
Diffstat (limited to 'src/abbrev.c')
-rw-r--r-- | src/abbrev.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/src/abbrev.c b/src/abbrev.c index 74c0e80010a..9a7640b872c 100644 --- a/src/abbrev.c +++ b/src/abbrev.c @@ -20,7 +20,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include <stdio.h> -#undef NULL #include "lisp.h" #include "commands.h" #include "buffer.h" @@ -113,9 +112,9 @@ it is called after EXPANSION is inserted.") 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 @@ it is called after EXPANSION is inserted.") 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 @@ DEFUN ("define-mode-abbrev", Fdefine_mode_abbrev, Sdefine_mode_abbrev, 2, 2, (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 @@ The default is to try buffer's mode-specific abbrev table, then global table.") { 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 @@ then ABBREV is looked up in that table only.") { 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 @@ Returns t if expansion took place.") 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 @@ Returns t if expansion took place.") 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 @@ Returns t if expansion took place.") } hook = XSYMBOL (sym)->function; - if (!NULL (hook)) + if (!NILP (hook)) call0 (hook); return Qt; @@ -367,7 +366,7 @@ write_abbrev (sym, stream) 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 @@ describe_abbrev (sym, stream) { 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 @@ describe_abbrev (sym, stream) 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 @@ define the abbrev table NAME exactly as it is currently defined.") XSET (stream, Lisp_Buffer, current_buffer); - if (!NULL (readable)) + if (!NILP (readable)) { insert_string ("("); Fprin1 (name, stream); @@ -457,7 +456,7 @@ of the form (ABBREVNAME EXPANSION HOOK USECOUNT).") 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 @@ of the form (ABBREVNAME EXPANSION HOOK USECOUNT).") } CHECK_VECTOR (table, 0); - for (;!NULL (defns); defns = Fcdr (defns)) + for (;!NILP (defns); defns = Fcdr (defns)) { elt = Fcar (defns); name = Fcar (elt); |