diff options
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 242 |
1 files changed, 121 insertions, 121 deletions
diff --git a/src/window.c b/src/window.c index 422b06a49fe..e3b0c3a66a5 100644 --- a/src/window.c +++ b/src/window.c @@ -695,7 +695,7 @@ one. The window with the lowest use time is the least recently selected one. */) (Lisp_Object window) { - return make_number (decode_live_window (window)->use_time); + return make_fixnum (decode_live_window (window)->use_time); } DEFUN ("window-pixel-width", Fwindow_pixel_width, Swindow_pixel_width, 0, 1, 0, @@ -708,7 +708,7 @@ an internal window, its pixel width is the width of the screen areas spanned by its children. */) (Lisp_Object window) { - return make_number (decode_valid_window (window)->pixel_width); + return make_fixnum (decode_valid_window (window)->pixel_width); } DEFUN ("window-pixel-height", Fwindow_pixel_height, Swindow_pixel_height, 0, 1, 0, @@ -720,7 +720,7 @@ divider, if any. If WINDOW is an internal window, its pixel height is the height of the screen areas spanned by its children. */) (Lisp_Object window) { - return make_number (decode_valid_window (window)->pixel_height); + return make_fixnum (decode_valid_window (window)->pixel_height); } DEFUN ("window-pixel-width-before-size-change", @@ -734,7 +734,7 @@ The return value is the pixel width of WINDOW at the last time after that. */) (Lisp_Object window) { - return (make_number + return (make_fixnum (decode_valid_window (window)->pixel_width_before_size_change)); } @@ -749,7 +749,7 @@ The return value is the pixel height of WINDOW at the last time after that. */) (Lisp_Object window) { - return (make_number + return (make_fixnum (decode_valid_window (window)->pixel_height_before_size_change)); } @@ -778,12 +778,12 @@ total height of WINDOW. */) struct window *w = decode_valid_window (window); if (! EQ (round, Qfloor) && ! EQ (round, Qceiling)) - return make_number (w->total_lines); + return make_fixnum (w->total_lines); else { int unit = FRAME_LINE_HEIGHT (WINDOW_XFRAME (w)); - return make_number (EQ (round, Qceiling) + return make_fixnum (EQ (round, Qceiling) ? ((w->pixel_height + unit - 1) /unit) : (w->pixel_height / unit)); } @@ -815,12 +815,12 @@ total width of WINDOW. */) struct window *w = decode_valid_window (window); if (! EQ (round, Qfloor) && ! EQ (round, Qceiling)) - return make_number (w->total_cols); + return make_fixnum (w->total_cols); else { int unit = FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w)); - return make_number (EQ (round, Qceiling) + return make_fixnum (EQ (round, Qceiling) ? ((w->pixel_width + unit - 1) /unit) : (w->pixel_width / unit)); } @@ -898,7 +898,7 @@ DEFUN ("window-pixel-left", Fwindow_pixel_left, Swindow_pixel_left, 0, 1, 0, WINDOW must be a valid window and defaults to the selected one. */) (Lisp_Object window) { - return make_number (decode_valid_window (window)->pixel_left); + return make_fixnum (decode_valid_window (window)->pixel_left); } DEFUN ("window-pixel-top", Fwindow_pixel_top, Swindow_pixel_top, 0, 1, 0, @@ -906,7 +906,7 @@ DEFUN ("window-pixel-top", Fwindow_pixel_top, Swindow_pixel_top, 0, 1, 0, WINDOW must be a valid window and defaults to the selected one. */) (Lisp_Object window) { - return make_number (decode_valid_window (window)->pixel_top); + return make_fixnum (decode_valid_window (window)->pixel_top); } DEFUN ("window-left-column", Fwindow_left_column, Swindow_left_column, 0, 1, 0, @@ -918,7 +918,7 @@ value is 0 if there is no window to the left of WINDOW. WINDOW must be a valid window and defaults to the selected one. */) (Lisp_Object window) { - return make_number (decode_valid_window (window)->left_col); + return make_fixnum (decode_valid_window (window)->left_col); } DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0, @@ -930,7 +930,7 @@ there is no window above WINDOW. WINDOW must be a valid window and defaults to the selected one. */) (Lisp_Object window) { - return make_number (decode_valid_window (window)->top_line); + return make_fixnum (decode_valid_window (window)->top_line); } /* Return the number of lines/pixels of W's body. Don't count any mode @@ -997,7 +997,7 @@ means that if a line at the bottom of the text area is only partially visible, that line is not counted. */) (Lisp_Object window, Lisp_Object pixelwise) { - return make_number (window_body_height (decode_live_window (window), + return make_fixnum (window_body_height (decode_live_window (window), !NILP (pixelwise))); } @@ -1017,7 +1017,7 @@ Note that the returned value includes the column reserved for the continuation glyph. */) (Lisp_Object window, Lisp_Object pixelwise) { - return make_number (window_body_width (decode_live_window (window), + return make_fixnum (window_body_width (decode_live_window (window), !NILP (pixelwise))); } @@ -1027,7 +1027,7 @@ DEFUN ("window-mode-line-height", Fwindow_mode_line_height, WINDOW must be a live window and defaults to the selected one. */) (Lisp_Object window) { - return (make_number (WINDOW_MODE_LINE_HEIGHT (decode_live_window (window)))); + return (make_fixnum (WINDOW_MODE_LINE_HEIGHT (decode_live_window (window)))); } DEFUN ("window-header-line-height", Fwindow_header_line_height, @@ -1036,7 +1036,7 @@ DEFUN ("window-header-line-height", Fwindow_header_line_height, WINDOW must be a live window and defaults to the selected one. */) (Lisp_Object window) { - return (make_number (WINDOW_HEADER_LINE_HEIGHT (decode_live_window (window)))); + return (make_fixnum (WINDOW_HEADER_LINE_HEIGHT (decode_live_window (window)))); } DEFUN ("window-right-divider-width", Fwindow_right_divider_width, @@ -1045,7 +1045,7 @@ DEFUN ("window-right-divider-width", Fwindow_right_divider_width, WINDOW must be a live window and defaults to the selected one. */) (Lisp_Object window) { - return (make_number (WINDOW_RIGHT_DIVIDER_WIDTH (decode_live_window (window)))); + return (make_fixnum (WINDOW_RIGHT_DIVIDER_WIDTH (decode_live_window (window)))); } DEFUN ("window-bottom-divider-width", Fwindow_bottom_divider_width, @@ -1054,7 +1054,7 @@ DEFUN ("window-bottom-divider-width", Fwindow_bottom_divider_width, WINDOW must be a live window and defaults to the selected one. */) (Lisp_Object window) { - return (make_number (WINDOW_BOTTOM_DIVIDER_WIDTH (decode_live_window (window)))); + return (make_fixnum (WINDOW_BOTTOM_DIVIDER_WIDTH (decode_live_window (window)))); } DEFUN ("window-scroll-bar-width", Fwindow_scroll_bar_width, @@ -1063,7 +1063,7 @@ DEFUN ("window-scroll-bar-width", Fwindow_scroll_bar_width, WINDOW must be a live window and defaults to the selected one. */) (Lisp_Object window) { - return (make_number (WINDOW_SCROLL_BAR_AREA_WIDTH (decode_live_window (window)))); + return (make_fixnum (WINDOW_SCROLL_BAR_AREA_WIDTH (decode_live_window (window)))); } DEFUN ("window-scroll-bar-height", Fwindow_scroll_bar_height, @@ -1072,7 +1072,7 @@ DEFUN ("window-scroll-bar-height", Fwindow_scroll_bar_height, WINDOW must be a live window and defaults to the selected one. */) (Lisp_Object window) { - return (make_number (WINDOW_SCROLL_BAR_AREA_HEIGHT (decode_live_window (window)))); + return (make_fixnum (WINDOW_SCROLL_BAR_AREA_HEIGHT (decode_live_window (window)))); } DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, @@ -1080,7 +1080,7 @@ DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, WINDOW must be a live window and defaults to the selected one. */) (Lisp_Object window) { - return make_number (decode_live_window (window)->hscroll); + return make_fixnum (decode_live_window (window)->hscroll); } /* Set W's horizontal scroll amount to HSCROLL clipped to a reasonable @@ -1104,7 +1104,7 @@ set_window_hscroll (struct window *w, EMACS_INT hscroll) w->hscroll = new_hscroll; w->suspend_auto_hscroll = true; - return make_number (new_hscroll); + return make_fixnum (new_hscroll); } DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0, @@ -1117,7 +1117,7 @@ Note that if `automatic-hscrolling' is non-nil, you cannot scroll the window so that the location of point moves off-window. */) (Lisp_Object window, Lisp_Object ncol) { - CHECK_NUMBER (ncol); + CHECK_FIXNUM (ncol); return set_window_hscroll (decode_live_window (window), XINT (ncol)); } @@ -1383,8 +1383,8 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\ CHECK_CONS (coordinates); lx = Fcar (coordinates); ly = Fcdr (coordinates); - CHECK_NUMBER_OR_FLOAT (lx); - CHECK_NUMBER_OR_FLOAT (ly); + CHECK_FIXNUM_OR_FLOAT (lx); + CHECK_FIXNUM_OR_FLOAT (ly); x = FRAME_PIXEL_X_FROM_CANON_X (f, lx) + FRAME_INTERNAL_BORDER_WIDTH (f); y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly) + FRAME_INTERNAL_BORDER_WIDTH (f); @@ -1534,8 +1534,8 @@ column 0. */) struct frame *f = decode_live_frame (frame); /* Check that arguments are integers or floats. */ - CHECK_NUMBER_OR_FLOAT (x); - CHECK_NUMBER_OR_FLOAT (y); + CHECK_FIXNUM_OR_FLOAT (x); + CHECK_FIXNUM_OR_FLOAT (y); return window_from_coordinates (f, (FRAME_PIXEL_X_FROM_CANON_X (f, x) @@ -1561,7 +1561,7 @@ correct to return the top-level value of `point', outside of any register struct window *w = decode_live_window (window); if (w == XWINDOW (selected_window)) - return make_number (BUF_PT (XBUFFER (w->contents))); + return make_fixnum (BUF_PT (XBUFFER (w->contents))); else return Fmarker_position (w->pointm); } @@ -1652,7 +1652,7 @@ if it isn't already recorded. */) move_it_vertically (&it, window_box_height (w)); if (it.current_y < it.last_visible_y) move_it_past_eol (&it); - value = make_number (IT_CHARPOS (it)); + value = make_fixnum (IT_CHARPOS (it)); bidi_unshelve_cache (itdata, false); if (old_buffer) @@ -1683,7 +1683,7 @@ Return POS. */) struct buffer *old_buffer = current_buffer; /* ... but here we want to catch type error before buffer change. */ - CHECK_NUMBER_COERCE_MARKER (pos); + CHECK_FIXNUM_COERCE_MARKER (pos); set_buffer_internal (XBUFFER (w->contents)); Fgoto_char (pos); set_buffer_internal (old_buffer); @@ -1763,7 +1763,7 @@ POS, ROWH is the visible height of that row, and VPOS is the row number posint = -1; else if (!NILP (pos)) { - CHECK_NUMBER_COERCE_MARKER (pos); + CHECK_FIXNUM_COERCE_MARKER (pos); posint = XINT (pos); } else if (w == XWINDOW (selected_window)) @@ -1789,8 +1789,8 @@ POS, ROWH is the visible height of that row, and VPOS is the row number Lisp_Object part = Qnil; if (!fully_p) part = list4i (rtop, rbot, rowh, vpos); - in_window = Fcons (make_number (x), - Fcons (make_number (y), part)); + in_window = Fcons (make_fixnum (x), + Fcons (make_fixnum (y), part)); } return in_window; @@ -1869,7 +1869,7 @@ Return nil if window display is not up-to-date. In that case, use : Qnil); } - CHECK_NUMBER (line); + CHECK_FIXNUM (line); n = XINT (line); row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); @@ -1972,7 +1972,7 @@ though when run from an idle timer with a delay of zero seconds. */) row = (NILP (body) ? MATRIX_ROW (w->current_matrix, 0) : MATRIX_FIRST_TEXT_ROW (w->current_matrix)); - else if (NUMBERP (first)) + else if (FIXED_OR_FLOATP (first)) { CHECK_RANGED_INTEGER (first, 0, w->current_matrix->nrows); row = MATRIX_ROW (w->current_matrix, XINT (first)); @@ -1985,7 +1985,7 @@ though when run from an idle timer with a delay of zero seconds. */) end_row = (NILP (body) ? MATRIX_ROW (w->current_matrix, w->current_matrix->nrows) : MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w)); - else if (NUMBERP (last)) + else if (FIXED_OR_FLOATP (last)) { CHECK_RANGED_INTEGER (last, 0, w->current_matrix->nrows); end_row = MATRIX_ROW (w->current_matrix, XINT (last)); @@ -2001,19 +2001,19 @@ though when run from an idle timer with a delay of zero seconds. */) { struct glyph *glyph = row->glyphs[TEXT_AREA]; - rows = Fcons (Fcons (make_number + rows = Fcons (Fcons (make_fixnum (invert ? glyph->pixel_width : window_width - glyph->pixel_width), - make_number (row->y + row->height - subtract)), + make_fixnum (row->y + row->height - subtract)), rows); } else - rows = Fcons (Fcons (make_number + rows = Fcons (Fcons (make_fixnum (invert ? window_width - row->pixel_width : row->pixel_width), - make_number (row->y + row->height - subtract)), + make_fixnum (row->y + row->height - subtract)), rows); row++; } @@ -2492,7 +2492,7 @@ candidate_window_p (Lisp_Object window, Lisp_Object owindow, == FRAME_TERMINAL (XFRAME (selected_frame))); } - else if (INTEGERP (all_frames) && XINT (all_frames) == 0) + else if (FIXNUMP (all_frames) && XINT (all_frames) == 0) { candidate_p = (FRAME_VISIBLE_P (f) || FRAME_ICONIFIED_P (f) #ifdef HAVE_X_WINDOWS @@ -2551,7 +2551,7 @@ decode_next_window_args (Lisp_Object *window, Lisp_Object *minibuf, Lisp_Object : Qnil); else if (EQ (*all_frames, Qvisible)) ; - else if (EQ (*all_frames, make_number (0))) + else if (EQ (*all_frames, make_fixnum (0))) ; else if (FRAMEP (*all_frames)) ; @@ -2834,7 +2834,7 @@ window_loop (enum window_loop type, Lisp_Object obj, bool mini, if (f) frame_arg = Qlambda; - else if (EQ (frames, make_number (0))) + else if (EQ (frames, make_fixnum (0))) frame_arg = frames; else if (EQ (frames, Qvisible)) frame_arg = frames; @@ -3494,8 +3494,8 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, b->display_error_modiff = 0; /* Update time stamps of buffer display. */ - if (INTEGERP (BVAR (b, display_count))) - bset_display_count (b, make_number (XINT (BVAR (b, display_count)) + 1)); + if (FIXNUMP (BVAR (b, display_count))) + bset_display_count (b, make_fixnum (XINT (BVAR (b, display_count)) + 1)); bset_display_time (b, Fcurrent_time ()); w->window_end_pos = 0; @@ -3513,7 +3513,7 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, set_marker_both (w->pointm, buffer, BUF_PT (b), BUF_PT_BYTE (b)); set_marker_both (w->old_pointm, buffer, BUF_PT (b), BUF_PT_BYTE (b)); set_marker_restricted (w->start, - make_number (b->last_window_start), + make_fixnum (b->last_window_start), buffer); w->start_at_line_beg = false; w->force_start = false; @@ -3769,9 +3769,9 @@ make_window (void) Lisp data to nil, so do it only for slots which should not be nil. */ wset_normal_lines (w, make_float (1.0)); wset_normal_cols (w, make_float (1.0)); - wset_new_total (w, make_number (0)); - wset_new_normal (w, make_number (0)); - wset_new_pixel (w, make_number (0)); + wset_new_total (w, make_fixnum (0)); + wset_new_normal (w, make_fixnum (0)); + wset_new_pixel (w, make_fixnum (0)); wset_start (w, Fmake_marker ()); wset_pointm (w, Fmake_marker ()); wset_old_pointm (w, Fmake_marker ()); @@ -3827,7 +3827,7 @@ Note: This function does not operate on any child windows of WINDOW. */) if (NILP (add)) wset_new_pixel (w, size); else - wset_new_pixel (w, make_number (XINT (w->new_pixel) + XINT (size))); + wset_new_pixel (w, make_fixnum (XINT (w->new_pixel) + XINT (size))); return w->new_pixel; } @@ -3849,11 +3849,11 @@ Note: This function does not operate on any child windows of WINDOW. */) { struct window *w = decode_valid_window (window); - CHECK_NUMBER (size); + CHECK_FIXNUM (size); if (NILP (add)) wset_new_total (w, size); else - wset_new_total (w, make_number (XINT (w->new_total) + XINT (size))); + wset_new_total (w, make_fixnum (XINT (w->new_total) + XINT (size))); return w->new_total; } @@ -3994,7 +3994,7 @@ window_resize_apply (struct window *w, bool horflag) { w->pixel_width = XFASTINT (w->new_pixel); w->total_cols = w->pixel_width / unit; - if (NUMBERP (w->new_normal)) + if (FIXED_OR_FLOATP (w->new_normal)) wset_normal_cols (w, w->new_normal); edge = w->pixel_left; @@ -4003,7 +4003,7 @@ window_resize_apply (struct window *w, bool horflag) { w->pixel_height = XFASTINT (w->new_pixel); w->total_lines = w->pixel_height / unit; - if (NUMBERP (w->new_normal)) + if (FIXED_OR_FLOATP (w->new_normal)) wset_normal_lines (w, w->new_normal); edge = w->pixel_top; @@ -4369,7 +4369,7 @@ set correctly. See the code of `split-window' for how this is done. */) frame = WINDOW_FRAME (o); f = XFRAME (frame); - CHECK_NUMBER (pixel_size); + CHECK_FIXNUM (pixel_size); EMACS_INT total_size = XINT (pixel_size) / (horflag ? FRAME_COLUMN_WIDTH (f) @@ -4406,13 +4406,13 @@ set correctly. See the code of `split-window' for how this is done. */) p = XWINDOW (o->parent); /* Temporarily pretend we split the parent window. */ wset_new_pixel - (p, make_number ((horflag ? p->pixel_width : p->pixel_height) + (p, make_fixnum ((horflag ? p->pixel_width : p->pixel_height) - XINT (pixel_size))); if (!window_resize_check (p, horflag)) error ("Window sizes don't fit"); else /* Undo the temporary pretension. */ - wset_new_pixel (p, make_number (horflag ? p->pixel_width : p->pixel_height)); + wset_new_pixel (p, make_fixnum (horflag ? p->pixel_width : p->pixel_height)); } else { @@ -4440,9 +4440,9 @@ set correctly. See the code of `split-window' for how this is done. */) wset_combination_limit (p, Qt); /* These get applied below. */ wset_new_pixel - (p, make_number (horflag ? o->pixel_width : o->pixel_height)); + (p, make_fixnum (horflag ? o->pixel_width : o->pixel_height)); wset_new_total - (p, make_number (horflag ? o->total_cols : o->total_lines)); + (p, make_fixnum (horflag ? o->total_cols : o->total_lines)); wset_new_normal (p, new_normal); } else @@ -4514,7 +4514,7 @@ set correctly. See the code of `split-window' for how this is done. */) sum = sum + XINT (c->new_total); c = NILP (c->next) ? 0 : XWINDOW (c->next); } - wset_new_total (n, make_number ((horflag + wset_new_total (n, make_fixnum ((horflag ? p->total_cols : p->total_lines) - sum)); @@ -4727,8 +4727,8 @@ grow_mini_window (struct window *w, int delta, bool pixelwise) root = FRAME_ROOT_WINDOW (f); r = XWINDOW (root); height = call3 (Qwindow__resize_root_window_vertically, - root, make_number (- delta), pixelwise ? Qt : Qnil); - if (INTEGERP (height) && window_resize_check (r, false)) + root, make_fixnum (- delta), pixelwise ? Qt : Qnil); + if (FIXNUMP (height) && window_resize_check (r, false)) { block_input (); window_resize_apply (r, false); @@ -4784,9 +4784,9 @@ shrink_mini_window (struct window *w, bool pixelwise) root = FRAME_ROOT_WINDOW (f); r = XWINDOW (root); delta = call3 (Qwindow__resize_root_window_vertically, - root, make_number (height - unit), + root, make_fixnum (height - unit), pixelwise ? Qt : Qnil); - if (INTEGERP (delta) && window_resize_check (r, false)) + if (FIXNUMP (delta) && window_resize_check (r, false)) { block_input (); window_resize_apply (r, false); @@ -5105,7 +5105,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) if (w->vscroll < 0 && rtop > 0) { px = max (0, -w->vscroll - min (rtop, -dy)); - Fset_window_vscroll (window, make_number (px), Qt); + Fset_window_vscroll (window, make_fixnum (px), Qt); return; } } @@ -5115,7 +5115,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) if (rbot > 0 && (w->vscroll < 0 || vpos == 0)) { px = max (0, -w->vscroll + min (rbot, dy)); - Fset_window_vscroll (window, make_number (px), Qt); + Fset_window_vscroll (window, make_fixnum (px), Qt); return; } @@ -5124,14 +5124,14 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) { ptrdiff_t spos; - Fset_window_vscroll (window, make_number (0), Qt); + Fset_window_vscroll (window, make_fixnum (0), Qt); /* If there are other text lines above the current row, move window start to current row. Else to next row. */ if (rbot > 0) spos = XINT (Fline_beginning_position (Qnil)); else spos = min (XINT (Fline_end_position (Qnil)) + 1, ZV); - set_marker_restricted (w->start, make_number (spos), + set_marker_restricted (w->start, make_fixnum (spos), w->contents); w->start_at_line_beg = true; wset_update_mode_line (w); @@ -5143,7 +5143,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) } } /* Cancel previous vscroll. */ - Fset_window_vscroll (window, make_number (0), Qt); + Fset_window_vscroll (window, make_fixnum (0), Qt); } itdata = bidi_shelve_cache (); @@ -5448,7 +5448,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) if (adjust_old_pointm) Fset_marker (w->old_pointm, ((w == XWINDOW (selected_window)) - ? make_number (BUF_PT (XBUFFER (w->contents))) + ? make_fixnum (BUF_PT (XBUFFER (w->contents))) : Fmarker_position (w->pointm)), w->contents); } @@ -5497,8 +5497,8 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, bool noerror) window_scroll_preserve_hpos = posit.hpos + w->hscroll; } - original_pos = Fcons (make_number (window_scroll_preserve_hpos), - make_number (window_scroll_preserve_vpos)); + original_pos = Fcons (make_fixnum (window_scroll_preserve_hpos), + make_fixnum (window_scroll_preserve_vpos)); } XSETFASTINT (tem, PT); @@ -5506,14 +5506,14 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, bool noerror) if (NILP (tem)) { - Fvertical_motion (make_number (- (ht / 2)), window, Qnil); + Fvertical_motion (make_fixnum (- (ht / 2)), window, Qnil); startpos = PT; startbyte = PT_BYTE; } SET_PT_BOTH (startpos, startbyte); lose = n < 0 && PT == BEGV; - Fvertical_motion (make_number (n), window, Qnil); + Fvertical_motion (make_fixnum (n), window, Qnil); pos = PT; pos_byte = PT_BYTE; bolp = Fbolp (); @@ -5555,7 +5555,7 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, bool noerror) if (this_scroll_margin > 0) { SET_PT_BOTH (pos, pos_byte); - Fvertical_motion (make_number (this_scroll_margin), window, Qnil); + Fvertical_motion (make_fixnum (this_scroll_margin), window, Qnil); top_margin = PT; } else @@ -5574,8 +5574,8 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, bool noerror) else if (window_scroll_preserve_vpos >= w->total_lines - this_scroll_margin) nlines = w->total_lines - this_scroll_margin - 1; - Fvertical_motion (Fcons (make_number (window_scroll_preserve_hpos), - make_number (nlines)), window, Qnil); + Fvertical_motion (Fcons (make_fixnum (window_scroll_preserve_hpos), + make_fixnum (nlines)), window, Qnil); } else SET_PT (top_margin); @@ -5587,7 +5587,7 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, bool noerror) /* If we scrolled backward, put point near the end of the window but not within the scroll margin. */ SET_PT_BOTH (pos, pos_byte); - tem = Fvertical_motion (make_number (ht - this_scroll_margin), window, + tem = Fvertical_motion (make_fixnum (ht - this_scroll_margin), window, Qnil); if (XFASTINT (tem) == ht - this_scroll_margin) bottom_margin = PT; @@ -5609,11 +5609,11 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, bool noerror) else if (window_scroll_preserve_vpos >= ht - this_scroll_margin) nlines = ht - this_scroll_margin - 1; - Fvertical_motion (Fcons (make_number (window_scroll_preserve_hpos), - make_number (nlines)), window, Qnil); + Fvertical_motion (Fcons (make_fixnum (window_scroll_preserve_hpos), + make_fixnum (nlines)), window, Qnil); } else - Fvertical_motion (make_number (-1), window, Qnil); + Fvertical_motion (make_fixnum (-1), window, Qnil); } } } @@ -5628,7 +5628,7 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, bool noerror) if (adjust_old_pointm) Fset_marker (w->old_pointm, ((w == XWINDOW (selected_window)) - ? make_number (BUF_PT (XBUFFER (w->contents))) + ? make_fixnum (BUF_PT (XBUFFER (w->contents))) : Fmarker_position (w->pointm)), w->contents); } @@ -5961,7 +5961,7 @@ and redisplay normally--don't erase and redraw the frame. */) else { arg = Fprefix_numeric_value (arg); - CHECK_NUMBER (arg); + CHECK_FIXNUM (arg); iarg = XINT (arg); } @@ -6139,10 +6139,10 @@ pixels. */) struct window *w = decode_live_window (window); if (NILP (pixelwise)) - return make_number (window_box_width (w, TEXT_AREA) + return make_fixnum (window_box_width (w, TEXT_AREA) / FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w))); else - return make_number (window_box_width (w, TEXT_AREA)); + return make_fixnum (window_box_width (w, TEXT_AREA)); } DEFUN ("window-text-height", Fwindow_text_height, Swindow_text_height, @@ -6160,10 +6160,10 @@ pixels. */) struct window *w = decode_live_window (window); if (NILP (pixelwise)) - return make_number (window_box_height (w) + return make_fixnum (window_box_height (w) / FRAME_LINE_HEIGHT (WINDOW_XFRAME (w))); else - return make_number (window_box_height (w)); + return make_fixnum (window_box_height (w)); } DEFUN ("move-to-window-line", Fmove_to_window_line, Smove_to_window_line, @@ -6196,7 +6196,7 @@ from the top of the window. */) if (start < BEGV || start > ZV) { int height = window_internal_height (w); - Fvertical_motion (make_number (- (height / 2)), window, Qnil); + Fvertical_motion (make_fixnum (- (height / 2)), window, Qnil); set_marker_both (w->start, w->contents, PT, PT_BYTE); w->start_at_line_beg = !NILP (Fbolp ()); w->force_start = true; @@ -6228,7 +6228,7 @@ from the top of the window. */) iarg = min (iarg, lines - this_scroll_margin - 1); #endif - arg = make_number (iarg); + arg = make_fixnum (iarg); } /* Skip past a partially visible first line. */ @@ -6611,7 +6611,7 @@ the return value is nil. Otherwise the value is t. */) current when the window configuration was saved. */ if (EQ (XWINDOW (data->current_window)->contents, new_current_buffer)) set_marker_restricted (XWINDOW (data->current_window)->pointm, - make_number (old_point), + make_fixnum (old_point), XWINDOW (data->current_window)->contents); /* In the following call to select_window, prevent "swapping out @@ -6715,7 +6715,7 @@ the return value is nil. Otherwise the value is t. */) the "normal" frame's selected window and that window *does* show new_current_buffer. */ if (!EQ (XWINDOW (selected_window)->contents, new_current_buffer)) - Fgoto_char (make_number (old_point)); + Fgoto_char (make_fixnum (old_point)); } Vminibuf_scroll_window = data->minibuf_scroll_window; @@ -6850,21 +6850,21 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, ptrdiff_t i) p = SAVED_WINDOW_N (vector, i); w = XWINDOW (window); - wset_temslot (w, make_number (i)); i++; + wset_temslot (w, make_fixnum (i)); i++; p->window = window; p->buffer = (WINDOW_LEAF_P (w) ? w->contents : Qnil); - p->pixel_left = make_number (w->pixel_left); - p->pixel_top = make_number (w->pixel_top); - p->pixel_width = make_number (w->pixel_width); - p->pixel_height = make_number (w->pixel_height); + p->pixel_left = make_fixnum (w->pixel_left); + p->pixel_top = make_fixnum (w->pixel_top); + p->pixel_width = make_fixnum (w->pixel_width); + p->pixel_height = make_fixnum (w->pixel_height); p->pixel_width_before_size_change - = make_number (w->pixel_width_before_size_change); + = make_fixnum (w->pixel_width_before_size_change); p->pixel_height_before_size_change - = make_number (w->pixel_height_before_size_change); - p->left_col = make_number (w->left_col); - p->top_line = make_number (w->top_line); - p->total_cols = make_number (w->total_cols); - p->total_lines = make_number (w->total_lines); + = make_fixnum (w->pixel_height_before_size_change); + p->left_col = make_fixnum (w->left_col); + p->top_line = make_fixnum (w->top_line); + p->total_cols = make_fixnum (w->total_cols); + p->total_lines = make_fixnum (w->total_lines); p->normal_cols = w->normal_cols; p->normal_lines = w->normal_lines; XSETFASTINT (p->hscroll, w->hscroll); @@ -6872,13 +6872,13 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, ptrdiff_t i) XSETFASTINT (p->min_hscroll, w->min_hscroll); XSETFASTINT (p->hscroll_whole, w->hscroll_whole); p->display_table = w->display_table; - p->left_margin_cols = make_number (w->left_margin_cols); - p->right_margin_cols = make_number (w->right_margin_cols); - p->left_fringe_width = make_number (w->left_fringe_width); - p->right_fringe_width = make_number (w->right_fringe_width); + p->left_margin_cols = make_fixnum (w->left_margin_cols); + p->right_margin_cols = make_fixnum (w->right_margin_cols); + p->left_fringe_width = make_fixnum (w->left_fringe_width); + p->right_fringe_width = make_fixnum (w->right_fringe_width); p->fringes_outside_margins = w->fringes_outside_margins ? Qt : Qnil; - p->scroll_bar_width = make_number (w->scroll_bar_width); - p->scroll_bar_height = make_number (w->scroll_bar_height); + p->scroll_bar_width = make_fixnum (w->scroll_bar_width); + p->scroll_bar_height = make_fixnum (w->scroll_bar_height); p->vertical_scroll_bar_type = w->vertical_scroll_bar_type; p->horizontal_scroll_bar_type = w->horizontal_scroll_bar_type; p->dedicated = w->dedicated; @@ -7013,7 +7013,7 @@ saved by this function. */) data->saved_windows = tem; for (i = 0; i < n_windows; i++) ASET (tem, i, - Fmake_vector (make_number (VECSIZE (struct saved_window)), Qnil)); + Fmake_vector (make_fixnum (VECSIZE (struct saved_window)), Qnil)); save_window_save (FRAME_ROOT_WINDOW (f), XVECTOR (tem), 0); XSETWINDOW_CONFIGURATION (tem, data); return (tem); @@ -7105,9 +7105,9 @@ as nil. */) { struct window *w = decode_live_window (window); return Fcons (w->left_margin_cols - ? make_number (w->left_margin_cols) : Qnil, + ? make_fixnum (w->left_margin_cols) : Qnil, w->right_margin_cols - ? make_number (w->right_margin_cols) : Qnil); + ? make_fixnum (w->right_margin_cols) : Qnil); } @@ -7186,8 +7186,8 @@ Value is a list of the form (LEFT-WIDTH RIGHT-WIDTH OUTSIDE-MARGINS). */) { struct window *w = decode_live_window (window); - return list3 (make_number (WINDOW_LEFT_FRINGE_WIDTH (w)), - make_number (WINDOW_RIGHT_FRINGE_WIDTH (w)), + return list3 (make_fixnum (WINDOW_LEFT_FRINGE_WIDTH (w)), + make_fixnum (WINDOW_RIGHT_FRINGE_WIDTH (w)), WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) ? Qt : Qnil); } @@ -7309,14 +7309,14 @@ value. */) struct window *w = decode_live_window (window); return Fcons (((w->scroll_bar_width >= 0) - ? make_number (w->scroll_bar_width) + ? make_fixnum (w->scroll_bar_width) : Qnil), - list5 (make_number (WINDOW_SCROLL_BAR_COLS (w)), + list5 (make_fixnum (WINDOW_SCROLL_BAR_COLS (w)), w->vertical_scroll_bar_type, ((w->scroll_bar_height >= 0) - ? make_number (w->scroll_bar_height) + ? make_fixnum (w->scroll_bar_height) : Qnil), - make_number (WINDOW_SCROLL_BAR_LINES (w)), + make_fixnum (WINDOW_SCROLL_BAR_LINES (w)), w->horizontal_scroll_bar_type)); } @@ -7338,9 +7338,9 @@ optional second arg PIXELS-P means value is measured in pixels. */) if (FRAME_WINDOW_P (f)) result = (NILP (pixels_p) ? FRAME_CANON_Y_FROM_PIXEL_Y (f, -w->vscroll) - : make_number (-w->vscroll)); + : make_fixnum (-w->vscroll)); else - result = make_number (0); + result = make_fixnum (0); return result; } @@ -7360,7 +7360,7 @@ If PIXELS-P is non-nil, the return value is VSCROLL. */) struct window *w = decode_live_window (window); struct frame *f = XFRAME (w->frame); - CHECK_NUMBER_OR_FLOAT (vscroll); + CHECK_FIXNUM_OR_FLOAT (vscroll); if (FRAME_WINDOW_P (f)) { |