diff options
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 639 |
1 files changed, 264 insertions, 375 deletions
diff --git a/src/window.c b/src/window.c index 193f7eecd0e..0ec72168ace 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -58,34 +58,32 @@ Lisp_Object Qdisplay_buffer; | |||
| 58 | Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; | 58 | Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; |
| 59 | Lisp_Object Qwindow_size_fixed; | 59 | Lisp_Object Qwindow_size_fixed; |
| 60 | 60 | ||
| 61 | extern Lisp_Object Qleft_margin, Qright_margin; | 61 | static int displayed_window_lines (struct window *); |
| 62 | 62 | static struct window *decode_window (Lisp_Object); | |
| 63 | static int displayed_window_lines P_ ((struct window *)); | 63 | static int count_windows (struct window *); |
| 64 | static struct window *decode_window P_ ((Lisp_Object)); | 64 | static int get_leaf_windows (struct window *, struct window **, int); |
| 65 | static int count_windows P_ ((struct window *)); | 65 | static void window_scroll (Lisp_Object, int, int, int); |
| 66 | static int get_leaf_windows P_ ((struct window *, struct window **, int)); | 66 | static void window_scroll_pixel_based (Lisp_Object, int, int, int); |
| 67 | static void window_scroll P_ ((Lisp_Object, int, int, int)); | 67 | static void window_scroll_line_based (Lisp_Object, int, int, int); |
| 68 | static void window_scroll_pixel_based P_ ((Lisp_Object, int, int, int)); | 68 | static int window_min_size_1 (struct window *, int, int); |
| 69 | static void window_scroll_line_based P_ ((Lisp_Object, int, int, int)); | 69 | static int window_min_size_2 (struct window *, int, int); |
| 70 | static int window_min_size_1 P_ ((struct window *, int, int)); | 70 | static int window_min_size (struct window *, int, int, int, int *); |
| 71 | static int window_min_size_2 P_ ((struct window *, int, int)); | 71 | static void size_window (Lisp_Object, int, int, int, int, int); |
| 72 | static int window_min_size P_ ((struct window *, int, int, int, int *)); | 72 | static int freeze_window_start (struct window *, void *); |
| 73 | static void size_window P_ ((Lisp_Object, int, int, int, int, int)); | 73 | static int window_fixed_size_p (struct window *, int, int); |
| 74 | static int freeze_window_start P_ ((struct window *, void *)); | 74 | static void enlarge_window (Lisp_Object, int, int); |
| 75 | static int window_fixed_size_p P_ ((struct window *, int, int)); | 75 | static Lisp_Object window_list (void); |
| 76 | static void enlarge_window P_ ((Lisp_Object, int, int)); | 76 | static int add_window_to_list (struct window *, void *); |
| 77 | static Lisp_Object window_list P_ ((void)); | 77 | static int candidate_window_p (Lisp_Object, Lisp_Object, Lisp_Object, |
| 78 | static int add_window_to_list P_ ((struct window *, void *)); | 78 | Lisp_Object); |
| 79 | static int candidate_window_p P_ ((Lisp_Object, Lisp_Object, Lisp_Object, | 79 | static Lisp_Object next_window (Lisp_Object, Lisp_Object, |
| 80 | Lisp_Object)); | 80 | Lisp_Object, int); |
| 81 | static Lisp_Object next_window P_ ((Lisp_Object, Lisp_Object, | 81 | static void decode_next_window_args (Lisp_Object *, Lisp_Object *, |
| 82 | Lisp_Object, int)); | 82 | Lisp_Object *); |
| 83 | static void decode_next_window_args P_ ((Lisp_Object *, Lisp_Object *, | 83 | static int foreach_window_1 (struct window *, |
| 84 | Lisp_Object *)); | 84 | int (* fn) (struct window *, void *), |
| 85 | static int foreach_window_1 P_ ((struct window *, | 85 | void *); |
| 86 | int (* fn) (struct window *, void *), | 86 | static Lisp_Object window_list_1 (Lisp_Object, Lisp_Object, Lisp_Object); |
| 87 | void *)); | ||
| 88 | static Lisp_Object window_list_1 P_ ((Lisp_Object, Lisp_Object, Lisp_Object)); | ||
| 89 | 87 | ||
| 90 | /* This is the window in which the terminal's cursor should | 88 | /* This is the window in which the terminal's cursor should |
| 91 | be left when nothing is being done with it. This must | 89 | be left when nothing is being done with it. This must |
| @@ -192,36 +190,29 @@ static int window_scroll_preserve_vpos; | |||
| 192 | static int inhibit_frame_unsplittable; | 190 | static int inhibit_frame_unsplittable; |
| 193 | #endif /* 0 */ | 191 | #endif /* 0 */ |
| 194 | 192 | ||
| 195 | extern EMACS_INT scroll_margin; | ||
| 196 | |||
| 197 | extern Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions; | ||
| 198 | |||
| 199 | /* If non-nil, then the `recenter' command with a nil argument | 193 | /* If non-nil, then the `recenter' command with a nil argument |
| 200 | the entire frame to be redrawn; the special value `tty' causes the | 194 | the entire frame to be redrawn; the special value `tty' causes the |
| 201 | frame to be redrawn only if it is a tty frame. */ | 195 | frame to be redrawn only if it is a tty frame. */ |
| 202 | 196 | ||
| 203 | static Lisp_Object Vrecenter_redisplay; | 197 | static Lisp_Object Vrecenter_redisplay; |
| 204 | extern Lisp_Object Qtty; | ||
| 205 | 198 | ||
| 206 | 199 | ||
| 207 | DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0, | 200 | DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0, |
| 208 | doc: /* Return t if OBJECT is a window. */) | 201 | doc: /* Return t if OBJECT is a window. */) |
| 209 | (object) | 202 | (Lisp_Object object) |
| 210 | Lisp_Object object; | ||
| 211 | { | 203 | { |
| 212 | return WINDOWP (object) ? Qt : Qnil; | 204 | return WINDOWP (object) ? Qt : Qnil; |
| 213 | } | 205 | } |
| 214 | 206 | ||
| 215 | DEFUN ("window-live-p", Fwindow_live_p, Swindow_live_p, 1, 1, 0, | 207 | DEFUN ("window-live-p", Fwindow_live_p, Swindow_live_p, 1, 1, 0, |
| 216 | doc: /* Return t if OBJECT is a window which is currently visible. */) | 208 | doc: /* Return t if OBJECT is a window which is currently visible. */) |
| 217 | (object) | 209 | (Lisp_Object object) |
| 218 | Lisp_Object object; | ||
| 219 | { | 210 | { |
| 220 | return WINDOW_LIVE_P (object) ? Qt : Qnil; | 211 | return WINDOW_LIVE_P (object) ? Qt : Qnil; |
| 221 | } | 212 | } |
| 222 | 213 | ||
| 223 | Lisp_Object | 214 | Lisp_Object |
| 224 | make_window () | 215 | make_window (void) |
| 225 | { | 216 | { |
| 226 | Lisp_Object val; | 217 | Lisp_Object val; |
| 227 | register struct window *p; | 218 | register struct window *p; |
| @@ -244,9 +235,9 @@ make_window () | |||
| 244 | p->dedicated = Qnil; | 235 | p->dedicated = Qnil; |
| 245 | p->window_parameters = Qnil; | 236 | p->window_parameters = Qnil; |
| 246 | p->pseudo_window_p = 0; | 237 | p->pseudo_window_p = 0; |
| 247 | bzero (&p->cursor, sizeof (p->cursor)); | 238 | memset (&p->cursor, 0, sizeof (p->cursor)); |
| 248 | bzero (&p->last_cursor, sizeof (p->last_cursor)); | 239 | memset (&p->last_cursor, 0, sizeof (p->last_cursor)); |
| 249 | bzero (&p->phys_cursor, sizeof (p->phys_cursor)); | 240 | memset (&p->phys_cursor, 0, sizeof (p->phys_cursor)); |
| 250 | p->desired_matrix = p->current_matrix = 0; | 241 | p->desired_matrix = p->current_matrix = 0; |
| 251 | p->nrows_scale_factor = p->ncols_scale_factor = 1; | 242 | p->nrows_scale_factor = p->ncols_scale_factor = 1; |
| 252 | p->phys_cursor_type = -1; | 243 | p->phys_cursor_type = -1; |
| @@ -275,7 +266,7 @@ make_window () | |||
| 275 | 266 | ||
| 276 | DEFUN ("selected-window", Fselected_window, Sselected_window, 0, 0, 0, | 267 | DEFUN ("selected-window", Fselected_window, Sselected_window, 0, 0, 0, |
| 277 | doc: /* Return the window that the cursor now appears in and commands apply to. */) | 268 | doc: /* Return the window that the cursor now appears in and commands apply to. */) |
| 278 | () | 269 | (void) |
| 279 | { | 270 | { |
| 280 | return selected_window; | 271 | return selected_window; |
| 281 | } | 272 | } |
| @@ -284,8 +275,7 @@ DEFUN ("minibuffer-window", Fminibuffer_window, Sminibuffer_window, 0, 1, 0, | |||
| 284 | doc: /* Return the window used now for minibuffers. | 275 | doc: /* Return the window used now for minibuffers. |
| 285 | If the optional argument FRAME is specified, return the minibuffer window | 276 | If the optional argument FRAME is specified, return the minibuffer window |
| 286 | used by that frame. */) | 277 | used by that frame. */) |
| 287 | (frame) | 278 | (Lisp_Object frame) |
| 288 | Lisp_Object frame; | ||
| 289 | { | 279 | { |
| 290 | if (NILP (frame)) | 280 | if (NILP (frame)) |
| 291 | frame = selected_frame; | 281 | frame = selected_frame; |
| @@ -296,8 +286,7 @@ used by that frame. */) | |||
| 296 | DEFUN ("window-minibuffer-p", Fwindow_minibuffer_p, Swindow_minibuffer_p, 0, 1, 0, | 286 | DEFUN ("window-minibuffer-p", Fwindow_minibuffer_p, Swindow_minibuffer_p, 0, 1, 0, |
| 297 | doc: /* Return non-nil if WINDOW is a minibuffer window. | 287 | doc: /* Return non-nil if WINDOW is a minibuffer window. |
| 298 | WINDOW defaults to the selected window. */) | 288 | WINDOW defaults to the selected window. */) |
| 299 | (window) | 289 | (Lisp_Object window) |
| 300 | Lisp_Object window; | ||
| 301 | { | 290 | { |
| 302 | struct window *w = decode_window (window); | 291 | struct window *w = decode_window (window); |
| 303 | return MINI_WINDOW_P (w) ? Qt : Qnil; | 292 | return MINI_WINDOW_P (w) ? Qt : Qnil; |
| @@ -321,8 +310,7 @@ of the window. The remaining elements are omitted if the character after | |||
| 321 | POS is fully visible; otherwise, RTOP and RBOT are the number of pixels | 310 | POS is fully visible; otherwise, RTOP and RBOT are the number of pixels |
| 322 | off-window at the top and bottom of the row, ROWH is the height of the | 311 | off-window at the top and bottom of the row, ROWH is the height of the |
| 323 | display row, and VPOS is the row number (0-based) containing POS. */) | 312 | display row, and VPOS is the row number (0-based) containing POS. */) |
| 324 | (pos, window, partially) | 313 | (Lisp_Object pos, Lisp_Object window, Lisp_Object partially) |
| 325 | Lisp_Object pos, window, partially; | ||
| 326 | { | 314 | { |
| 327 | register struct window *w; | 315 | register struct window *w; |
| 328 | register int posint; | 316 | register int posint; |
| @@ -390,8 +378,7 @@ of the (first) text line, YPOS is negative. | |||
| 390 | 378 | ||
| 391 | Return nil if window display is not up-to-date. In that case, use | 379 | Return nil if window display is not up-to-date. In that case, use |
| 392 | `pos-visible-in-window-p' to obtain the information. */) | 380 | `pos-visible-in-window-p' to obtain the information. */) |
| 393 | (line, window) | 381 | (Lisp_Object line, Lisp_Object window) |
| 394 | Lisp_Object line, window; | ||
| 395 | { | 382 | { |
| 396 | register struct window *w; | 383 | register struct window *w; |
| 397 | register struct buffer *b; | 384 | register struct buffer *b; |
| @@ -484,8 +471,7 @@ Return nil if window display is not up-to-date. In that case, use | |||
| 484 | 471 | ||
| 485 | 472 | ||
| 486 | static struct window * | 473 | static struct window * |
| 487 | decode_window (window) | 474 | decode_window (register Lisp_Object window) |
| 488 | register Lisp_Object window; | ||
| 489 | { | 475 | { |
| 490 | if (NILP (window)) | 476 | if (NILP (window)) |
| 491 | return XWINDOW (selected_window); | 477 | return XWINDOW (selected_window); |
| @@ -495,8 +481,7 @@ decode_window (window) | |||
| 495 | } | 481 | } |
| 496 | 482 | ||
| 497 | static struct window * | 483 | static struct window * |
| 498 | decode_any_window (window) | 484 | decode_any_window (register Lisp_Object window) |
| 499 | register Lisp_Object window; | ||
| 500 | { | 485 | { |
| 501 | if (NILP (window)) | 486 | if (NILP (window)) |
| 502 | return XWINDOW (selected_window); | 487 | return XWINDOW (selected_window); |
| @@ -508,8 +493,7 @@ decode_any_window (window) | |||
| 508 | DEFUN ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0, | 493 | DEFUN ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0, |
| 509 | doc: /* Return the buffer that WINDOW is displaying. | 494 | doc: /* Return the buffer that WINDOW is displaying. |
| 510 | WINDOW defaults to the selected window. */) | 495 | WINDOW defaults to the selected window. */) |
| 511 | (window) | 496 | (Lisp_Object window) |
| 512 | Lisp_Object window; | ||
| 513 | { | 497 | { |
| 514 | return decode_window (window)->buffer; | 498 | return decode_window (window)->buffer; |
| 515 | } | 499 | } |
| @@ -518,9 +502,11 @@ DEFUN ("window-height", Fwindow_height, Swindow_height, 0, 1, 0, | |||
| 518 | doc: /* Return the number of lines in WINDOW. | 502 | doc: /* Return the number of lines in WINDOW. |
| 519 | WINDOW defaults to the selected window. | 503 | WINDOW defaults to the selected window. |
| 520 | 504 | ||
| 521 | The return value includes WINDOW's mode line and header line, if any. */) | 505 | The return value includes WINDOW's mode line and header line, if any. |
| 522 | (window) | 506 | |
| 523 | Lisp_Object window; | 507 | Note: The function does not take into account the value of `line-spacing' |
| 508 | when calculating the number of lines in WINDOW. */) | ||
| 509 | (Lisp_Object window) | ||
| 524 | { | 510 | { |
| 525 | return decode_any_window (window)->total_lines; | 511 | return decode_any_window (window)->total_lines; |
| 526 | } | 512 | } |
| @@ -532,8 +518,7 @@ WINDOW defaults to the selected window. | |||
| 532 | Note: The return value is the number of columns available for text in | 518 | Note: The return value is the number of columns available for text in |
| 533 | WINDOW. If you want to find out how many columns WINDOW takes up, use | 519 | WINDOW. If you want to find out how many columns WINDOW takes up, use |
| 534 | (let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges))). */) | 520 | (let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges))). */) |
| 535 | (window) | 521 | (Lisp_Object window) |
| 536 | Lisp_Object window; | ||
| 537 | { | 522 | { |
| 538 | return make_number (window_box_text_cols (decode_any_window (window))); | 523 | return make_number (window_box_text_cols (decode_any_window (window))); |
| 539 | } | 524 | } |
| @@ -541,8 +526,7 @@ WINDOW. If you want to find out how many columns WINDOW takes up, use | |||
| 541 | DEFUN ("window-full-width-p", Fwindow_full_width_p, Swindow_full_width_p, 0, 1, 0, | 526 | DEFUN ("window-full-width-p", Fwindow_full_width_p, Swindow_full_width_p, 0, 1, 0, |
| 542 | doc: /* Return t if WINDOW is as wide as its frame. | 527 | doc: /* Return t if WINDOW is as wide as its frame. |
| 543 | WINDOW defaults to the selected window. */) | 528 | WINDOW defaults to the selected window. */) |
| 544 | (window) | 529 | (Lisp_Object window) |
| 545 | Lisp_Object window; | ||
| 546 | { | 530 | { |
| 547 | return WINDOW_FULL_WIDTH_P (decode_any_window (window)) ? Qt : Qnil; | 531 | return WINDOW_FULL_WIDTH_P (decode_any_window (window)) ? Qt : Qnil; |
| 548 | } | 532 | } |
| @@ -550,8 +534,7 @@ WINDOW defaults to the selected window. */) | |||
| 550 | DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, | 534 | DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, |
| 551 | doc: /* Return the number of columns by which WINDOW is scrolled from left margin. | 535 | doc: /* Return the number of columns by which WINDOW is scrolled from left margin. |
| 552 | WINDOW defaults to the selected window. */) | 536 | WINDOW defaults to the selected window. */) |
| 553 | (window) | 537 | (Lisp_Object window) |
| 554 | Lisp_Object window; | ||
| 555 | { | 538 | { |
| 556 | return decode_window (window)->hscroll; | 539 | return decode_window (window)->hscroll; |
| 557 | } | 540 | } |
| @@ -562,8 +545,7 @@ Return NCOL. NCOL should be zero or positive. | |||
| 562 | 545 | ||
| 563 | Note that if `automatic-hscrolling' is non-nil, you cannot scroll the | 546 | Note that if `automatic-hscrolling' is non-nil, you cannot scroll the |
| 564 | window so that the location of point moves off-window. */) | 547 | window so that the location of point moves off-window. */) |
| 565 | (window, ncol) | 548 | (Lisp_Object window, Lisp_Object ncol) |
| 566 | Lisp_Object window, ncol; | ||
| 567 | { | 549 | { |
| 568 | struct window *w = decode_window (window); | 550 | struct window *w = decode_window (window); |
| 569 | int hscroll; | 551 | int hscroll; |
| @@ -584,8 +566,7 @@ DEFUN ("window-redisplay-end-trigger", Fwindow_redisplay_end_trigger, | |||
| 584 | doc: /* Return WINDOW's redisplay end trigger value. | 566 | doc: /* Return WINDOW's redisplay end trigger value. |
| 585 | WINDOW defaults to the selected window. | 567 | WINDOW defaults to the selected window. |
| 586 | See `set-window-redisplay-end-trigger' for more information. */) | 568 | See `set-window-redisplay-end-trigger' for more information. */) |
| 587 | (window) | 569 | (Lisp_Object window) |
| 588 | Lisp_Object window; | ||
| 589 | { | 570 | { |
| 590 | return decode_window (window)->redisplay_end_trigger; | 571 | return decode_window (window)->redisplay_end_trigger; |
| 591 | } | 572 | } |
| @@ -598,8 +579,7 @@ If it is a buffer position, then if redisplay in WINDOW reaches a position | |||
| 598 | beyond VALUE, the functions in `redisplay-end-trigger-functions' are called | 579 | beyond VALUE, the functions in `redisplay-end-trigger-functions' are called |
| 599 | with two arguments: WINDOW, and the end trigger value. | 580 | with two arguments: WINDOW, and the end trigger value. |
| 600 | Afterwards the end-trigger value is reset to nil. */) | 581 | Afterwards the end-trigger value is reset to nil. */) |
| 601 | (window, value) | 582 | (register Lisp_Object window, Lisp_Object value) |
| 602 | register Lisp_Object window, value; | ||
| 603 | { | 583 | { |
| 604 | register struct window *w; | 584 | register struct window *w; |
| 605 | 585 | ||
| @@ -619,8 +599,7 @@ BOTTOM is one more than the bottommost row occupied by WINDOW. | |||
| 619 | The edges include the space used by WINDOW's scroll bar, display | 599 | The edges include the space used by WINDOW's scroll bar, display |
| 620 | margins, fringes, header line, and/or mode line. For the edges of | 600 | margins, fringes, header line, and/or mode line. For the edges of |
| 621 | just the text area, use `window-inside-edges'. */) | 601 | just the text area, use `window-inside-edges'. */) |
| 622 | (window) | 602 | (Lisp_Object window) |
| 623 | Lisp_Object window; | ||
| 624 | { | 603 | { |
| 625 | register struct window *w = decode_any_window (window); | 604 | register struct window *w = decode_any_window (window); |
| 626 | 605 | ||
| @@ -641,8 +620,7 @@ BOTTOM is one more than the bottommost y position occupied by WINDOW. | |||
| 641 | The pixel edges include the space used by WINDOW's scroll bar, display | 620 | The pixel edges include the space used by WINDOW's scroll bar, display |
| 642 | margins, fringes, header line, and/or mode line. For the pixel edges | 621 | margins, fringes, header line, and/or mode line. For the pixel edges |
| 643 | of just the text area, use `window-inside-pixel-edges'. */) | 622 | of just the text area, use `window-inside-pixel-edges'. */) |
| 644 | (window) | 623 | (Lisp_Object window) |
| 645 | Lisp_Object window; | ||
| 646 | { | 624 | { |
| 647 | register struct window *w = decode_any_window (window); | 625 | register struct window *w = decode_any_window (window); |
| 648 | 626 | ||
| @@ -653,6 +631,52 @@ of just the text area, use `window-inside-pixel-edges'. */) | |||
| 653 | Qnil)))); | 631 | Qnil)))); |
| 654 | } | 632 | } |
| 655 | 633 | ||
| 634 | static void | ||
| 635 | calc_absolute_offset(struct window *w, int *add_x, int *add_y) | ||
| 636 | { | ||
| 637 | struct frame *f = XFRAME (w->frame); | ||
| 638 | *add_y = f->top_pos; | ||
| 639 | #ifdef FRAME_MENUBAR_HEIGHT | ||
| 640 | *add_y += FRAME_MENUBAR_HEIGHT (f); | ||
| 641 | #endif | ||
| 642 | #ifdef FRAME_TOOLBAR_TOP_HEIGHT | ||
| 643 | *add_y += FRAME_TOOLBAR_TOP_HEIGHT (f); | ||
| 644 | #elif FRAME_TOOLBAR_HEIGHT | ||
| 645 | *add_y += FRAME_TOOLBAR_HEIGHT (f); | ||
| 646 | #endif | ||
| 647 | #ifdef FRAME_NS_TITLEBAR_HEIGHT | ||
| 648 | *add_y += FRAME_NS_TITLEBAR_HEIGHT (f); | ||
| 649 | #endif | ||
| 650 | *add_x = f->left_pos; | ||
| 651 | #ifdef FRAME_TOOLBAR_LEFT_WIDTH | ||
| 652 | *add_x += FRAME_TOOLBAR_LEFT_WIDTH (f); | ||
| 653 | #endif | ||
| 654 | } | ||
| 655 | |||
| 656 | DEFUN ("window-absolute-pixel-edges", Fwindow_absolute_pixel_edges, | ||
| 657 | Swindow_absolute_pixel_edges, 0, 1, 0, | ||
| 658 | doc: /* Return a list of the edge pixel coordinates of WINDOW. | ||
| 659 | The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at | ||
| 660 | the top left corner of the display. | ||
| 661 | |||
| 662 | RIGHT is one more than the rightmost x position occupied by WINDOW. | ||
| 663 | BOTTOM is one more than the bottommost y position occupied by WINDOW. | ||
| 664 | The pixel edges include the space used by WINDOW's scroll bar, display | ||
| 665 | margins, fringes, header line, and/or mode line. For the pixel edges | ||
| 666 | of just the text area, use `window-inside-absolute-pixel-edges'. */) | ||
| 667 | (Lisp_Object window) | ||
| 668 | { | ||
| 669 | register struct window *w = decode_any_window (window); | ||
| 670 | int add_x, add_y; | ||
| 671 | calc_absolute_offset (w, &add_x, &add_y); | ||
| 672 | |||
| 673 | return Fcons (make_number (WINDOW_LEFT_EDGE_X (w) + add_x), | ||
| 674 | Fcons (make_number (WINDOW_TOP_EDGE_Y (w) + add_y), | ||
| 675 | Fcons (make_number (WINDOW_RIGHT_EDGE_X (w) + add_x), | ||
| 676 | Fcons (make_number (WINDOW_BOTTOM_EDGE_Y (w) + add_y), | ||
| 677 | Qnil)))); | ||
| 678 | } | ||
| 679 | |||
| 656 | DEFUN ("window-inside-edges", Fwindow_inside_edges, Swindow_inside_edges, 0, 1, 0, | 680 | DEFUN ("window-inside-edges", Fwindow_inside_edges, Swindow_inside_edges, 0, 1, 0, |
| 657 | doc: /* Return a list of the edge coordinates of WINDOW. | 681 | doc: /* Return a list of the edge coordinates of WINDOW. |
| 658 | The list has the form (LEFT TOP RIGHT BOTTOM). | 682 | The list has the form (LEFT TOP RIGHT BOTTOM). |
| @@ -663,8 +687,7 @@ RIGHT is one more than the rightmost column of WINDOW's text area. | |||
| 663 | BOTTOM is one more than the bottommost row of WINDOW's text area. | 687 | BOTTOM is one more than the bottommost row of WINDOW's text area. |
| 664 | The inside edges do not include the space used by the WINDOW's scroll | 688 | The inside edges do not include the space used by the WINDOW's scroll |
| 665 | bar, display margins, fringes, header line, and/or mode line. */) | 689 | bar, display margins, fringes, header line, and/or mode line. */) |
| 666 | (window) | 690 | (Lisp_Object window) |
| 667 | Lisp_Object window; | ||
| 668 | { | 691 | { |
| 669 | register struct window *w = decode_any_window (window); | 692 | register struct window *w = decode_any_window (window); |
| 670 | 693 | ||
| @@ -689,8 +712,7 @@ RIGHT is one more than the rightmost x position of WINDOW's text area. | |||
| 689 | BOTTOM is one more than the bottommost y position of WINDOW's text area. | 712 | BOTTOM is one more than the bottommost y position of WINDOW's text area. |
| 690 | The inside edges do not include the space used by WINDOW's scroll bar, | 713 | The inside edges do not include the space used by WINDOW's scroll bar, |
| 691 | display margins, fringes, header line, and/or mode line. */) | 714 | display margins, fringes, header line, and/or mode line. */) |
| 692 | (window) | 715 | (Lisp_Object window) |
| 693 | Lisp_Object window; | ||
| 694 | { | 716 | { |
| 695 | register struct window *w = decode_any_window (window); | 717 | register struct window *w = decode_any_window (window); |
| 696 | 718 | ||
| @@ -706,6 +728,35 @@ display margins, fringes, header line, and/or mode line. */) | |||
| 706 | - WINDOW_MODE_LINE_HEIGHT (w))); | 728 | - WINDOW_MODE_LINE_HEIGHT (w))); |
| 707 | } | 729 | } |
| 708 | 730 | ||
| 731 | DEFUN ("window-inside-absolute-pixel-edges", | ||
| 732 | Fwindow_inside_absolute_pixel_edges, | ||
| 733 | Swindow_inside_absolute_pixel_edges, 0, 1, 0, | ||
| 734 | doc: /* Return a list of the edge pixel coordinates of WINDOW. | ||
| 735 | The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at | ||
| 736 | the top left corner of the display. | ||
| 737 | |||
| 738 | RIGHT is one more than the rightmost x position of WINDOW's text area. | ||
| 739 | BOTTOM is one more than the bottommost y position of WINDOW's text area. | ||
| 740 | The inside edges do not include the space used by WINDOW's scroll bar, | ||
| 741 | display margins, fringes, header line, and/or mode line. */) | ||
| 742 | (Lisp_Object window) | ||
| 743 | { | ||
| 744 | register struct window *w = decode_any_window (window); | ||
| 745 | int add_x, add_y; | ||
| 746 | calc_absolute_offset (w, &add_x, &add_y); | ||
| 747 | |||
| 748 | return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) | ||
| 749 | + WINDOW_LEFT_MARGIN_WIDTH (w) | ||
| 750 | + WINDOW_LEFT_FRINGE_WIDTH (w) + add_x), | ||
| 751 | make_number (WINDOW_TOP_EDGE_Y (w) | ||
| 752 | + WINDOW_HEADER_LINE_HEIGHT (w) + add_y), | ||
| 753 | make_number (WINDOW_BOX_RIGHT_EDGE_X (w) | ||
| 754 | - WINDOW_RIGHT_MARGIN_WIDTH (w) | ||
| 755 | - WINDOW_RIGHT_FRINGE_WIDTH (w) + add_x), | ||
| 756 | make_number (WINDOW_BOTTOM_EDGE_Y (w) | ||
| 757 | - WINDOW_MODE_LINE_HEIGHT (w) + add_y)); | ||
| 758 | } | ||
| 759 | |||
| 709 | /* Test if the character at column *X, row *Y is within window W. | 760 | /* Test if the character at column *X, row *Y is within window W. |
| 710 | If it is not, return ON_NOTHING; | 761 | If it is not, return ON_NOTHING; |
| 711 | if it is in the window's text area, | 762 | if it is in the window's text area, |
| @@ -728,9 +779,7 @@ display margins, fringes, header line, and/or mode line. */) | |||
| 728 | X and Y are frame relative pixel coordinates. */ | 779 | X and Y are frame relative pixel coordinates. */ |
| 729 | 780 | ||
| 730 | static enum window_part | 781 | static enum window_part |
| 731 | coordinates_in_window (w, x, y) | 782 | coordinates_in_window (register struct window *w, register int *x, register int *y) |
| 732 | register struct window *w; | ||
| 733 | register int *x, *y; | ||
| 734 | { | 783 | { |
| 735 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 784 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 736 | int left_x, right_x, top_y, bottom_y; | 785 | int left_x, right_x, top_y, bottom_y; |
| @@ -935,8 +984,7 @@ If they are on the border between WINDOW and its right sibling, | |||
| 935 | `vertical-line' is returned. | 984 | `vertical-line' is returned. |
| 936 | If they are in the windows's left or right marginal areas, `left-margin'\n\ | 985 | If they are in the windows's left or right marginal areas, `left-margin'\n\ |
| 937 | or `right-margin' is returned. */) | 986 | or `right-margin' is returned. */) |
| 938 | (coordinates, window) | 987 | (register Lisp_Object coordinates, Lisp_Object window) |
| 939 | register Lisp_Object coordinates, window; | ||
| 940 | { | 988 | { |
| 941 | struct window *w; | 989 | struct window *w; |
| 942 | struct frame *f; | 990 | struct frame *f; |
| @@ -1013,9 +1061,7 @@ struct check_window_data | |||
| 1013 | }; | 1061 | }; |
| 1014 | 1062 | ||
| 1015 | static int | 1063 | static int |
| 1016 | check_window_containing (w, user_data) | 1064 | check_window_containing (struct window *w, void *user_data) |
| 1017 | struct window *w; | ||
| 1018 | void *user_data; | ||
| 1019 | { | 1065 | { |
| 1020 | struct check_window_data *cw = (struct check_window_data *) user_data; | 1066 | struct check_window_data *cw = (struct check_window_data *) user_data; |
| 1021 | enum window_part found; | 1067 | enum window_part found; |
| @@ -1053,12 +1099,7 @@ check_window_containing (w, user_data) | |||
| 1053 | case. */ | 1099 | case. */ |
| 1054 | 1100 | ||
| 1055 | Lisp_Object | 1101 | Lisp_Object |
| 1056 | window_from_coordinates (f, x, y, part, wx, wy, tool_bar_p) | 1102 | window_from_coordinates (struct frame *f, int x, int y, enum window_part *part, int *wx, int *wy, int tool_bar_p) |
| 1057 | struct frame *f; | ||
| 1058 | int x, y; | ||
| 1059 | enum window_part *part; | ||
| 1060 | int *wx, *wy; | ||
| 1061 | int tool_bar_p; | ||
| 1062 | { | 1103 | { |
| 1063 | Lisp_Object window; | 1104 | Lisp_Object window; |
| 1064 | struct check_window_data cw; | 1105 | struct check_window_data cw; |
| @@ -1095,8 +1136,7 @@ DEFUN ("window-at", Fwindow_at, Swindow_at, 2, 3, 0, | |||
| 1095 | If omitted, FRAME defaults to the currently selected frame. | 1136 | If omitted, FRAME defaults to the currently selected frame. |
| 1096 | The top left corner of the frame is considered to be row 0, | 1137 | The top left corner of the frame is considered to be row 0, |
| 1097 | column 0. */) | 1138 | column 0. */) |
| 1098 | (x, y, frame) | 1139 | (Lisp_Object x, Lisp_Object y, Lisp_Object frame) |
| 1099 | Lisp_Object x, y, frame; | ||
| 1100 | { | 1140 | { |
| 1101 | struct frame *f; | 1141 | struct frame *f; |
| 1102 | 1142 | ||
| @@ -1129,8 +1169,7 @@ is also currently selected, the value returned is the same as (point). | |||
| 1129 | It would be more strictly correct to return the `top-level' value | 1169 | It would be more strictly correct to return the `top-level' value |
| 1130 | of point, outside of any save-excursion forms. | 1170 | of point, outside of any save-excursion forms. |
| 1131 | But that is hard to define. */) | 1171 | But that is hard to define. */) |
| 1132 | (window) | 1172 | (Lisp_Object window) |
| 1133 | Lisp_Object window; | ||
| 1134 | { | 1173 | { |
| 1135 | register struct window *w = decode_window (window); | 1174 | register struct window *w = decode_window (window); |
| 1136 | 1175 | ||
| @@ -1144,8 +1183,7 @@ DEFUN ("window-start", Fwindow_start, Swindow_start, 0, 1, 0, | |||
| 1144 | doc: /* Return position at which display currently starts in WINDOW. | 1183 | doc: /* Return position at which display currently starts in WINDOW. |
| 1145 | WINDOW defaults to the selected window. | 1184 | WINDOW defaults to the selected window. |
| 1146 | This is updated by redisplay or by calling `set-window-start'. */) | 1185 | This is updated by redisplay or by calling `set-window-start'. */) |
| 1147 | (window) | 1186 | (Lisp_Object window) |
| 1148 | Lisp_Object window; | ||
| 1149 | { | 1187 | { |
| 1150 | return Fmarker_position (decode_window (window)->start); | 1188 | return Fmarker_position (decode_window (window)->start); |
| 1151 | } | 1189 | } |
| @@ -1171,8 +1209,7 @@ Return nil if there is no recorded value. \(This can happen if the | |||
| 1171 | last redisplay of WINDOW was preempted, and did not finish.) | 1209 | last redisplay of WINDOW was preempted, and did not finish.) |
| 1172 | If UPDATE is non-nil, compute the up-to-date position | 1210 | If UPDATE is non-nil, compute the up-to-date position |
| 1173 | if it isn't already recorded. */) | 1211 | if it isn't already recorded. */) |
| 1174 | (window, update) | 1212 | (Lisp_Object window, Lisp_Object update) |
| 1175 | Lisp_Object window, update; | ||
| 1176 | { | 1213 | { |
| 1177 | Lisp_Object value; | 1214 | Lisp_Object value; |
| 1178 | struct window *w = decode_window (window); | 1215 | struct window *w = decode_window (window); |
| @@ -1240,8 +1277,7 @@ if it isn't already recorded. */) | |||
| 1240 | DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, | 1277 | DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, |
| 1241 | doc: /* Make point value in WINDOW be at position POS in WINDOW's buffer. | 1278 | doc: /* Make point value in WINDOW be at position POS in WINDOW's buffer. |
| 1242 | Return POS. */) | 1279 | Return POS. */) |
| 1243 | (window, pos) | 1280 | (Lisp_Object window, Lisp_Object pos) |
| 1244 | Lisp_Object window, pos; | ||
| 1245 | { | 1281 | { |
| 1246 | register struct window *w = decode_window (window); | 1282 | register struct window *w = decode_window (window); |
| 1247 | 1283 | ||
| @@ -1265,8 +1301,7 @@ DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0, | |||
| 1265 | WINDOW defaults to the selected window. Return POS. | 1301 | WINDOW defaults to the selected window. Return POS. |
| 1266 | Optional third arg NOFORCE non-nil inhibits next redisplay from | 1302 | Optional third arg NOFORCE non-nil inhibits next redisplay from |
| 1267 | overriding motion of point in order to display at this exact start. */) | 1303 | overriding motion of point in order to display at this exact start. */) |
| 1268 | (window, pos, noforce) | 1304 | (Lisp_Object window, Lisp_Object pos, Lisp_Object noforce) |
| 1269 | Lisp_Object window, pos, noforce; | ||
| 1270 | { | 1305 | { |
| 1271 | register struct window *w = decode_window (window); | 1306 | register struct window *w = decode_window (window); |
| 1272 | 1307 | ||
| @@ -1304,8 +1339,7 @@ from displaying another buffer in it. `get-lru-window' and | |||
| 1304 | Functions like `set-window-buffer' may change the buffer displayed by a | 1339 | Functions like `set-window-buffer' may change the buffer displayed by a |
| 1305 | window, unless that window is "strongly" dedicated to its buffer, that | 1340 | window, unless that window is "strongly" dedicated to its buffer, that |
| 1306 | is the value returned by `window-dedicated-p' is t. */) | 1341 | is the value returned by `window-dedicated-p' is t. */) |
| 1307 | (window) | 1342 | (Lisp_Object window) |
| 1308 | Lisp_Object window; | ||
| 1309 | { | 1343 | { |
| 1310 | return decode_window (window)->dedicated; | 1344 | return decode_window (window)->dedicated; |
| 1311 | } | 1345 | } |
| @@ -1329,8 +1363,7 @@ its buffer. Functions like `set-window-buffer' may change the buffer | |||
| 1329 | displayed by a window, unless that window is strongly dedicated to its | 1363 | displayed by a window, unless that window is strongly dedicated to its |
| 1330 | buffer. If and when `set-window-buffer' displays another buffer in a | 1364 | buffer. If and when `set-window-buffer' displays another buffer in a |
| 1331 | window, it also makes sure that the window is not marked as dedicated. */) | 1365 | window, it also makes sure that the window is not marked as dedicated. */) |
| 1332 | (window, flag) | 1366 | (Lisp_Object window, Lisp_Object flag) |
| 1333 | Lisp_Object window, flag; | ||
| 1334 | { | 1367 | { |
| 1335 | register struct window *w = decode_window (window); | 1368 | register struct window *w = decode_window (window); |
| 1336 | 1369 | ||
| @@ -1344,8 +1377,7 @@ DEFUN ("window-parameters", Fwindow_parameters, Swindow_parameters, | |||
| 1344 | doc: /* Return the parameters of WINDOW and their values. | 1377 | doc: /* Return the parameters of WINDOW and their values. |
| 1345 | WINDOW defaults to the selected window. The return value is a list of | 1378 | WINDOW defaults to the selected window. The return value is a list of |
| 1346 | elements of the form (PARAMETER . VALUE). */) | 1379 | elements of the form (PARAMETER . VALUE). */) |
| 1347 | (window) | 1380 | (Lisp_Object window) |
| 1348 | Lisp_Object window; | ||
| 1349 | { | 1381 | { |
| 1350 | return Fcopy_alist (decode_window (window)->window_parameters); | 1382 | return Fcopy_alist (decode_window (window)->window_parameters); |
| 1351 | } | 1383 | } |
| @@ -1354,8 +1386,7 @@ DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter, | |||
| 1354 | 2, 2, 0, | 1386 | 2, 2, 0, |
| 1355 | doc: /* Return WINDOW's value for PARAMETER. | 1387 | doc: /* Return WINDOW's value for PARAMETER. |
| 1356 | WINDOW defaults to the selected window. */) | 1388 | WINDOW defaults to the selected window. */) |
| 1357 | (window, parameter) | 1389 | (Lisp_Object window, Lisp_Object parameter) |
| 1358 | Lisp_Object window, parameter; | ||
| 1359 | { | 1390 | { |
| 1360 | Lisp_Object result; | 1391 | Lisp_Object result; |
| 1361 | 1392 | ||
| @@ -1367,8 +1398,7 @@ DEFUN ("set-window-parameter", Fset_window_parameter, | |||
| 1367 | Sset_window_parameter, 3, 3, 0, | 1398 | Sset_window_parameter, 3, 3, 0, |
| 1368 | doc: /* Set WINDOW's value of PARAMETER to VALUE. | 1399 | doc: /* Set WINDOW's value of PARAMETER to VALUE. |
| 1369 | WINDOW defaults to the selected window. Return VALUE. */) | 1400 | WINDOW defaults to the selected window. Return VALUE. */) |
| 1370 | (window, parameter, value) | 1401 | (Lisp_Object window, Lisp_Object parameter, Lisp_Object value) |
| 1371 | Lisp_Object window, parameter, value; | ||
| 1372 | { | 1402 | { |
| 1373 | register struct window *w = decode_window (window); | 1403 | register struct window *w = decode_window (window); |
| 1374 | Lisp_Object old_alist_elt; | 1404 | Lisp_Object old_alist_elt; |
| @@ -1386,8 +1416,7 @@ DEFUN ("window-display-table", Fwindow_display_table, Swindow_display_table, | |||
| 1386 | 0, 1, 0, | 1416 | 0, 1, 0, |
| 1387 | doc: /* Return the display-table that WINDOW is using. | 1417 | doc: /* Return the display-table that WINDOW is using. |
| 1388 | WINDOW defaults to the selected window. */) | 1418 | WINDOW defaults to the selected window. */) |
| 1389 | (window) | 1419 | (Lisp_Object window) |
| 1390 | Lisp_Object window; | ||
| 1391 | { | 1420 | { |
| 1392 | return decode_window (window)->display_table; | 1421 | return decode_window (window)->display_table; |
| 1393 | } | 1422 | } |
| @@ -1398,8 +1427,7 @@ WINDOW defaults to the selected window. */) | |||
| 1398 | return 0. */ | 1427 | return 0. */ |
| 1399 | 1428 | ||
| 1400 | struct Lisp_Char_Table * | 1429 | struct Lisp_Char_Table * |
| 1401 | window_display_table (w) | 1430 | window_display_table (struct window *w) |
| 1402 | struct window *w; | ||
| 1403 | { | 1431 | { |
| 1404 | struct Lisp_Char_Table *dp = NULL; | 1432 | struct Lisp_Char_Table *dp = NULL; |
| 1405 | 1433 | ||
| @@ -1420,8 +1448,7 @@ window_display_table (w) | |||
| 1420 | 1448 | ||
| 1421 | DEFUN ("set-window-display-table", Fset_window_display_table, Sset_window_display_table, 2, 2, 0, | 1449 | DEFUN ("set-window-display-table", Fset_window_display_table, Sset_window_display_table, 2, 2, 0, |
| 1422 | doc: /* Set WINDOW's display-table to TABLE. */) | 1450 | doc: /* Set WINDOW's display-table to TABLE. */) |
| 1423 | (window, table) | 1451 | (register Lisp_Object window, Lisp_Object table) |
| 1424 | register Lisp_Object window, table; | ||
| 1425 | { | 1452 | { |
| 1426 | register struct window *w; | 1453 | register struct window *w; |
| 1427 | 1454 | ||
| @@ -1433,8 +1460,7 @@ DEFUN ("set-window-display-table", Fset_window_display_table, Sset_window_displa | |||
| 1433 | /* Record info on buffer window w is displaying | 1460 | /* Record info on buffer window w is displaying |
| 1434 | when it is about to cease to display that buffer. */ | 1461 | when it is about to cease to display that buffer. */ |
| 1435 | static void | 1462 | static void |
| 1436 | unshow_buffer (w) | 1463 | unshow_buffer (register struct window *w) |
| 1437 | register struct window *w; | ||
| 1438 | { | 1464 | { |
| 1439 | Lisp_Object buf; | 1465 | Lisp_Object buf; |
| 1440 | struct buffer *b; | 1466 | struct buffer *b; |
| @@ -1482,8 +1508,7 @@ unshow_buffer (w) | |||
| 1482 | 1508 | ||
| 1483 | /* Put replacement into the window structure in place of old. */ | 1509 | /* Put replacement into the window structure in place of old. */ |
| 1484 | static void | 1510 | static void |
| 1485 | replace_window (old, replacement) | 1511 | replace_window (Lisp_Object old, Lisp_Object replacement) |
| 1486 | Lisp_Object old, replacement; | ||
| 1487 | { | 1512 | { |
| 1488 | register Lisp_Object tem; | 1513 | register Lisp_Object tem; |
| 1489 | register struct window *o = XWINDOW (old), *p = XWINDOW (replacement); | 1514 | register struct window *o = XWINDOW (old), *p = XWINDOW (replacement); |
| @@ -1500,9 +1525,9 @@ replace_window (old, replacement) | |||
| 1500 | p->total_lines = o->total_lines; | 1525 | p->total_lines = o->total_lines; |
| 1501 | p->desired_matrix = p->current_matrix = 0; | 1526 | p->desired_matrix = p->current_matrix = 0; |
| 1502 | p->vscroll = 0; | 1527 | p->vscroll = 0; |
| 1503 | bzero (&p->cursor, sizeof (p->cursor)); | 1528 | memset (&p->cursor, 0, sizeof (p->cursor)); |
| 1504 | bzero (&p->last_cursor, sizeof (p->last_cursor)); | 1529 | memset (&p->last_cursor, 0, sizeof (p->last_cursor)); |
| 1505 | bzero (&p->phys_cursor, sizeof (p->phys_cursor)); | 1530 | memset (&p->phys_cursor, 0, sizeof (p->phys_cursor)); |
| 1506 | p->phys_cursor_type = -1; | 1531 | p->phys_cursor_type = -1; |
| 1507 | p->phys_cursor_width = -1; | 1532 | p->phys_cursor_width = -1; |
| 1508 | p->must_be_updated_p = 0; | 1533 | p->must_be_updated_p = 0; |
| @@ -1539,8 +1564,7 @@ DEFUN ("delete-window", Fdelete_window, Sdelete_window, 0, 1, "", | |||
| 1539 | doc: /* Remove WINDOW from its frame. | 1564 | doc: /* Remove WINDOW from its frame. |
| 1540 | WINDOW defaults to the selected window. Return nil. | 1565 | WINDOW defaults to the selected window. Return nil. |
| 1541 | Signal an error when WINDOW is the only window on its frame. */) | 1566 | Signal an error when WINDOW is the only window on its frame. */) |
| 1542 | (window) | 1567 | (register Lisp_Object window) |
| 1543 | register Lisp_Object window; | ||
| 1544 | { | 1568 | { |
| 1545 | struct frame *f; | 1569 | struct frame *f; |
| 1546 | if (NILP (window)) | 1570 | if (NILP (window)) |
| @@ -1557,8 +1581,7 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 1557 | } | 1581 | } |
| 1558 | 1582 | ||
| 1559 | void | 1583 | void |
| 1560 | delete_window (window) | 1584 | delete_window (register Lisp_Object window) |
| 1561 | register Lisp_Object window; | ||
| 1562 | { | 1585 | { |
| 1563 | register Lisp_Object tem, parent, sib; | 1586 | register Lisp_Object tem, parent, sib; |
| 1564 | register struct window *p; | 1587 | register struct window *p; |
| @@ -1772,9 +1795,7 @@ delete_window (window) | |||
| 1772 | function window_list. */ | 1795 | function window_list. */ |
| 1773 | 1796 | ||
| 1774 | static int | 1797 | static int |
| 1775 | add_window_to_list (w, user_data) | 1798 | add_window_to_list (struct window *w, void *user_data) |
| 1776 | struct window *w; | ||
| 1777 | void *user_data; | ||
| 1778 | { | 1799 | { |
| 1779 | Lisp_Object *list = (Lisp_Object *) user_data; | 1800 | Lisp_Object *list = (Lisp_Object *) user_data; |
| 1780 | Lisp_Object window; | 1801 | Lisp_Object window; |
| @@ -1789,7 +1810,7 @@ add_window_to_list (w, user_data) | |||
| 1789 | list, cache it in Vwindow_list, and return that. */ | 1810 | list, cache it in Vwindow_list, and return that. */ |
| 1790 | 1811 | ||
| 1791 | static Lisp_Object | 1812 | static Lisp_Object |
| 1792 | window_list () | 1813 | window_list (void) |
| 1793 | { | 1814 | { |
| 1794 | if (!CONSP (Vwindow_list)) | 1815 | if (!CONSP (Vwindow_list)) |
| 1795 | { | 1816 | { |
| @@ -1830,8 +1851,7 @@ window_list () | |||
| 1830 | a frame means consider windows on that frame, only. */ | 1851 | a frame means consider windows on that frame, only. */ |
| 1831 | 1852 | ||
| 1832 | static int | 1853 | static int |
| 1833 | candidate_window_p (window, owindow, minibuf, all_frames) | 1854 | candidate_window_p (Lisp_Object window, Lisp_Object owindow, Lisp_Object minibuf, Lisp_Object all_frames) |
| 1834 | Lisp_Object window, owindow, minibuf, all_frames; | ||
| 1835 | { | 1855 | { |
| 1836 | struct window *w = XWINDOW (window); | 1856 | struct window *w = XWINDOW (window); |
| 1837 | struct frame *f = XFRAME (w->frame); | 1857 | struct frame *f = XFRAME (w->frame); |
| @@ -1896,8 +1916,7 @@ candidate_window_p (window, owindow, minibuf, all_frames) | |||
| 1896 | ALL_FRAMES. */ | 1916 | ALL_FRAMES. */ |
| 1897 | 1917 | ||
| 1898 | static void | 1918 | static void |
| 1899 | decode_next_window_args (window, minibuf, all_frames) | 1919 | decode_next_window_args (Lisp_Object *window, Lisp_Object *minibuf, Lisp_Object *all_frames) |
| 1900 | Lisp_Object *window, *minibuf, *all_frames; | ||
| 1901 | { | 1920 | { |
| 1902 | if (NILP (*window)) | 1921 | if (NILP (*window)) |
| 1903 | *window = selected_window; | 1922 | *window = selected_window; |
| @@ -1943,9 +1962,7 @@ decode_next_window_args (window, minibuf, all_frames) | |||
| 1943 | ALL_FRAMES. */ | 1962 | ALL_FRAMES. */ |
| 1944 | 1963 | ||
| 1945 | static Lisp_Object | 1964 | static Lisp_Object |
| 1946 | next_window (window, minibuf, all_frames, next_p) | 1965 | next_window (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames, int next_p) |
| 1947 | Lisp_Object window, minibuf, all_frames; | ||
| 1948 | int next_p; | ||
| 1949 | { | 1966 | { |
| 1950 | decode_next_window_args (&window, &minibuf, &all_frames); | 1967 | decode_next_window_args (&window, &minibuf, &all_frames); |
| 1951 | 1968 | ||
| @@ -2044,8 +2061,7 @@ If you use consistent values for MINIBUF and ALL-FRAMES, you can use | |||
| 2044 | `next-window' to iterate through the entire cycle of acceptable | 2061 | `next-window' to iterate through the entire cycle of acceptable |
| 2045 | windows, eventually ending up back at the window you started with. | 2062 | windows, eventually ending up back at the window you started with. |
| 2046 | `previous-window' traverses the same cycle, in the reverse order. */) | 2063 | `previous-window' traverses the same cycle, in the reverse order. */) |
| 2047 | (window, minibuf, all_frames) | 2064 | (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames) |
| 2048 | Lisp_Object window, minibuf, all_frames; | ||
| 2049 | { | 2065 | { |
| 2050 | return next_window (window, minibuf, all_frames, 1); | 2066 | return next_window (window, minibuf, all_frames, 1); |
| 2051 | } | 2067 | } |
| @@ -2062,8 +2078,7 @@ use `previous-window' to iterate through the entire cycle of | |||
| 2062 | acceptable windows, eventually ending up back at the window you | 2078 | acceptable windows, eventually ending up back at the window you |
| 2063 | started with. `next-window' traverses the same cycle, in the | 2079 | started with. `next-window' traverses the same cycle, in the |
| 2064 | reverse order. */) | 2080 | reverse order. */) |
| 2065 | (window, minibuf, all_frames) | 2081 | (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames) |
| 2066 | Lisp_Object window, minibuf, all_frames; | ||
| 2067 | { | 2082 | { |
| 2068 | return next_window (window, minibuf, all_frames, 0); | 2083 | return next_window (window, minibuf, all_frames, 0); |
| 2069 | } | 2084 | } |
| @@ -2082,8 +2097,7 @@ This function uses `next-window' for finding the window to select. | |||
| 2082 | The argument ALL-FRAMES has the same meaning as in `next-window', | 2097 | The argument ALL-FRAMES has the same meaning as in `next-window', |
| 2083 | but the MINIBUF argument of `next-window' is always effectively | 2098 | but the MINIBUF argument of `next-window' is always effectively |
| 2084 | nil. */) | 2099 | nil. */) |
| 2085 | (count, all_frames) | 2100 | (Lisp_Object count, Lisp_Object all_frames) |
| 2086 | Lisp_Object count, all_frames; | ||
| 2087 | { | 2101 | { |
| 2088 | Lisp_Object window; | 2102 | Lisp_Object window; |
| 2089 | int i; | 2103 | int i; |
| @@ -2109,8 +2123,7 @@ MINIBUF t means include the minibuffer window, even if it isn't active. | |||
| 2109 | MINIBUF nil or omitted means include the minibuffer window only | 2123 | MINIBUF nil or omitted means include the minibuffer window only |
| 2110 | if it's active. | 2124 | if it's active. |
| 2111 | MINIBUF neither nil nor t means never include the minibuffer window. */) | 2125 | MINIBUF neither nil nor t means never include the minibuffer window. */) |
| 2112 | (frame, minibuf, window) | 2126 | (Lisp_Object frame, Lisp_Object minibuf, Lisp_Object window) |
| 2113 | Lisp_Object frame, minibuf, window; | ||
| 2114 | { | 2127 | { |
| 2115 | if (NILP (window)) | 2128 | if (NILP (window)) |
| 2116 | window = FRAMEP (frame) ? XFRAME (frame)->selected_window : selected_window; | 2129 | window = FRAMEP (frame) ? XFRAME (frame)->selected_window : selected_window; |
| @@ -2129,8 +2142,7 @@ MINIBUF neither nil nor t means never include the minibuffer window. */) | |||
| 2129 | for `next-window'. */ | 2142 | for `next-window'. */ |
| 2130 | 2143 | ||
| 2131 | static Lisp_Object | 2144 | static Lisp_Object |
| 2132 | window_list_1 (window, minibuf, all_frames) | 2145 | window_list_1 (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames) |
| 2133 | Lisp_Object window, minibuf, all_frames; | ||
| 2134 | { | 2146 | { |
| 2135 | Lisp_Object tail, list, rest; | 2147 | Lisp_Object tail, list, rest; |
| 2136 | 2148 | ||
| @@ -2178,10 +2190,7 @@ enum window_loop | |||
| 2178 | }; | 2190 | }; |
| 2179 | 2191 | ||
| 2180 | static Lisp_Object | 2192 | static Lisp_Object |
| 2181 | window_loop (type, obj, mini, frames) | 2193 | window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frames) |
| 2182 | enum window_loop type; | ||
| 2183 | Lisp_Object obj, frames; | ||
| 2184 | int mini; | ||
| 2185 | { | 2194 | { |
| 2186 | Lisp_Object window, windows, best_window, frame_arg; | 2195 | Lisp_Object window, windows, best_window, frame_arg; |
| 2187 | struct frame *f; | 2196 | struct frame *f; |
| @@ -2408,7 +2417,7 @@ window_loop (type, obj, mini, frames) | |||
| 2408 | /* Used for debugging. Abort if any window has a dead buffer. */ | 2417 | /* Used for debugging. Abort if any window has a dead buffer. */ |
| 2409 | 2418 | ||
| 2410 | void | 2419 | void |
| 2411 | check_all_windows () | 2420 | check_all_windows (void) |
| 2412 | { | 2421 | { |
| 2413 | window_loop (CHECK_ALL_WINDOWS, Qnil, 1, Qt); | 2422 | window_loop (CHECK_ALL_WINDOWS, Qnil, 1, Qt); |
| 2414 | } | 2423 | } |
| @@ -2426,8 +2435,7 @@ If FRAME is 0, search all visible and iconified frames. | |||
| 2426 | If FRAME is t, search all frames. | 2435 | If FRAME is t, search all frames. |
| 2427 | If FRAME is nil, search only the selected frame. | 2436 | If FRAME is nil, search only the selected frame. |
| 2428 | If FRAME is a frame, search only that frame. */) | 2437 | If FRAME is a frame, search only that frame. */) |
| 2429 | (frame, dedicated) | 2438 | (Lisp_Object frame, Lisp_Object dedicated) |
| 2430 | Lisp_Object frame, dedicated; | ||
| 2431 | { | 2439 | { |
| 2432 | register Lisp_Object w; | 2440 | register Lisp_Object w; |
| 2433 | /* First try for a window that is full-width */ | 2441 | /* First try for a window that is full-width */ |
| @@ -2452,8 +2460,7 @@ If FRAME is 0, search all visible and iconified frames. | |||
| 2452 | If FRAME is t, search all frames. | 2460 | If FRAME is t, search all frames. |
| 2453 | If FRAME is nil, search only the selected frame. | 2461 | If FRAME is nil, search only the selected frame. |
| 2454 | If FRAME is a frame, search only that frame. */) | 2462 | If FRAME is a frame, search only that frame. */) |
| 2455 | (frame, dedicated) | 2463 | (Lisp_Object frame, Lisp_Object dedicated) |
| 2456 | Lisp_Object frame, dedicated; | ||
| 2457 | { | 2464 | { |
| 2458 | return window_loop (GET_LARGEST_WINDOW, dedicated, 0, | 2465 | return window_loop (GET_LARGEST_WINDOW, dedicated, 0, |
| 2459 | frame); | 2466 | frame); |
| @@ -2468,8 +2475,7 @@ If optional argument FRAME is 0, search all visible and iconified frames. | |||
| 2468 | If FRAME is t, search all frames. | 2475 | If FRAME is t, search all frames. |
| 2469 | If FRAME is nil, search only the selected frame. | 2476 | If FRAME is nil, search only the selected frame. |
| 2470 | If FRAME is a frame, search only that frame. */) | 2477 | If FRAME is a frame, search only that frame. */) |
| 2471 | (buffer_or_name, frame) | 2478 | (Lisp_Object buffer_or_name, Lisp_Object frame) |
| 2472 | Lisp_Object buffer_or_name, frame; | ||
| 2473 | { | 2479 | { |
| 2474 | Lisp_Object buffer; | 2480 | Lisp_Object buffer; |
| 2475 | 2481 | ||
| @@ -2493,8 +2499,7 @@ previously visible in WINDOW in the same place on the frame. Doing this | |||
| 2493 | depends on the value of (window-start WINDOW), so if calling this | 2499 | depends on the value of (window-start WINDOW), so if calling this |
| 2494 | function in a program gives strange scrolling, make sure the | 2500 | function in a program gives strange scrolling, make sure the |
| 2495 | window-start value is reasonable when this function is called. */) | 2501 | window-start value is reasonable when this function is called. */) |
| 2496 | (window) | 2502 | (Lisp_Object window) |
| 2497 | Lisp_Object window; | ||
| 2498 | { | 2503 | { |
| 2499 | struct window *w; | 2504 | struct window *w; |
| 2500 | int startpos; | 2505 | int startpos; |
| @@ -2561,8 +2566,7 @@ If FRAME is t, search only the selected frame. | |||
| 2561 | If FRAME is a frame, search only that frame. | 2566 | If FRAME is a frame, search only that frame. |
| 2562 | When a window showing BUFFER-OR-NAME is dedicated and the only window of | 2567 | When a window showing BUFFER-OR-NAME is dedicated and the only window of |
| 2563 | its frame, that frame is deleted when there are other frames left. */) | 2568 | its frame, that frame is deleted when there are other frames left. */) |
| 2564 | (buffer_or_name, frame) | 2569 | (Lisp_Object buffer_or_name, Lisp_Object frame) |
| 2565 | Lisp_Object buffer_or_name, frame; | ||
| 2566 | { | 2570 | { |
| 2567 | Lisp_Object buffer; | 2571 | Lisp_Object buffer; |
| 2568 | 2572 | ||
| @@ -2597,8 +2601,7 @@ When a window showing BUFFER-OR-NAME is dedicated that window is | |||
| 2597 | deleted. If that window is the only window on its frame, that frame is | 2601 | deleted. If that window is the only window on its frame, that frame is |
| 2598 | deleted too when there are other frames left. If there are no other | 2602 | deleted too when there are other frames left. If there are no other |
| 2599 | frames left, some other buffer is displayed in that window. */) | 2603 | frames left, some other buffer is displayed in that window. */) |
| 2600 | (buffer_or_name) | 2604 | (Lisp_Object buffer_or_name) |
| 2601 | Lisp_Object buffer_or_name; | ||
| 2602 | { | 2605 | { |
| 2603 | Lisp_Object buffer; | 2606 | Lisp_Object buffer; |
| 2604 | 2607 | ||
| @@ -2619,8 +2622,7 @@ frames left, some other buffer is displayed in that window. */) | |||
| 2619 | of all frames, even those on other keyboards. */ | 2622 | of all frames, even those on other keyboards. */ |
| 2620 | 2623 | ||
| 2621 | void | 2624 | void |
| 2622 | replace_buffer_in_all_windows (buffer) | 2625 | replace_buffer_in_all_windows (Lisp_Object buffer) |
| 2623 | Lisp_Object buffer; | ||
| 2624 | { | 2626 | { |
| 2625 | Lisp_Object tail, frame; | 2627 | Lisp_Object tail, frame; |
| 2626 | 2628 | ||
| @@ -2649,9 +2651,7 @@ replace_buffer_in_all_windows (buffer) | |||
| 2649 | minimum allowable size. */ | 2651 | minimum allowable size. */ |
| 2650 | 2652 | ||
| 2651 | void | 2653 | void |
| 2652 | check_frame_size (frame, rows, cols) | 2654 | check_frame_size (FRAME_PTR frame, int *rows, int *cols) |
| 2653 | FRAME_PTR frame; | ||
| 2654 | int *rows, *cols; | ||
| 2655 | { | 2655 | { |
| 2656 | /* For height, we have to see: | 2656 | /* For height, we have to see: |
| 2657 | how many windows the frame has at minimum (one or two), | 2657 | how many windows the frame has at minimum (one or two), |
| @@ -2677,9 +2677,7 @@ check_frame_size (frame, rows, cols) | |||
| 2677 | either. */ | 2677 | either. */ |
| 2678 | 2678 | ||
| 2679 | static int | 2679 | static int |
| 2680 | window_fixed_size_p (w, width_p, check_siblings_p) | 2680 | window_fixed_size_p (struct window *w, int width_p, int check_siblings_p) |
| 2681 | struct window *w; | ||
| 2682 | int width_p, check_siblings_p; | ||
| 2683 | { | 2681 | { |
| 2684 | int fixed_p; | 2682 | int fixed_p; |
| 2685 | struct window *c; | 2683 | struct window *c; |
| @@ -2779,9 +2777,7 @@ window_fixed_size_p (w, width_p, check_siblings_p) | |||
| 2779 | minibuffer window, always return 1. */ | 2777 | minibuffer window, always return 1. */ |
| 2780 | 2778 | ||
| 2781 | static int | 2779 | static int |
| 2782 | window_min_size_2 (w, width_p, safe_p) | 2780 | window_min_size_2 (struct window *w, int width_p, int safe_p) |
| 2783 | struct window *w; | ||
| 2784 | int width_p, safe_p; | ||
| 2785 | { | 2781 | { |
| 2786 | /* We should consider buffer-local values of window_min_height and | 2782 | /* We should consider buffer-local values of window_min_height and |
| 2787 | window_min_width here. */ | 2783 | window_min_width here. */ |
| @@ -2815,9 +2811,7 @@ window_min_size_2 (w, width_p, safe_p) | |||
| 2815 | sizes of W's children. */ | 2811 | sizes of W's children. */ |
| 2816 | 2812 | ||
| 2817 | static int | 2813 | static int |
| 2818 | window_min_size_1 (w, width_p, safe_p) | 2814 | window_min_size_1 (struct window *w, int width_p, int safe_p) |
| 2819 | struct window *w; | ||
| 2820 | int width_p, safe_p; | ||
| 2821 | { | 2815 | { |
| 2822 | struct window *c; | 2816 | struct window *c; |
| 2823 | int size; | 2817 | int size; |
| @@ -2892,9 +2886,7 @@ window_min_size_1 (w, width_p, safe_p) | |||
| 2892 | to 1 if W is fixed-size unless FIXED is null. */ | 2886 | to 1 if W is fixed-size unless FIXED is null. */ |
| 2893 | 2887 | ||
| 2894 | static int | 2888 | static int |
| 2895 | window_min_size (w, width_p, safe_p, ignore_fixed_p, fixed) | 2889 | window_min_size (struct window *w, int width_p, int safe_p, int ignore_fixed_p, int *fixed) |
| 2896 | struct window *w; | ||
| 2897 | int width_p, safe_p, ignore_fixed_p, *fixed; | ||
| 2898 | { | 2890 | { |
| 2899 | int size, fixed_p; | 2891 | int size, fixed_p; |
| 2900 | 2892 | ||
| @@ -2920,8 +2912,7 @@ window_min_size (w, width_p, safe_p, ignore_fixed_p, fixed) | |||
| 2920 | is still too narrow. */ | 2912 | is still too narrow. */ |
| 2921 | 2913 | ||
| 2922 | static int | 2914 | static int |
| 2923 | adjust_window_margins (w) | 2915 | adjust_window_margins (struct window *w) |
| 2924 | struct window *w; | ||
| 2925 | { | 2916 | { |
| 2926 | int box_cols = (WINDOW_TOTAL_COLS (w) | 2917 | int box_cols = (WINDOW_TOTAL_COLS (w) |
| 2927 | - WINDOW_FRINGE_COLS (w) | 2918 | - WINDOW_FRINGE_COLS (w) |
| @@ -2975,11 +2966,8 @@ adjust_window_margins (w) | |||
| 2975 | a specific window, it will attempt to strictly resize that window | 2966 | a specific window, it will attempt to strictly resize that window |
| 2976 | proportionally, even at the expense of deleting smaller windows. */ | 2967 | proportionally, even at the expense of deleting smaller windows. */ |
| 2977 | static int * | 2968 | static int * |
| 2978 | shrink_windows (total, size, nchildren, shrinkable, resize_fixed_p, | 2969 | shrink_windows (int total, int size, int nchildren, int shrinkable, |
| 2979 | forward, width_p, safe_p) | 2970 | int resize_fixed_p, Lisp_Object forward, int width_p, int safe_p) |
| 2980 | int total, size, nchildren, shrinkable; | ||
| 2981 | int resize_fixed_p, width_p, safe_p; | ||
| 2982 | Lisp_Object forward; | ||
| 2983 | { | 2971 | { |
| 2984 | int available_resize = 0; | 2972 | int available_resize = 0; |
| 2985 | int *new_sizes, *min_sizes; | 2973 | int *new_sizes, *min_sizes; |
| @@ -3119,10 +3107,7 @@ shrink_windows (total, size, nchildren, shrinkable, resize_fixed_p, | |||
| 3119 | This should give better behavior when resizing frames. */ | 3107 | This should give better behavior when resizing frames. */ |
| 3120 | 3108 | ||
| 3121 | static void | 3109 | static void |
| 3122 | size_window (window, size, width_p, nodelete_p, first_only, last_only) | 3110 | size_window (Lisp_Object window, int size, int width_p, int nodelete_p, int first_only, int last_only) |
| 3123 | Lisp_Object window; | ||
| 3124 | int size, width_p, nodelete_p; | ||
| 3125 | int first_only, last_only; | ||
| 3126 | { | 3111 | { |
| 3127 | struct window *w = XWINDOW (window); | 3112 | struct window *w = XWINDOW (window); |
| 3128 | struct window *c; | 3113 | struct window *c; |
| @@ -3313,10 +3298,7 @@ size_window (window, size, width_p, nodelete_p, first_only, last_only) | |||
| 3313 | displayed correctly. */ | 3298 | displayed correctly. */ |
| 3314 | 3299 | ||
| 3315 | void | 3300 | void |
| 3316 | set_window_height (window, height, nodelete) | 3301 | set_window_height (Lisp_Object window, int height, int nodelete) |
| 3317 | Lisp_Object window; | ||
| 3318 | int height; | ||
| 3319 | int nodelete; | ||
| 3320 | { | 3302 | { |
| 3321 | size_window (window, height, 0, nodelete, 0, 0); | 3303 | size_window (window, height, 0, nodelete, 0, 0); |
| 3322 | } | 3304 | } |
| @@ -3330,10 +3312,7 @@ set_window_height (window, height, nodelete) | |||
| 3330 | displayed correctly. */ | 3312 | displayed correctly. */ |
| 3331 | 3313 | ||
| 3332 | void | 3314 | void |
| 3333 | set_window_width (window, width, nodelete) | 3315 | set_window_width (Lisp_Object window, int width, int nodelete) |
| 3334 | Lisp_Object window; | ||
| 3335 | int width; | ||
| 3336 | int nodelete; | ||
| 3337 | { | 3316 | { |
| 3338 | size_window (window, width, 1, nodelete, 0, 0); | 3317 | size_window (window, width, 1, nodelete, 0, 0); |
| 3339 | } | 3318 | } |
| @@ -3341,9 +3320,7 @@ set_window_width (window, width, nodelete) | |||
| 3341 | /* Change window heights in windows rooted in WINDOW by N lines. */ | 3320 | /* Change window heights in windows rooted in WINDOW by N lines. */ |
| 3342 | 3321 | ||
| 3343 | void | 3322 | void |
| 3344 | change_window_heights (window, n) | 3323 | change_window_heights (Lisp_Object window, int n) |
| 3345 | Lisp_Object window; | ||
| 3346 | int n; | ||
| 3347 | { | 3324 | { |
| 3348 | struct window *w = XWINDOW (window); | 3325 | struct window *w = XWINDOW (window); |
| 3349 | 3326 | ||
| @@ -3439,9 +3416,7 @@ run_window_configuration_change_hook (struct frame *f) | |||
| 3439 | reset from the buffer's local settings. */ | 3416 | reset from the buffer's local settings. */ |
| 3440 | 3417 | ||
| 3441 | void | 3418 | void |
| 3442 | set_window_buffer (window, buffer, run_hooks_p, keep_margins_p) | 3419 | set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int keep_margins_p) |
| 3443 | Lisp_Object window, buffer; | ||
| 3444 | int run_hooks_p, keep_margins_p; | ||
| 3445 | { | 3420 | { |
| 3446 | struct window *w = XWINDOW (window); | 3421 | struct window *w = XWINDOW (window); |
| 3447 | struct buffer *b = XBUFFER (buffer); | 3422 | struct buffer *b = XBUFFER (buffer); |
| @@ -3463,7 +3438,7 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p) | |||
| 3463 | 3438 | ||
| 3464 | XSETFASTINT (w->window_end_pos, 0); | 3439 | XSETFASTINT (w->window_end_pos, 0); |
| 3465 | XSETFASTINT (w->window_end_vpos, 0); | 3440 | XSETFASTINT (w->window_end_vpos, 0); |
| 3466 | bzero (&w->last_cursor, sizeof w->last_cursor); | 3441 | memset (&w->last_cursor, 0, sizeof w->last_cursor); |
| 3467 | w->window_end_valid = Qnil; | 3442 | w->window_end_valid = Qnil; |
| 3468 | if (!(keep_margins_p && samebuf)) | 3443 | if (!(keep_margins_p && samebuf)) |
| 3469 | { /* If we're not actually changing the buffer, don't reset hscroll and | 3444 | { /* If we're not actually changing the buffer, don't reset hscroll and |
| @@ -3552,8 +3527,7 @@ already display BUFFER-OR-NAME. | |||
| 3552 | 3527 | ||
| 3553 | This function runs `window-scroll-functions' before running | 3528 | This function runs `window-scroll-functions' before running |
| 3554 | `window-configuration-change-hook'. */) | 3529 | `window-configuration-change-hook'. */) |
| 3555 | (window, buffer_or_name, keep_margins) | 3530 | (register Lisp_Object window, Lisp_Object buffer_or_name, Lisp_Object keep_margins) |
| 3556 | register Lisp_Object window, buffer_or_name, keep_margins; | ||
| 3557 | { | 3531 | { |
| 3558 | register Lisp_Object tem, buffer; | 3532 | register Lisp_Object tem, buffer; |
| 3559 | register struct window *w = decode_window (window); | 3533 | register struct window *w = decode_window (window); |
| @@ -3596,8 +3570,7 @@ make this window the most recently selected one. | |||
| 3596 | 3570 | ||
| 3597 | Note that the main editor command loop selects the buffer of the | 3571 | Note that the main editor command loop selects the buffer of the |
| 3598 | selected window before each command. */) | 3572 | selected window before each command. */) |
| 3599 | (window, norecord) | 3573 | (register Lisp_Object window, Lisp_Object norecord) |
| 3600 | register Lisp_Object window, norecord; | ||
| 3601 | { | 3574 | { |
| 3602 | register struct window *w; | 3575 | register struct window *w; |
| 3603 | register struct window *ow; | 3576 | register struct window *ow; |
| @@ -3673,24 +3646,21 @@ selected window before each command. */) | |||
| 3673 | } | 3646 | } |
| 3674 | 3647 | ||
| 3675 | static Lisp_Object | 3648 | static Lisp_Object |
| 3676 | select_window_norecord (window) | 3649 | select_window_norecord (Lisp_Object window) |
| 3677 | Lisp_Object window; | ||
| 3678 | { | 3650 | { |
| 3679 | return WINDOW_LIVE_P (window) | 3651 | return WINDOW_LIVE_P (window) |
| 3680 | ? Fselect_window (window, Qt) : selected_window; | 3652 | ? Fselect_window (window, Qt) : selected_window; |
| 3681 | } | 3653 | } |
| 3682 | 3654 | ||
| 3683 | static Lisp_Object | 3655 | static Lisp_Object |
| 3684 | select_frame_norecord (frame) | 3656 | select_frame_norecord (Lisp_Object frame) |
| 3685 | Lisp_Object frame; | ||
| 3686 | { | 3657 | { |
| 3687 | return FRAME_LIVE_P (XFRAME (frame)) | 3658 | return FRAME_LIVE_P (XFRAME (frame)) |
| 3688 | ? Fselect_frame (frame, Qt) : selected_frame; | 3659 | ? Fselect_frame (frame, Qt) : selected_frame; |
| 3689 | } | 3660 | } |
| 3690 | 3661 | ||
| 3691 | Lisp_Object | 3662 | Lisp_Object |
| 3692 | display_buffer (buffer, not_this_window_p, override_frame) | 3663 | display_buffer (Lisp_Object buffer, Lisp_Object not_this_window_p, Lisp_Object override_frame) |
| 3693 | Lisp_Object buffer, not_this_window_p, override_frame; | ||
| 3694 | { | 3664 | { |
| 3695 | return call3 (Qdisplay_buffer, buffer, not_this_window_p, override_frame); | 3665 | return call3 (Qdisplay_buffer, buffer, not_this_window_p, override_frame); |
| 3696 | } | 3666 | } |
| @@ -3701,8 +3671,7 @@ DEFUN ("force-window-update", Fforce_window_update, Sforce_window_update, | |||
| 3701 | If optional arg OBJECT is a window, force redisplay of that window only. | 3671 | If optional arg OBJECT is a window, force redisplay of that window only. |
| 3702 | If OBJECT is a buffer or buffer name, force redisplay of all windows | 3672 | If OBJECT is a buffer or buffer name, force redisplay of all windows |
| 3703 | displaying that buffer. */) | 3673 | displaying that buffer. */) |
| 3704 | (object) | 3674 | (Lisp_Object object) |
| 3705 | Lisp_Object object; | ||
| 3706 | { | 3675 | { |
| 3707 | if (NILP (object)) | 3676 | if (NILP (object)) |
| 3708 | { | 3677 | { |
| @@ -3741,8 +3710,7 @@ displaying that buffer. */) | |||
| 3741 | 3710 | ||
| 3742 | 3711 | ||
| 3743 | void | 3712 | void |
| 3744 | temp_output_buffer_show (buf) | 3713 | temp_output_buffer_show (register Lisp_Object buf) |
| 3745 | register Lisp_Object buf; | ||
| 3746 | { | 3714 | { |
| 3747 | register struct buffer *old = current_buffer; | 3715 | register struct buffer *old = current_buffer; |
| 3748 | register Lisp_Object window; | 3716 | register Lisp_Object window; |
| @@ -3802,8 +3770,7 @@ temp_output_buffer_show (buf) | |||
| 3802 | } | 3770 | } |
| 3803 | 3771 | ||
| 3804 | static void | 3772 | static void |
| 3805 | make_dummy_parent (window) | 3773 | make_dummy_parent (Lisp_Object window) |
| 3806 | Lisp_Object window; | ||
| 3807 | { | 3774 | { |
| 3808 | Lisp_Object new; | 3775 | Lisp_Object new; |
| 3809 | register struct window *o, *p; | 3776 | register struct window *o, *p; |
| @@ -3845,8 +3812,7 @@ The upper or leftmost window is the original one, and remains selected | |||
| 3845 | if it was selected before. | 3812 | if it was selected before. |
| 3846 | 3813 | ||
| 3847 | See Info node `(elisp)Splitting Windows' for more details and examples. */) | 3814 | See Info node `(elisp)Splitting Windows' for more details and examples. */) |
| 3848 | (window, size, horizontal) | 3815 | (Lisp_Object window, Lisp_Object size, Lisp_Object horizontal) |
| 3849 | Lisp_Object window, size, horizontal; | ||
| 3850 | { | 3816 | { |
| 3851 | register Lisp_Object new; | 3817 | register Lisp_Object new; |
| 3852 | register struct window *o, *p; | 3818 | register struct window *o, *p; |
| @@ -3936,7 +3902,7 @@ See Info node `(elisp)Splitting Windows' for more details and examples. */) | |||
| 3936 | p->parent = o->parent; | 3902 | p->parent = o->parent; |
| 3937 | p->buffer = Qt; | 3903 | p->buffer = Qt; |
| 3938 | p->window_end_valid = Qnil; | 3904 | p->window_end_valid = Qnil; |
| 3939 | bzero (&p->last_cursor, sizeof p->last_cursor); | 3905 | memset (&p->last_cursor, 0, sizeof p->last_cursor); |
| 3940 | 3906 | ||
| 3941 | /* Duplicate special geometry settings. */ | 3907 | /* Duplicate special geometry settings. */ |
| 3942 | 3908 | ||
| @@ -3985,8 +3951,7 @@ window wider by SIZE columns. If SIZE is negative, shrink the window by | |||
| 3985 | 3951 | ||
| 3986 | This function can delete windows if they get too small. The size of | 3952 | This function can delete windows if they get too small. The size of |
| 3987 | fixed size windows is not altered by this function. */) | 3953 | fixed size windows is not altered by this function. */) |
| 3988 | (size, horizontal) | 3954 | (Lisp_Object size, Lisp_Object horizontal) |
| 3989 | Lisp_Object size, horizontal; | ||
| 3990 | { | 3955 | { |
| 3991 | CHECK_NUMBER (size); | 3956 | CHECK_NUMBER (size); |
| 3992 | enlarge_window (selected_window, XINT (size), !NILP (horizontal)); | 3957 | enlarge_window (selected_window, XINT (size), !NILP (horizontal)); |
| @@ -4005,8 +3970,7 @@ window by -SIZE lines or columns. Return nil. | |||
| 4005 | 3970 | ||
| 4006 | This function can delete windows if they get too small. The size of | 3971 | This function can delete windows if they get too small. The size of |
| 4007 | fixed size windows is not altered by this function. */) | 3972 | fixed size windows is not altered by this function. */) |
| 4008 | (size, horizontal) | 3973 | (Lisp_Object size, Lisp_Object horizontal) |
| 4009 | Lisp_Object size, horizontal; | ||
| 4010 | { | 3974 | { |
| 4011 | CHECK_NUMBER (size); | 3975 | CHECK_NUMBER (size); |
| 4012 | enlarge_window (selected_window, -XINT (size), !NILP (horizontal)); | 3976 | enlarge_window (selected_window, -XINT (size), !NILP (horizontal)); |
| @@ -4017,16 +3981,14 @@ fixed size windows is not altered by this function. */) | |||
| 4017 | } | 3981 | } |
| 4018 | 3982 | ||
| 4019 | int | 3983 | int |
| 4020 | window_height (window) | 3984 | window_height (Lisp_Object window) |
| 4021 | Lisp_Object window; | ||
| 4022 | { | 3985 | { |
| 4023 | register struct window *p = XWINDOW (window); | 3986 | register struct window *p = XWINDOW (window); |
| 4024 | return WINDOW_TOTAL_LINES (p); | 3987 | return WINDOW_TOTAL_LINES (p); |
| 4025 | } | 3988 | } |
| 4026 | 3989 | ||
| 4027 | int | 3990 | int |
| 4028 | window_width (window) | 3991 | window_width (Lisp_Object window) |
| 4029 | Lisp_Object window; | ||
| 4030 | { | 3992 | { |
| 4031 | register struct window *p = XWINDOW (window); | 3993 | register struct window *p = XWINDOW (window); |
| 4032 | return WINDOW_TOTAL_COLS (p); | 3994 | return WINDOW_TOTAL_COLS (p); |
| @@ -4048,17 +4010,15 @@ window_width (window) | |||
| 4048 | deleted. */ | 4010 | deleted. */ |
| 4049 | 4011 | ||
| 4050 | static void | 4012 | static void |
| 4051 | enlarge_window (window, delta, horiz_flag) | 4013 | enlarge_window (Lisp_Object window, int delta, int horiz_flag) |
| 4052 | Lisp_Object window; | ||
| 4053 | int delta, horiz_flag; | ||
| 4054 | { | 4014 | { |
| 4055 | Lisp_Object parent, next, prev; | 4015 | Lisp_Object parent, next, prev; |
| 4056 | struct window *p; | 4016 | struct window *p; |
| 4057 | Lisp_Object *sizep; | 4017 | Lisp_Object *sizep; |
| 4058 | int maximum; | 4018 | int maximum; |
| 4059 | int (*sizefun) P_ ((Lisp_Object)) | 4019 | int (*sizefun) (Lisp_Object) |
| 4060 | = horiz_flag ? window_width : window_height; | 4020 | = horiz_flag ? window_width : window_height; |
| 4061 | void (*setsizefun) P_ ((Lisp_Object, int, int)) | 4021 | void (*setsizefun) (Lisp_Object, int, int) |
| 4062 | = (horiz_flag ? set_window_width : set_window_height); | 4022 | = (horiz_flag ? set_window_width : set_window_height); |
| 4063 | 4023 | ||
| 4064 | /* Give up if this window cannot be resized. */ | 4024 | /* Give up if this window cannot be resized. */ |
| @@ -4326,9 +4286,7 @@ enlarge_window (window, delta, horiz_flag) | |||
| 4326 | are not deleted; instead, we signal an error. */ | 4286 | are not deleted; instead, we signal an error. */ |
| 4327 | 4287 | ||
| 4328 | static void | 4288 | static void |
| 4329 | adjust_window_trailing_edge (window, delta, horiz_flag) | 4289 | adjust_window_trailing_edge (Lisp_Object window, int delta, int horiz_flag) |
| 4330 | Lisp_Object window; | ||
| 4331 | int delta, horiz_flag; | ||
| 4332 | { | 4290 | { |
| 4333 | Lisp_Object parent, child; | 4291 | Lisp_Object parent, child; |
| 4334 | struct window *p; | 4292 | struct window *p; |
| @@ -4464,8 +4422,7 @@ Otherwise, adjust the height, moving the bottom edge. | |||
| 4464 | Following siblings of the selected window are resized to fulfill | 4422 | Following siblings of the selected window are resized to fulfill |
| 4465 | the size request. If they become too small in the process, they | 4423 | the size request. If they become too small in the process, they |
| 4466 | are not deleted; instead, we signal an error. */) | 4424 | are not deleted; instead, we signal an error. */) |
| 4467 | (window, delta, horizontal) | 4425 | (Lisp_Object window, Lisp_Object delta, Lisp_Object horizontal) |
| 4468 | Lisp_Object window, delta, horizontal; | ||
| 4469 | { | 4426 | { |
| 4470 | CHECK_NUMBER (delta); | 4427 | CHECK_NUMBER (delta); |
| 4471 | if (NILP (window)) | 4428 | if (NILP (window)) |
| @@ -4484,7 +4441,7 @@ are not deleted; instead, we signal an error. */) | |||
| 4484 | Resizing Mini-Windows | 4441 | Resizing Mini-Windows |
| 4485 | ***********************************************************************/ | 4442 | ***********************************************************************/ |
| 4486 | 4443 | ||
| 4487 | static void shrink_window_lowest_first P_ ((struct window *, int)); | 4444 | static void shrink_window_lowest_first (struct window *, int); |
| 4488 | 4445 | ||
| 4489 | enum save_restore_action | 4446 | enum save_restore_action |
| 4490 | { | 4447 | { |
| @@ -4493,16 +4450,14 @@ enum save_restore_action | |||
| 4493 | RESTORE_ORIG_SIZES | 4450 | RESTORE_ORIG_SIZES |
| 4494 | }; | 4451 | }; |
| 4495 | 4452 | ||
| 4496 | static int save_restore_orig_size P_ ((struct window *, | 4453 | static int save_restore_orig_size (struct window *, |
| 4497 | enum save_restore_action)); | 4454 | enum save_restore_action); |
| 4498 | 4455 | ||
| 4499 | /* Shrink windows rooted in window W to HEIGHT. Take the space needed | 4456 | /* Shrink windows rooted in window W to HEIGHT. Take the space needed |
| 4500 | from lowest windows first. */ | 4457 | from lowest windows first. */ |
| 4501 | 4458 | ||
| 4502 | static void | 4459 | static void |
| 4503 | shrink_window_lowest_first (w, height) | 4460 | shrink_window_lowest_first (struct window *w, int height) |
| 4504 | struct window *w; | ||
| 4505 | int height; | ||
| 4506 | { | 4461 | { |
| 4507 | struct window *c; | 4462 | struct window *c; |
| 4508 | Lisp_Object child; | 4463 | Lisp_Object child; |
| @@ -4584,9 +4539,7 @@ shrink_window_lowest_first (w, height) | |||
| 4584 | stored in orig_top_line and orig_total_lines for all windows. */ | 4539 | stored in orig_top_line and orig_total_lines for all windows. */ |
| 4585 | 4540 | ||
| 4586 | static int | 4541 | static int |
| 4587 | save_restore_orig_size (w, action) | 4542 | save_restore_orig_size (struct window *w, enum save_restore_action action) |
| 4588 | struct window *w; | ||
| 4589 | enum save_restore_action action; | ||
| 4590 | { | 4543 | { |
| 4591 | int success_p = 1; | 4544 | int success_p = 1; |
| 4592 | 4545 | ||
| @@ -4641,9 +4594,7 @@ save_restore_orig_size (w, action) | |||
| 4641 | without deleting other windows. */ | 4594 | without deleting other windows. */ |
| 4642 | 4595 | ||
| 4643 | void | 4596 | void |
| 4644 | grow_mini_window (w, delta) | 4597 | grow_mini_window (struct window *w, int delta) |
| 4645 | struct window *w; | ||
| 4646 | int delta; | ||
| 4647 | { | 4598 | { |
| 4648 | struct frame *f = XFRAME (w->frame); | 4599 | struct frame *f = XFRAME (w->frame); |
| 4649 | struct window *root; | 4600 | struct window *root; |
| @@ -4692,8 +4643,7 @@ grow_mini_window (w, delta) | |||
| 4692 | line. */ | 4643 | line. */ |
| 4693 | 4644 | ||
| 4694 | void | 4645 | void |
| 4695 | shrink_mini_window (w) | 4646 | shrink_mini_window (struct window *w) |
| 4696 | struct window *w; | ||
| 4697 | { | 4647 | { |
| 4698 | struct frame *f = XFRAME (w->frame); | 4648 | struct frame *f = XFRAME (w->frame); |
| 4699 | struct window *root = XWINDOW (FRAME_ROOT_WINDOW (f)); | 4649 | struct window *root = XWINDOW (FRAME_ROOT_WINDOW (f)); |
| @@ -4723,8 +4673,7 @@ shrink_mini_window (w) | |||
| 4723 | the frame are cleared. */ | 4673 | the frame are cleared. */ |
| 4724 | 4674 | ||
| 4725 | void | 4675 | void |
| 4726 | mark_window_cursors_off (w) | 4676 | mark_window_cursors_off (struct window *w) |
| 4727 | struct window *w; | ||
| 4728 | { | 4677 | { |
| 4729 | while (w) | 4678 | while (w) |
| 4730 | { | 4679 | { |
| @@ -4743,8 +4692,7 @@ mark_window_cursors_off (w) | |||
| 4743 | /* Return number of lines of text (not counting mode lines) in W. */ | 4692 | /* Return number of lines of text (not counting mode lines) in W. */ |
| 4744 | 4693 | ||
| 4745 | int | 4694 | int |
| 4746 | window_internal_height (w) | 4695 | window_internal_height (struct window *w) |
| 4747 | struct window *w; | ||
| 4748 | { | 4696 | { |
| 4749 | int ht = XFASTINT (w->total_lines); | 4697 | int ht = XFASTINT (w->total_lines); |
| 4750 | 4698 | ||
| @@ -4771,8 +4719,7 @@ window_internal_height (w) | |||
| 4771 | separating W from the sibling to its right. */ | 4719 | separating W from the sibling to its right. */ |
| 4772 | 4720 | ||
| 4773 | int | 4721 | int |
| 4774 | window_box_text_cols (w) | 4722 | window_box_text_cols (struct window *w) |
| 4775 | struct window *w; | ||
| 4776 | { | 4723 | { |
| 4777 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 4724 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 4778 | int width = XINT (w->total_cols); | 4725 | int width = XINT (w->total_cols); |
| @@ -4809,11 +4756,7 @@ window_box_text_cols (w) | |||
| 4809 | respectively. */ | 4756 | respectively. */ |
| 4810 | 4757 | ||
| 4811 | static void | 4758 | static void |
| 4812 | window_scroll (window, n, whole, noerror) | 4759 | window_scroll (Lisp_Object window, int n, int whole, int noerror) |
| 4813 | Lisp_Object window; | ||
| 4814 | int n; | ||
| 4815 | int whole; | ||
| 4816 | int noerror; | ||
| 4817 | { | 4760 | { |
| 4818 | immediate_quit = 1; | 4761 | immediate_quit = 1; |
| 4819 | 4762 | ||
| @@ -4833,11 +4776,7 @@ window_scroll (window, n, whole, noerror) | |||
| 4833 | descriptions. */ | 4776 | descriptions. */ |
| 4834 | 4777 | ||
| 4835 | static void | 4778 | static void |
| 4836 | window_scroll_pixel_based (window, n, whole, noerror) | 4779 | window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror) |
| 4837 | Lisp_Object window; | ||
| 4838 | int n; | ||
| 4839 | int whole; | ||
| 4840 | int noerror; | ||
| 4841 | { | 4780 | { |
| 4842 | struct it it; | 4781 | struct it it; |
| 4843 | struct window *w = XWINDOW (window); | 4782 | struct window *w = XWINDOW (window); |
| @@ -5183,11 +5122,7 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 5183 | See the comment of window_scroll for parameter descriptions. */ | 5122 | See the comment of window_scroll for parameter descriptions. */ |
| 5184 | 5123 | ||
| 5185 | static void | 5124 | static void |
| 5186 | window_scroll_line_based (window, n, whole, noerror) | 5125 | window_scroll_line_based (Lisp_Object window, int n, int whole, int noerror) |
| 5187 | Lisp_Object window; | ||
| 5188 | int n; | ||
| 5189 | int whole; | ||
| 5190 | int noerror; | ||
| 5191 | { | 5126 | { |
| 5192 | register struct window *w = XWINDOW (window); | 5127 | register struct window *w = XWINDOW (window); |
| 5193 | register int opoint = PT, opoint_byte = PT_BYTE; | 5128 | register int opoint = PT, opoint_byte = PT_BYTE; |
| @@ -5345,9 +5280,7 @@ window_scroll_line_based (window, n, whole, noerror) | |||
| 5345 | up. This is the guts of Fscroll_up and Fscroll_down. */ | 5280 | up. This is the guts of Fscroll_up and Fscroll_down. */ |
| 5346 | 5281 | ||
| 5347 | static void | 5282 | static void |
| 5348 | scroll_command (n, direction) | 5283 | scroll_command (Lisp_Object n, int direction) |
| 5349 | Lisp_Object n; | ||
| 5350 | int direction; | ||
| 5351 | { | 5284 | { |
| 5352 | int count = SPECPDL_INDEX (); | 5285 | int count = SPECPDL_INDEX (); |
| 5353 | 5286 | ||
| @@ -5384,8 +5317,7 @@ A near full screen is `next-screen-context-lines' less than a full screen. | |||
| 5384 | Negative ARG means scroll downward. | 5317 | Negative ARG means scroll downward. |
| 5385 | If ARG is the atom `-', scroll downward by nearly full screen. | 5318 | If ARG is the atom `-', scroll downward by nearly full screen. |
| 5386 | When calling from a program, supply as argument a number, nil, or `-'. */) | 5319 | When calling from a program, supply as argument a number, nil, or `-'. */) |
| 5387 | (arg) | 5320 | (Lisp_Object arg) |
| 5388 | Lisp_Object arg; | ||
| 5389 | { | 5321 | { |
| 5390 | scroll_command (arg, 1); | 5322 | scroll_command (arg, 1); |
| 5391 | return Qnil; | 5323 | return Qnil; |
| @@ -5398,8 +5330,7 @@ A near full screen is `next-screen-context-lines' less than a full screen. | |||
| 5398 | Negative ARG means scroll upward. | 5330 | Negative ARG means scroll upward. |
| 5399 | If ARG is the atom `-', scroll upward by nearly full screen. | 5331 | If ARG is the atom `-', scroll upward by nearly full screen. |
| 5400 | When calling from a program, supply as argument a number, nil, or `-'. */) | 5332 | When calling from a program, supply as argument a number, nil, or `-'. */) |
| 5401 | (arg) | 5333 | (Lisp_Object arg) |
| 5402 | Lisp_Object arg; | ||
| 5403 | { | 5334 | { |
| 5404 | scroll_command (arg, -1); | 5335 | scroll_command (arg, -1); |
| 5405 | return Qnil; | 5336 | return Qnil; |
| @@ -5412,7 +5343,7 @@ showing that buffer is used. | |||
| 5412 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | 5343 | If in the minibuffer, `minibuffer-scroll-window' if non-nil |
| 5413 | specifies the window. This takes precedence over | 5344 | specifies the window. This takes precedence over |
| 5414 | `other-window-scroll-buffer'. */) | 5345 | `other-window-scroll-buffer'. */) |
| 5415 | () | 5346 | (void) |
| 5416 | { | 5347 | { |
| 5417 | Lisp_Object window; | 5348 | Lisp_Object window; |
| 5418 | 5349 | ||
| @@ -5462,8 +5393,7 @@ showing that buffer, popping the buffer up if necessary. | |||
| 5462 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | 5393 | If in the minibuffer, `minibuffer-scroll-window' if non-nil |
| 5463 | specifies the window to scroll. This takes precedence over | 5394 | specifies the window to scroll. This takes precedence over |
| 5464 | `other-window-scroll-buffer'. */) | 5395 | `other-window-scroll-buffer'. */) |
| 5465 | (arg) | 5396 | (Lisp_Object arg) |
| 5466 | Lisp_Object arg; | ||
| 5467 | { | 5397 | { |
| 5468 | Lisp_Object window; | 5398 | Lisp_Object window; |
| 5469 | struct window *w; | 5399 | struct window *w; |
| @@ -5506,8 +5436,7 @@ If SET-MINIMUM is non-nil, the new scroll amount becomes the | |||
| 5506 | lower bound for automatic scrolling, i.e. automatic scrolling | 5436 | lower bound for automatic scrolling, i.e. automatic scrolling |
| 5507 | will not scroll a window to a column less than the value returned | 5437 | will not scroll a window to a column less than the value returned |
| 5508 | by this function. This happens in an interactive call. */) | 5438 | by this function. This happens in an interactive call. */) |
| 5509 | (arg, set_minimum) | 5439 | (register Lisp_Object arg, Lisp_Object set_minimum) |
| 5510 | register Lisp_Object arg, set_minimum; | ||
| 5511 | { | 5440 | { |
| 5512 | Lisp_Object result; | 5441 | Lisp_Object result; |
| 5513 | int hscroll; | 5442 | int hscroll; |
| @@ -5536,8 +5465,7 @@ If SET-MINIMUM is non-nil, the new scroll amount becomes the | |||
| 5536 | lower bound for automatic scrolling, i.e. automatic scrolling | 5465 | lower bound for automatic scrolling, i.e. automatic scrolling |
| 5537 | will not scroll a window to a column less than the value returned | 5466 | will not scroll a window to a column less than the value returned |
| 5538 | by this function. This happens in an interactive call. */) | 5467 | by this function. This happens in an interactive call. */) |
| 5539 | (arg, set_minimum) | 5468 | (register Lisp_Object arg, Lisp_Object set_minimum) |
| 5540 | register Lisp_Object arg, set_minimum; | ||
| 5541 | { | 5469 | { |
| 5542 | Lisp_Object result; | 5470 | Lisp_Object result; |
| 5543 | int hscroll; | 5471 | int hscroll; |
| @@ -5560,7 +5488,7 @@ by this function. This happens in an interactive call. */) | |||
| 5560 | DEFUN ("minibuffer-selected-window", Fminibuffer_selected_window, Sminibuffer_selected_window, 0, 0, 0, | 5488 | DEFUN ("minibuffer-selected-window", Fminibuffer_selected_window, Sminibuffer_selected_window, 0, 0, 0, |
| 5561 | doc: /* Return the window which was selected when entering the minibuffer. | 5489 | doc: /* Return the window which was selected when entering the minibuffer. |
| 5562 | Returns nil, if selected window is not a minibuffer window. */) | 5490 | Returns nil, if selected window is not a minibuffer window. */) |
| 5563 | () | 5491 | (void) |
| 5564 | { | 5492 | { |
| 5565 | if (minibuf_level > 0 | 5493 | if (minibuf_level > 0 |
| 5566 | && MINI_WINDOW_P (XWINDOW (selected_window)) | 5494 | && MINI_WINDOW_P (XWINDOW (selected_window)) |
| @@ -5574,8 +5502,7 @@ Returns nil, if selected window is not a minibuffer window. */) | |||
| 5574 | as opposed to its height. */ | 5502 | as opposed to its height. */ |
| 5575 | 5503 | ||
| 5576 | static int | 5504 | static int |
| 5577 | displayed_window_lines (w) | 5505 | displayed_window_lines (struct window *w) |
| 5578 | struct window *w; | ||
| 5579 | { | 5506 | { |
| 5580 | struct it it; | 5507 | struct it it; |
| 5581 | struct text_pos start; | 5508 | struct text_pos start; |
| @@ -5643,8 +5570,7 @@ then only tty frame are redrawn. | |||
| 5643 | 5570 | ||
| 5644 | Just C-u as prefix means put point in the center of the window | 5571 | Just C-u as prefix means put point in the center of the window |
| 5645 | and redisplay normally--don't erase and redraw the frame. */) | 5572 | and redisplay normally--don't erase and redraw the frame. */) |
| 5646 | (arg) | 5573 | (register Lisp_Object arg) |
| 5647 | register Lisp_Object arg; | ||
| 5648 | { | 5574 | { |
| 5649 | struct window *w = XWINDOW (selected_window); | 5575 | struct window *w = XWINDOW (selected_window); |
| 5650 | struct buffer *buf = XBUFFER (w->buffer); | 5576 | struct buffer *buf = XBUFFER (w->buffer); |
| @@ -5828,8 +5754,7 @@ WINDOW defaults to the selected window. | |||
| 5828 | 5754 | ||
| 5829 | The return value does not include the mode line, any header line, nor | 5755 | The return value does not include the mode line, any header line, nor |
| 5830 | any partial-height lines in the text display area. */) | 5756 | any partial-height lines in the text display area. */) |
| 5831 | (window) | 5757 | (Lisp_Object window) |
| 5832 | Lisp_Object window; | ||
| 5833 | { | 5758 | { |
| 5834 | struct window *w = decode_window (window); | 5759 | struct window *w = decode_window (window); |
| 5835 | int pixel_height = window_box_height (w); | 5760 | int pixel_height = window_box_height (w); |
| @@ -5845,8 +5770,7 @@ DEFUN ("move-to-window-line", Fmove_to_window_line, Smove_to_window_line, | |||
| 5845 | With no argument, position point at center of window. | 5770 | With no argument, position point at center of window. |
| 5846 | An argument specifies vertical position within the window; | 5771 | An argument specifies vertical position within the window; |
| 5847 | zero means top of window, negative means relative to bottom of window. */) | 5772 | zero means top of window, negative means relative to bottom of window. */) |
| 5848 | (arg) | 5773 | (Lisp_Object arg) |
| 5849 | Lisp_Object arg; | ||
| 5850 | { | 5774 | { |
| 5851 | struct window *w = XWINDOW (selected_window); | 5775 | struct window *w = XWINDOW (selected_window); |
| 5852 | int lines, start; | 5776 | int lines, start; |
| @@ -5959,16 +5883,14 @@ struct saved_window | |||
| 5959 | 5883 | ||
| 5960 | DEFUN ("window-configuration-p", Fwindow_configuration_p, Swindow_configuration_p, 1, 1, 0, | 5884 | DEFUN ("window-configuration-p", Fwindow_configuration_p, Swindow_configuration_p, 1, 1, 0, |
| 5961 | doc: /* Return t if OBJECT is a window-configuration object. */) | 5885 | doc: /* Return t if OBJECT is a window-configuration object. */) |
| 5962 | (object) | 5886 | (Lisp_Object object) |
| 5963 | Lisp_Object object; | ||
| 5964 | { | 5887 | { |
| 5965 | return WINDOW_CONFIGURATIONP (object) ? Qt : Qnil; | 5888 | return WINDOW_CONFIGURATIONP (object) ? Qt : Qnil; |
| 5966 | } | 5889 | } |
| 5967 | 5890 | ||
| 5968 | DEFUN ("window-configuration-frame", Fwindow_configuration_frame, Swindow_configuration_frame, 1, 1, 0, | 5891 | DEFUN ("window-configuration-frame", Fwindow_configuration_frame, Swindow_configuration_frame, 1, 1, 0, |
| 5969 | doc: /* Return the frame that CONFIG, a window-configuration object, is about. */) | 5892 | doc: /* Return the frame that CONFIG, a window-configuration object, is about. */) |
| 5970 | (config) | 5893 | (Lisp_Object config) |
| 5971 | Lisp_Object config; | ||
| 5972 | { | 5894 | { |
| 5973 | register struct save_window_data *data; | 5895 | register struct save_window_data *data; |
| 5974 | struct Lisp_Vector *saved_windows; | 5896 | struct Lisp_Vector *saved_windows; |
| @@ -5988,8 +5910,7 @@ by `current-window-configuration' (which see). | |||
| 5988 | If CONFIGURATION was made from a frame that is now deleted, | 5910 | If CONFIGURATION was made from a frame that is now deleted, |
| 5989 | only frame-independent values can be restored. In this case, | 5911 | only frame-independent values can be restored. In this case, |
| 5990 | the return value is nil. Otherwise the value is t. */) | 5912 | the return value is nil. Otherwise the value is t. */) |
| 5991 | (configuration) | 5913 | (Lisp_Object configuration) |
| 5992 | Lisp_Object configuration; | ||
| 5993 | { | 5914 | { |
| 5994 | register struct save_window_data *data; | 5915 | register struct save_window_data *data; |
| 5995 | struct Lisp_Vector *saved_windows; | 5916 | struct Lisp_Vector *saved_windows; |
| @@ -6320,8 +6241,7 @@ the return value is nil. Otherwise the value is t. */) | |||
| 6320 | by setting their buffers to nil. */ | 6241 | by setting their buffers to nil. */ |
| 6321 | 6242 | ||
| 6322 | void | 6243 | void |
| 6323 | delete_all_subwindows (w) | 6244 | delete_all_subwindows (register struct window *w) |
| 6324 | register struct window *w; | ||
| 6325 | { | 6245 | { |
| 6326 | if (!NILP (w->next)) | 6246 | if (!NILP (w->next)) |
| 6327 | delete_all_subwindows (XWINDOW (w->next)); | 6247 | delete_all_subwindows (XWINDOW (w->next)); |
| @@ -6347,8 +6267,7 @@ delete_all_subwindows (w) | |||
| 6347 | } | 6267 | } |
| 6348 | 6268 | ||
| 6349 | static int | 6269 | static int |
| 6350 | count_windows (window) | 6270 | count_windows (register struct window *window) |
| 6351 | register struct window *window; | ||
| 6352 | { | 6271 | { |
| 6353 | register int count = 1; | 6272 | register int count = 1; |
| 6354 | if (!NILP (window->next)) | 6273 | if (!NILP (window->next)) |
| @@ -6365,10 +6284,7 @@ count_windows (window) | |||
| 6365 | Value is last index + 1. */ | 6284 | Value is last index + 1. */ |
| 6366 | 6285 | ||
| 6367 | static int | 6286 | static int |
| 6368 | get_leaf_windows (w, flat, i) | 6287 | get_leaf_windows (struct window *w, struct window **flat, int i) |
| 6369 | struct window *w; | ||
| 6370 | struct window **flat; | ||
| 6371 | int i; | ||
| 6372 | { | 6288 | { |
| 6373 | while (w) | 6289 | while (w) |
| 6374 | { | 6290 | { |
| @@ -6391,8 +6307,7 @@ get_leaf_windows (w, flat, i) | |||
| 6391 | can be returned. */ | 6307 | can be returned. */ |
| 6392 | 6308 | ||
| 6393 | struct glyph * | 6309 | struct glyph * |
| 6394 | get_phys_cursor_glyph (w) | 6310 | get_phys_cursor_glyph (struct window *w) |
| 6395 | struct window *w; | ||
| 6396 | { | 6311 | { |
| 6397 | struct glyph_row *row; | 6312 | struct glyph_row *row; |
| 6398 | struct glyph *glyph; | 6313 | struct glyph *glyph; |
| @@ -6411,10 +6326,7 @@ get_phys_cursor_glyph (w) | |||
| 6411 | 6326 | ||
| 6412 | 6327 | ||
| 6413 | static int | 6328 | static int |
| 6414 | save_window_save (window, vector, i) | 6329 | save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) |
| 6415 | Lisp_Object window; | ||
| 6416 | struct Lisp_Vector *vector; | ||
| 6417 | int i; | ||
| 6418 | { | 6330 | { |
| 6419 | register struct saved_window *p; | 6331 | register struct saved_window *p; |
| 6420 | register struct window *w; | 6332 | register struct window *w; |
| @@ -6504,8 +6416,7 @@ point and mark. An exception is made for point in the current buffer: | |||
| 6504 | its value is -not- saved. | 6416 | its value is -not- saved. |
| 6505 | This also records the currently selected frame, and FRAME's focus | 6417 | This also records the currently selected frame, and FRAME's focus |
| 6506 | redirection (see `redirect-frame-focus'). */) | 6418 | redirection (see `redirect-frame-focus'). */) |
| 6507 | (frame) | 6419 | (Lisp_Object frame) |
| 6508 | Lisp_Object frame; | ||
| 6509 | { | 6420 | { |
| 6510 | register Lisp_Object tem; | 6421 | register Lisp_Object tem; |
| 6511 | register int n_windows; | 6422 | register int n_windows; |
| @@ -6553,8 +6464,7 @@ Also restore the choice of selected window. | |||
| 6553 | Also restore which buffer is current. | 6464 | Also restore which buffer is current. |
| 6554 | Does not restore the value of point in current buffer. | 6465 | Does not restore the value of point in current buffer. |
| 6555 | usage: (save-window-excursion BODY...) */) | 6466 | usage: (save-window-excursion BODY...) */) |
| 6556 | (args) | 6467 | (Lisp_Object args) |
| 6557 | Lisp_Object args; | ||
| 6558 | { | 6468 | { |
| 6559 | register Lisp_Object val; | 6469 | register Lisp_Object val; |
| 6560 | register int count = SPECPDL_INDEX (); | 6470 | register int count = SPECPDL_INDEX (); |
| @@ -6572,8 +6482,7 @@ usage: (save-window-excursion BODY...) */) | |||
| 6572 | ***********************************************************************/ | 6482 | ***********************************************************************/ |
| 6573 | 6483 | ||
| 6574 | static Lisp_Object | 6484 | static Lisp_Object |
| 6575 | window_tree (w) | 6485 | window_tree (struct window *w) |
| 6576 | struct window *w; | ||
| 6577 | { | 6486 | { |
| 6578 | Lisp_Object tail = Qnil; | 6487 | Lisp_Object tail = Qnil; |
| 6579 | Lisp_Object result = Qnil; | 6488 | Lisp_Object result = Qnil; |
| @@ -6626,8 +6535,7 @@ EDGES is a list \(LEFT TOP RIGHT BOTTOM) as returned by `window-edges'. | |||
| 6626 | 6535 | ||
| 6627 | If FRAME is nil or omitted, return information on the currently | 6536 | If FRAME is nil or omitted, return information on the currently |
| 6628 | selected frame. */) | 6537 | selected frame. */) |
| 6629 | (frame) | 6538 | (Lisp_Object frame) |
| 6630 | Lisp_Object frame; | ||
| 6631 | { | 6539 | { |
| 6632 | FRAME_PTR f; | 6540 | FRAME_PTR f; |
| 6633 | 6541 | ||
| @@ -6656,8 +6564,7 @@ Second arg LEFT-WIDTH specifies the number of character cells to | |||
| 6656 | reserve for the left marginal area. Optional third arg RIGHT-WIDTH | 6564 | reserve for the left marginal area. Optional third arg RIGHT-WIDTH |
| 6657 | does the same for the right marginal area. A nil width parameter | 6565 | does the same for the right marginal area. A nil width parameter |
| 6658 | means no margin. */) | 6566 | means no margin. */) |
| 6659 | (window, left_width, right_width) | 6567 | (Lisp_Object window, Lisp_Object left_width, Lisp_Object right_width) |
| 6660 | Lisp_Object window, left_width, right_width; | ||
| 6661 | { | 6568 | { |
| 6662 | struct window *w = decode_window (window); | 6569 | struct window *w = decode_window (window); |
| 6663 | 6570 | ||
| @@ -6701,8 +6608,7 @@ If WINDOW is omitted or nil, use the currently selected window. | |||
| 6701 | Value is a cons of the form (LEFT-WIDTH . RIGHT-WIDTH). | 6608 | Value is a cons of the form (LEFT-WIDTH . RIGHT-WIDTH). |
| 6702 | If a marginal area does not exist, its width will be returned | 6609 | If a marginal area does not exist, its width will be returned |
| 6703 | as nil. */) | 6610 | as nil. */) |
| 6704 | (window) | 6611 | (Lisp_Object window) |
| 6705 | Lisp_Object window; | ||
| 6706 | { | 6612 | { |
| 6707 | struct window *w = decode_window (window); | 6613 | struct window *w = decode_window (window); |
| 6708 | return Fcons (w->left_margin_cols, w->right_margin_cols); | 6614 | return Fcons (w->left_margin_cols, w->right_margin_cols); |
| @@ -6727,8 +6633,7 @@ the command `set-fringe-style'. | |||
| 6727 | If optional fourth arg OUTSIDE-MARGINS is non-nil, draw the fringes | 6633 | If optional fourth arg OUTSIDE-MARGINS is non-nil, draw the fringes |
| 6728 | outside of the display margins. By default, fringes are drawn between | 6634 | outside of the display margins. By default, fringes are drawn between |
| 6729 | display marginal areas and the text area. */) | 6635 | display marginal areas and the text area. */) |
| 6730 | (window, left_width, right_width, outside_margins) | 6636 | (Lisp_Object window, Lisp_Object left_width, Lisp_Object right_width, Lisp_Object outside_margins) |
| 6731 | Lisp_Object window, left_width, right_width, outside_margins; | ||
| 6732 | { | 6637 | { |
| 6733 | struct window *w = decode_window (window); | 6638 | struct window *w = decode_window (window); |
| 6734 | 6639 | ||
| @@ -6765,8 +6670,7 @@ DEFUN ("window-fringes", Fwindow_fringes, Swindow_fringes, | |||
| 6765 | doc: /* Get width of fringes of window WINDOW. | 6670 | doc: /* Get width of fringes of window WINDOW. |
| 6766 | If WINDOW is omitted or nil, use the currently selected window. | 6671 | If WINDOW is omitted or nil, use the currently selected window. |
| 6767 | Value is a list of the form (LEFT-WIDTH RIGHT-WIDTH OUTSIDE-MARGINS). */) | 6672 | Value is a list of the form (LEFT-WIDTH RIGHT-WIDTH OUTSIDE-MARGINS). */) |
| 6768 | (window) | 6673 | (Lisp_Object window) |
| 6769 | Lisp_Object window; | ||
| 6770 | { | 6674 | { |
| 6771 | struct window *w = decode_window (window); | 6675 | struct window *w = decode_window (window); |
| 6772 | 6676 | ||
| @@ -6793,8 +6697,7 @@ bar: left, right, or nil. | |||
| 6793 | If WIDTH is nil, use the frame's scroll-bar width. | 6697 | If WIDTH is nil, use the frame's scroll-bar width. |
| 6794 | If VERTICAL-TYPE is t, use the frame's scroll-bar type. | 6698 | If VERTICAL-TYPE is t, use the frame's scroll-bar type. |
| 6795 | Fourth parameter HORIZONTAL-TYPE is currently unused. */) | 6699 | Fourth parameter HORIZONTAL-TYPE is currently unused. */) |
| 6796 | (window, width, vertical_type, horizontal_type) | 6700 | (Lisp_Object window, Lisp_Object width, Lisp_Object vertical_type, Lisp_Object horizontal_type) |
| 6797 | Lisp_Object window, width, vertical_type, horizontal_type; | ||
| 6798 | { | 6701 | { |
| 6799 | struct window *w = decode_window (window); | 6702 | struct window *w = decode_window (window); |
| 6800 | 6703 | ||
| @@ -6838,8 +6741,7 @@ If WINDOW is omitted or nil, use the currently selected window. | |||
| 6838 | Value is a list of the form (WIDTH COLS VERTICAL-TYPE HORIZONTAL-TYPE). | 6741 | Value is a list of the form (WIDTH COLS VERTICAL-TYPE HORIZONTAL-TYPE). |
| 6839 | If WIDTH is nil or TYPE is t, the window is using the frame's corresponding | 6742 | If WIDTH is nil or TYPE is t, the window is using the frame's corresponding |
| 6840 | value. */) | 6743 | value. */) |
| 6841 | (window) | 6744 | (Lisp_Object window) |
| 6842 | Lisp_Object window; | ||
| 6843 | { | 6745 | { |
| 6844 | struct window *w = decode_window (window); | 6746 | struct window *w = decode_window (window); |
| 6845 | return Fcons (make_number ((WINDOW_CONFIG_SCROLL_BAR_WIDTH (w) | 6747 | return Fcons (make_number ((WINDOW_CONFIG_SCROLL_BAR_WIDTH (w) |
| @@ -6861,8 +6763,7 @@ DEFUN ("window-vscroll", Fwindow_vscroll, Swindow_vscroll, 0, 2, 0, | |||
| 6861 | Use the selected window if WINDOW is nil or omitted. | 6763 | Use the selected window if WINDOW is nil or omitted. |
| 6862 | Normally, value is a multiple of the canonical character height of WINDOW; | 6764 | Normally, value is a multiple of the canonical character height of WINDOW; |
| 6863 | optional second arg PIXELS-P means value is measured in pixels. */) | 6765 | optional second arg PIXELS-P means value is measured in pixels. */) |
| 6864 | (window, pixels_p) | 6766 | (Lisp_Object window, Lisp_Object pixels_p) |
| 6865 | Lisp_Object window, pixels_p; | ||
| 6866 | { | 6767 | { |
| 6867 | Lisp_Object result; | 6768 | Lisp_Object result; |
| 6868 | struct frame *f; | 6769 | struct frame *f; |
| @@ -6895,8 +6796,7 @@ If PIXELS-P is nil, VSCROLL may have to be rounded so that it | |||
| 6895 | corresponds to an integral number of pixels. The return value is the | 6796 | corresponds to an integral number of pixels. The return value is the |
| 6896 | result of this rounding. | 6797 | result of this rounding. |
| 6897 | If PIXELS-P is non-nil, the return value is VSCROLL. */) | 6798 | If PIXELS-P is non-nil, the return value is VSCROLL. */) |
| 6898 | (window, vscroll, pixels_p) | 6799 | (Lisp_Object window, Lisp_Object vscroll, Lisp_Object pixels_p) |
| 6899 | Lisp_Object window, vscroll, pixels_p; | ||
| 6900 | { | 6800 | { |
| 6901 | struct window *w; | 6801 | struct window *w; |
| 6902 | struct frame *f; | 6802 | struct frame *f; |
| @@ -6940,10 +6840,7 @@ If PIXELS-P is non-nil, the return value is VSCROLL. */) | |||
| 6940 | additional argument USER_DATA. Stops when FN returns 0. */ | 6840 | additional argument USER_DATA. Stops when FN returns 0. */ |
| 6941 | 6841 | ||
| 6942 | void | 6842 | void |
| 6943 | foreach_window (f, fn, user_data) | 6843 | foreach_window (struct frame *f, int (*fn) (struct window *, void *), void *user_data) |
| 6944 | struct frame *f; | ||
| 6945 | int (* fn) P_ ((struct window *, void *)); | ||
| 6946 | void *user_data; | ||
| 6947 | { | 6844 | { |
| 6948 | /* delete_frame may set FRAME_ROOT_WINDOW (f) to Qnil. */ | 6845 | /* delete_frame may set FRAME_ROOT_WINDOW (f) to Qnil. */ |
| 6949 | if (WINDOWP (FRAME_ROOT_WINDOW (f))) | 6846 | if (WINDOWP (FRAME_ROOT_WINDOW (f))) |
| @@ -6957,10 +6854,7 @@ foreach_window (f, fn, user_data) | |||
| 6957 | Stop when FN returns 0. Value is 0 if stopped by FN. */ | 6854 | Stop when FN returns 0. Value is 0 if stopped by FN. */ |
| 6958 | 6855 | ||
| 6959 | static int | 6856 | static int |
| 6960 | foreach_window_1 (w, fn, user_data) | 6857 | foreach_window_1 (struct window *w, int (*fn) (struct window *, void *), void *user_data) |
| 6961 | struct window *w; | ||
| 6962 | int (* fn) P_ ((struct window *, void *)); | ||
| 6963 | void *user_data; | ||
| 6964 | { | 6858 | { |
| 6965 | int cont; | 6859 | int cont; |
| 6966 | 6860 | ||
| @@ -6985,9 +6879,7 @@ foreach_window_1 (w, fn, user_data) | |||
| 6985 | the window start. */ | 6879 | the window start. */ |
| 6986 | 6880 | ||
| 6987 | static int | 6881 | static int |
| 6988 | freeze_window_start (w, freeze_p) | 6882 | freeze_window_start (struct window *w, void *freeze_p) |
| 6989 | struct window *w; | ||
| 6990 | void *freeze_p; | ||
| 6991 | { | 6883 | { |
| 6992 | if (MINI_WINDOW_P (w) | 6884 | if (MINI_WINDOW_P (w) |
| 6993 | || (WINDOWP (selected_window) /* Can be nil in corner cases. */ | 6885 | || (WINDOWP (selected_window) /* Can be nil in corner cases. */ |
| @@ -7007,9 +6899,7 @@ freeze_window_start (w, freeze_p) | |||
| 7007 | means freeze the window start. */ | 6899 | means freeze the window start. */ |
| 7008 | 6900 | ||
| 7009 | void | 6901 | void |
| 7010 | freeze_window_starts (f, freeze_p) | 6902 | freeze_window_starts (struct frame *f, int freeze_p) |
| 7011 | struct frame *f; | ||
| 7012 | int freeze_p; | ||
| 7013 | { | 6903 | { |
| 7014 | foreach_window (f, freeze_window_start, (void *) (freeze_p ? f : 0)); | 6904 | foreach_window (f, freeze_window_start, (void *) (freeze_p ? f : 0)); |
| 7015 | } | 6905 | } |
| @@ -7023,9 +6913,7 @@ freeze_window_starts (f, freeze_p) | |||
| 7023 | describe the same state of affairs. This is used by Fequal. */ | 6913 | describe the same state of affairs. This is used by Fequal. */ |
| 7024 | 6914 | ||
| 7025 | int | 6915 | int |
| 7026 | compare_window_configurations (c1, c2, ignore_positions) | 6916 | compare_window_configurations (Lisp_Object c1, Lisp_Object c2, int ignore_positions) |
| 7027 | Lisp_Object c1, c2; | ||
| 7028 | int ignore_positions; | ||
| 7029 | { | 6917 | { |
| 7030 | register struct save_window_data *d1, *d2; | 6918 | register struct save_window_data *d1, *d2; |
| 7031 | struct Lisp_Vector *sw1, *sw2; | 6919 | struct Lisp_Vector *sw1, *sw2; |
| @@ -7142,8 +7030,7 @@ DEFUN ("compare-window-configurations", Fcompare_window_configurations, | |||
| 7142 | doc: /* Compare two window configurations as regards the structure of windows. | 7030 | doc: /* Compare two window configurations as regards the structure of windows. |
| 7143 | This function ignores details such as the values of point and mark | 7031 | This function ignores details such as the values of point and mark |
| 7144 | and scrolling positions. */) | 7032 | and scrolling positions. */) |
| 7145 | (x, y) | 7033 | (Lisp_Object x, Lisp_Object y) |
| 7146 | Lisp_Object x, y; | ||
| 7147 | { | 7034 | { |
| 7148 | if (compare_window_configurations (x, y, 1)) | 7035 | if (compare_window_configurations (x, y, 1)) |
| 7149 | return Qt; | 7036 | return Qt; |
| @@ -7151,7 +7038,7 @@ and scrolling positions. */) | |||
| 7151 | } | 7038 | } |
| 7152 | 7039 | ||
| 7153 | void | 7040 | void |
| 7154 | init_window_once () | 7041 | init_window_once (void) |
| 7155 | { | 7042 | { |
| 7156 | struct frame *f = make_initial_frame (); | 7043 | struct frame *f = make_initial_frame (); |
| 7157 | XSETFRAME (selected_frame, f); | 7044 | XSETFRAME (selected_frame, f); |
| @@ -7164,13 +7051,13 @@ init_window_once () | |||
| 7164 | } | 7051 | } |
| 7165 | 7052 | ||
| 7166 | void | 7053 | void |
| 7167 | init_window () | 7054 | init_window (void) |
| 7168 | { | 7055 | { |
| 7169 | Vwindow_list = Qnil; | 7056 | Vwindow_list = Qnil; |
| 7170 | } | 7057 | } |
| 7171 | 7058 | ||
| 7172 | void | 7059 | void |
| 7173 | syms_of_window () | 7060 | syms_of_window (void) |
| 7174 | { | 7061 | { |
| 7175 | Qscroll_up = intern_c_string ("scroll-up"); | 7062 | Qscroll_up = intern_c_string ("scroll-up"); |
| 7176 | staticpro (&Qscroll_up); | 7063 | staticpro (&Qscroll_up); |
| @@ -7314,8 +7201,10 @@ frame to be redrawn only if it is a tty frame. */); | |||
| 7314 | defsubr (&Sset_window_redisplay_end_trigger); | 7201 | defsubr (&Sset_window_redisplay_end_trigger); |
| 7315 | defsubr (&Swindow_edges); | 7202 | defsubr (&Swindow_edges); |
| 7316 | defsubr (&Swindow_pixel_edges); | 7203 | defsubr (&Swindow_pixel_edges); |
| 7204 | defsubr (&Swindow_absolute_pixel_edges); | ||
| 7317 | defsubr (&Swindow_inside_edges); | 7205 | defsubr (&Swindow_inside_edges); |
| 7318 | defsubr (&Swindow_inside_pixel_edges); | 7206 | defsubr (&Swindow_inside_pixel_edges); |
| 7207 | defsubr (&Swindow_inside_absolute_pixel_edges); | ||
| 7319 | defsubr (&Scoordinates_in_window_p); | 7208 | defsubr (&Scoordinates_in_window_p); |
| 7320 | defsubr (&Swindow_at); | 7209 | defsubr (&Swindow_at); |
| 7321 | defsubr (&Swindow_point); | 7210 | defsubr (&Swindow_point); |
| @@ -7377,7 +7266,7 @@ frame to be redrawn only if it is a tty frame. */); | |||
| 7377 | } | 7266 | } |
| 7378 | 7267 | ||
| 7379 | void | 7268 | void |
| 7380 | keys_of_window () | 7269 | keys_of_window (void) |
| 7381 | { | 7270 | { |
| 7382 | initial_define_key (control_x_map, '1', "delete-other-windows"); | 7271 | initial_define_key (control_x_map, '1', "delete-other-windows"); |
| 7383 | initial_define_key (control_x_map, '2', "split-window"); | 7272 | initial_define_key (control_x_map, '2', "split-window"); |