# HG changeset patch # User Ken Raeburn # Date 954955771 0 # Node ID b6f06a755c7d8a9a2b03aa34de53add0d9110792 # Parent 3d557619ba03059830555e3fca9f2e1f11b4d77f make_number/XINT/XUINT conversions; EQ/== fixes; ==Qnil -> NILP diff -r 3d557619ba03 -r b6f06a755c7d src/ChangeLog Binary file src/ChangeLog has changed diff -r 3d557619ba03 -r b6f06a755c7d src/dispnew.c --- a/src/dispnew.c Tue Apr 04 21:15:08 2000 +0000 +++ b/src/dispnew.c Wed Apr 05 17:29:31 2000 +0000 @@ -1756,8 +1756,8 @@ /* Width and height MUST be chosen so that there are no holes in the frame matrix. */ - dim.width = w->width; - dim.height = w->height; + dim.width = XINT (w->width); + dim.height = XINT (w->height); /* Will matrix be re-allocated? */ if (x != w->desired_matrix->matrix_x @@ -3372,7 +3372,7 @@ struct glyph_row *row; /* Give up if point moved out of or into a composition. */ - if (check_point_in_composition (current_buffer, w->last_point, + if (check_point_in_composition (current_buffer, XINT (w->last_point), current_buffer, PT)) return 0; diff -r 3d557619ba03 -r b6f06a755c7d src/fileio.c --- a/src/fileio.c Tue Apr 04 21:15:08 2000 +0000 +++ b/src/fileio.c Wed Apr 05 17:29:31 2000 +0000 @@ -4461,7 +4461,7 @@ filename = Fexpand_file_name (filename, Qnil); - if (! NILP (mustbenew) && mustbenew != Qexcl) + if (! NILP (mustbenew) && !EQ (mustbenew, Qexcl)) barf_or_query_if_file_exists (filename, "overwrite", 1, 0, 1); if (STRINGP (visit)) @@ -4600,7 +4600,7 @@ S_IREAD | S_IWRITE); #else /* not DOS_NT */ desc = emacs_open (fn, O_WRONLY | O_TRUNC | O_CREAT - | (mustbenew == Qexcl ? O_EXCL : 0), + | (EQ (mustbenew, Qexcl) ? O_EXCL : 0), auto_saving ? auto_save_mode_bits : 0666); #endif /* not DOS_NT */ #endif /* not VMS */ diff -r 3d557619ba03 -r b6f06a755c7d src/fns.c --- a/src/fns.c Tue Apr 04 21:15:08 2000 +0000 +++ b/src/fns.c Wed Apr 05 17:29:31 2000 +0000 @@ -840,7 +840,7 @@ { this = args[textprops[argnum].argnum]; copy_text_properties (make_number (textprops[argnum].from), - XSTRING (this)->size, this, + make_number (XSTRING (this)->size), this, make_number (textprops[argnum].to), val, Qnil); } } @@ -3950,7 +3950,7 @@ if (EQ (key, HASH_KEY (h, i)) || (h->cmpfn && h->cmpfn (h, key, hash_code, - HASH_KEY (h, i), HASH_HASH (h, i)))) + HASH_KEY (h, i), XUINT (HASH_HASH (h, i))))) break; idx = HASH_NEXT (h, i); } @@ -4017,7 +4017,7 @@ if (EQ (key, HASH_KEY (h, i)) || (h->cmpfn && h->cmpfn (h, key, hash_code, - HASH_KEY (h, i), HASH_HASH (h, i)))) + HASH_KEY (h, i), XUINT (HASH_HASH (h, i))))) { /* Take entry out of collision chain. */ if (NILP (prev)) diff -r 3d557619ba03 -r b6f06a755c7d src/keyboard.c --- a/src/keyboard.c Tue Apr 04 21:15:08 2000 +0000 +++ b/src/keyboard.c Wed Apr 05 17:29:31 2000 +0000 @@ -7863,8 +7863,8 @@ pos = XCDR (string); string = XCAR (string); - if (pos >= 0 - && pos < XSTRING (string)->size + if (XINT (pos) >= 0 + && XINT (pos) < XSTRING (string)->size && (map = Fget_text_property (pos, Qlocal_map, string), !NILP (map))) diff -r 3d557619ba03 -r b6f06a755c7d src/lread.c --- a/src/lread.c Tue Apr 04 21:15:08 2000 +0000 +++ b/src/lread.c Wed Apr 05 17:29:31 2000 +0000 @@ -2334,7 +2334,7 @@ case Lisp_Vectorlike: { int i; - int length = Flength(subtree); + int length = XINT (Flength(subtree)); for (i = 0; i < length; i++) { Lisp_Object idx = make_number (i); diff -r 3d557619ba03 -r b6f06a755c7d src/minibuf.c --- a/src/minibuf.c Tue Apr 04 21:15:08 2000 +0000 +++ b/src/minibuf.c Wed Apr 05 17:29:31 2000 +0000 @@ -1579,7 +1579,7 @@ Lisp_Object last; struct gcpro gcpro1, gcpro2; - completion = Ftry_completion (Ffield_string (ZV), + completion = Ftry_completion (Ffield_string (make_number (ZV)), Vminibuffer_completion_table, Vminibuffer_completion_predicate); last = last_exact_completion; @@ -1602,7 +1602,7 @@ } /* compiler bug */ - tem = Fstring_equal (completion, Ffield_string(ZV)); + tem = Fstring_equal (completion, Ffield_string(make_number (ZV))); completedp = NILP (tem); if (completedp) { @@ -1611,7 +1611,7 @@ } /* It did find a match. Do we match some possibility exactly now? */ - tem = test_completion (Ffield_string(ZV)); + tem = test_completion (Ffield_string (make_number (ZV))); if (NILP (tem)) { /* not an exact match */ @@ -1635,7 +1635,7 @@ last_exact_completion = completion; if (!NILP (last)) { - tem = Ffield_string (ZV); + tem = Ffield_string (make_number (ZV)); if (!NILP (Fequal (tem, last))) Fminibuffer_completion_help (); } @@ -1760,10 +1760,10 @@ Lisp_Object val; /* Allow user to specify null string */ - if (Ffield_beginning (ZV, Qnil) == ZV) + if (XINT (Ffield_beginning (make_number (ZV), Qnil)) == ZV) goto exit; - if (!NILP (test_completion (Ffield_string (ZV)))) + if (!NILP (test_completion (Ffield_string (make_number (ZV))))) goto exit; /* Call do_completion, but ignore errors. */ @@ -1811,7 +1811,7 @@ /* We keep calling Fbuffer_string rather than arrange for GC to hold onto a pointer to one of the strings thus made. */ - completion = Ftry_completion (Ffield_string (ZV), + completion = Ftry_completion (Ffield_string (make_number (ZV)), Vminibuffer_completion_table, Vminibuffer_completion_predicate); if (NILP (completion)) @@ -1824,7 +1824,7 @@ return Qnil; #if 0 /* How the below code used to look, for reference. */ - tem = Ffield_string (ZV); + tem = Ffield_string (make_number (ZV)); b = XSTRING (tem)->data; i = ZV - 1 - XSTRING (completion)->size; p = XSTRING (completion)->data; @@ -1843,7 +1843,7 @@ int buffer_nchars, completion_nchars; CHECK_STRING (completion, 0); - tem = Ffield_string (ZV); + tem = Ffield_string (make_number (ZV)); GCPRO2 (completion, tem); /* If reading a file name, expand any $ENVVAR refs in the buffer and in TEM. */ @@ -1896,7 +1896,7 @@ } #endif /* Rewritten code */ - prompt_end_charpos = Ffield_beginning (make_number (ZV), Qnil); + prompt_end_charpos = XINT (Ffield_beginning (make_number (ZV), Qnil)); { int prompt_end_bytepos; @@ -1910,7 +1910,7 @@ if (i == XSTRING (completion)->size) { GCPRO1 (completion); - tem = Ftry_completion (concat2 (Ffield_string (ZV), build_string (" ")), + tem = Ftry_completion (concat2 (Ffield_string (make_number (ZV)), build_string (" ")), Vminibuffer_completion_table, Vminibuffer_completion_predicate); UNGCPRO; @@ -1921,7 +1921,7 @@ { GCPRO1 (completion); tem = - Ftry_completion (concat2 (Ffield_string (ZV), build_string ("-")), + Ftry_completion (concat2 (Ffield_string (make_number (ZV)), build_string ("-")), Vminibuffer_completion_table, Vminibuffer_completion_predicate); UNGCPRO; @@ -2156,7 +2156,7 @@ Lisp_Object completions; message ("Making completion list..."); - completions = Fall_completions (Ffield_string (ZV), + completions = Fall_completions (Ffield_string (make_number (ZV)), Vminibuffer_completion_table, Vminibuffer_completion_predicate, Qt); diff -r 3d557619ba03 -r b6f06a755c7d src/print.c --- a/src/print.c Tue Apr 04 21:15:08 2000 +0000 +++ b/src/print.c Wed Apr 05 17:29:31 2000 +0000 @@ -1118,7 +1118,7 @@ if (! NILP (Vprint_circle) || SYMBOLP (obj)) { for (i = 0; i < print_number_index; i++) - if (PRINT_NUMBER_OBJECT (Vprint_number_table, i) == obj) + if (EQ (PRINT_NUMBER_OBJECT (Vprint_number_table, i), obj)) { /* OBJ appears more than once. Let's remember that. */ PRINT_NUMBER_STATUS (Vprint_number_table, i) = Qt; @@ -1218,7 +1218,7 @@ /* With the print-circle feature. */ int i; for (i = 0; i < print_number_index; i++) - if (PRINT_NUMBER_OBJECT (Vprint_number_table, i) == obj) + if (EQ (PRINT_NUMBER_OBJECT (Vprint_number_table, i), obj)) { if (NILP (PRINT_NUMBER_STATUS (Vprint_number_table, i))) { @@ -1506,7 +1506,7 @@ { int i; for (i = 0; i < print_number_index; i++) - if (PRINT_NUMBER_OBJECT (Vprint_number_table, i) == obj) + if (EQ (PRINT_NUMBER_OBJECT (Vprint_number_table, i), obj)) { if (NILP (PRINT_NUMBER_STATUS (Vprint_number_table, i))) { diff -r 3d557619ba03 -r b6f06a755c7d src/search.c --- a/src/search.c Tue Apr 04 21:15:08 2000 +0000 +++ b/src/search.c Wed Apr 05 17:29:31 2000 +0000 @@ -218,7 +218,7 @@ XSTRING in those cases. However, compile_pattern_1 is only applied to the cache entry we pick here to reuse. So nil should never appear before a non-nil entry. */ - if (cp->regexp == Qnil) + if (NILP (cp->regexp)) goto compile_it; if (XSTRING (cp->regexp)->size == XSTRING (pattern)->size && !NILP (Fstring_equal (cp->regexp, pattern)) diff -r 3d557619ba03 -r b6f06a755c7d src/term.c --- a/src/term.c Tue Apr 04 21:15:08 2000 +0000 +++ b/src/term.c Wed Apr 05 17:29:31 2000 +0000 @@ -1893,7 +1893,7 @@ temp_it.dp = NULL; temp_it.what = IT_CHARACTER; temp_it.len = 1; - temp_it.object = 0; + temp_it.object = make_number (0); bzero (&temp_it.current, sizeof temp_it.current); if (what == IT_CONTINUATION)