Mercurial > hg > xemacs-beta
comparison src/window.c @ 793:e38acbeb1cae
[xemacs-hg @ 2002-03-29 04:46:17 by ben]
lots o' fixes
etc/ChangeLog: New file.
Separated out all entries for etc/ into their own ChangeLog.
Includes entries for the following files:
etc/BABYL, etc/BETA, etc/CHARSETS, etc/DISTRIB, etc/Emacs.ad,
etc/FTP, etc/GNUS-NEWS, etc/GOATS, etc/HELLO, etc/INSTALL,
etc/MACHINES, etc/MAILINGLISTS, etc/MSDOS, etc/MYTHOLOGY, etc/NEWS,
etc/OXYMORONS, etc/PACKAGES, etc/README, etc/TUTORIAL,
etc/TUTORIAL.de, etc/TUTORIAL.ja, etc/TUTORIAL.ko, etc/TUTORIAL.se,
etc/aliases.ksh, etc/altrasoft-logo.xpm, etc/check_cygwin_setup.sh,
etc/custom/example-themes/europe-theme.el,
etc/custom/example-themes/ex-custom-file,
etc/custom/example-themes/example-theme.el, etc/e/eterm.ti,
etc/edt-user.doc, etc/enriched.doc, etc/etags.1, etc/gnuserv.1,
etc/gnuserv.README, etc/package-index.LATEST.gpg,
etc/package-index.LATEST.pgp, etc/photos/jan.png, etc/recycle.xpm,
etc/refcard.tex, etc/sample.Xdefaults, etc/sample.emacs,
etc/sgml/CATALOG, etc/sgml/HTML32.dtd, etc/skk/SKK.tut.E,
etc/smilies/Face_ase.xbm, etc/smilies/Face_ase2.xbm,
etc/smilies/Face_ase3.xbm, etc/smilies/Face_smile.xbm,
etc/smilies/Face_weep.xbm, etc/sounds, etc/toolbar,
etc/toolbar/workshop-cap-up.xpm, etc/xemacs-ja.1, etc/xemacs.1,
etc/yow.lines, etc\BETA, etc\NEWS, etc\README, etc\TUTORIAL,
etc\TUTORIAL.de, etc\check_cygwin_setup.sh, etc\sample.init.el,
etc\unicode\README, etc\unicode\mule-ucs\*, etc\unicode\other\*
unicode/unicode-consortium/8859-16.TXT: New file.
mule/english.el: Define this charset now, since a bug was fixed that formerly
prevented it.
mule/ethio-util.el: Fix compile errors involving Unicode `characters', which should be
integers.
Makefile.in.in: Always include gui.c, to fix compile error when TTY-only.
EmacsFrame.c, abbrev.c, alloc.c, buffer.c, buffer.h, bytecode.c, bytecode.h, callint.c, callproc.c, casetab.c, casetab.h, charset.h, chartab.c, chartab.h, cmds.c, console-msw.c, console-msw.h, console-tty.c, console-x.c, console-x.h, console.c, console.h, data.c, database.c, device-gtk.c, device-msw.c, device-x.c, device.c, device.h, dialog-msw.c, doc.c, doprnt.c, dumper.c, dynarr.c, editfns.c, eldap.c, eldap.h, elhash.c, elhash.h, emacs.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, event-tty.c, event-unixoid.c, events.c, events.h, extents.c, extents.h, faces.c, faces.h, file-coding.c, file-coding.h, fileio.c, filelock.c, fns.c, frame-gtk.c, frame-msw.c, frame-tty.c, frame-x.c, frame.c, frame.h, free-hook.c, general-slots.h, glyphs-eimage.c, glyphs-gtk.c, glyphs-msw.c, glyphs-widget.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gtk-xemacs.c, gui-msw.c, gui-x.c, gui-x.h, gui.c, gui.h, gutter.c, gutter.h, indent.c, input-method-xlib.c, insdel.c, keymap.c, keymap.h, lisp-disunion.h, lisp-union.h, lisp.h, lread.c, lrecord.h, lstream.c, lstream.h, marker.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, mule-canna.c, mule-ccl.c, mule-charset.c, mule-wnnfns.c, native-gtk-toolbar.c, objects-msw.c, objects-tty.c, objects-x.c, objects.c, objects.h, opaque.c, opaque.h, postgresql.c, postgresql.h, print.c, process-unix.c, process.c, process.h, rangetab.c, rangetab.h, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, scrollbar-gtk.c, scrollbar-msw.c, scrollbar-x.c, scrollbar.c, scrollbar.h, search.c, select-gtk.c, select-x.c, sound.c, specifier.c, specifier.h, strftime.c, symbols.c, symeval.h, syntax.h, text.c, text.h, toolbar-common.c, toolbar-msw.c, toolbar.c, toolbar.h, tooltalk.c, tooltalk.h, ui-gtk.c, ui-gtk.h, undo.c, vm-limit.c, window.c, window.h: Eliminate XSETFOO. Replace all usages with wrap_foo().
Make symbol->name a Lisp_Object, not Lisp_String *. Eliminate
nearly all uses of Lisp_String * in favor of Lisp_Object, and
correct macros so most of them favor Lisp_Object.
Create new error-behavior ERROR_ME_DEBUG_WARN -- output warnings,
but at level `debug' (usually ignored). Use it when instantiating
specifiers, so problems can be debugged. Move
log-warning-minimum-level into C so that we can optimize
ERROR_ME_DEBUG_WARN.
Fix warning levels consistent with new definitions.
Add default_ and parent fields to char table; not yet implemented.
New fun Dynarr_verify(); use for further error checking on Dynarrs.
Rearrange code at top of lisp.h in conjunction with dynarr changes.
Fix eifree(). Use Eistrings in various places
(format_event_object(), where_is_to_char(), and callers thereof)
to avoid fixed-size strings buffers. New fun write_eistring().
Reindent and fix GPM code to follow standards.
Set default MS Windows font to Lucida Console (same size as
Courier New but less interline spacing, so more lines fit).
Increase default frame size on Windows to 50 lines. (If that's too
big for the workspace, the frame will be shrunk as necessary.)
Fix problem with text files with no newlines (). (Change
`convert-eol' coding system to use `nil' for autodetect,
consistent with make-coding-system.)
Correct compile warnings in vm-limit.c.
Fix handling of reverse-direction charsets to avoid errors when
opening (e.g.) mule-ucs/lisp/reldata/uiso8859-6.el.
Recode some object printing methods to use write_fmt_string()
instead of a fixed buffer and sprintf.
Turn on display of png comments as warnings (level `info'), now
that they're unobtrusive.
Revamped the sound documentation.
Fixed bug in redisplay w.r.t. hscroll/truncation/continuation
glyphs causing jumping up and down of the lines, since they're
bigger than the line size. (It was seen most obviously when
there's a horizontal scroll bar, e.g. do C-h a glyph or something
like that.) The problem was that the glyph-contrib-p setting on
glyphs was ignored even if it was set properly, which it wasn't
until now.
author | ben |
---|---|
date | Fri, 29 Mar 2002 04:49:13 +0000 |
parents | 943eaba38521 |
children | a5954632b187 |
comparison
equal
deleted
inserted
replaced
792:4e83fdb13eb9 | 793:e38acbeb1cae |
---|---|
1 /* Window creation, deletion and examination for XEmacs. | 1 /* Window creation, deletion and examination for XEmacs. |
2 Copyright (C) 1985-1987, 1992-1995 Free Software Foundation, Inc. | 2 Copyright (C) 1985-1987, 1992-1995 Free Software Foundation, Inc. |
3 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. | 3 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. |
4 Copyright (C) 1995, 1996 Ben Wing. | 4 Copyright (C) 1995, 1996, 2002 Ben Wing. |
5 Copyright (C) 1996 Chuck Thompson. | 5 Copyright (C) 1996 Chuck Thompson. |
6 | 6 |
7 This file is part of XEmacs. | 7 This file is part of XEmacs. |
8 | 8 |
9 XEmacs is free software; you can redistribute it and/or modify it | 9 XEmacs is free software; you can redistribute it and/or modify it |
239 { | 239 { |
240 Lisp_Object val; | 240 Lisp_Object val; |
241 struct window *p = alloc_lcrecord_type (struct window, &lrecord_window); | 241 struct window *p = alloc_lcrecord_type (struct window, &lrecord_window); |
242 | 242 |
243 zero_lcrecord (p); | 243 zero_lcrecord (p); |
244 XSETWINDOW (val, p); | 244 val = wrap_window (p); |
245 | 245 |
246 p->dead = 0; | 246 p->dead = 0; |
247 | 247 |
248 #define WINDOW_SLOT(slot) p->slot = Qnil; | 248 #define WINDOW_SLOT(slot) p->slot = Qnil; |
249 #include "winslots.h" | 249 #include "winslots.h" |
634 int | 634 int |
635 window_is_leftmost (struct window *w) | 635 window_is_leftmost (struct window *w) |
636 { | 636 { |
637 Lisp_Object parent, current_ancestor, window; | 637 Lisp_Object parent, current_ancestor, window; |
638 | 638 |
639 XSETWINDOW (window, w); | 639 window = wrap_window (w); |
640 | 640 |
641 parent = XWINDOW (window)->parent; | 641 parent = XWINDOW (window)->parent; |
642 current_ancestor = window; | 642 current_ancestor = window; |
643 | 643 |
644 while (!NILP (parent)) | 644 while (!NILP (parent)) |
657 int | 657 int |
658 window_is_rightmost (struct window *w) | 658 window_is_rightmost (struct window *w) |
659 { | 659 { |
660 Lisp_Object parent, current_ancestor, window; | 660 Lisp_Object parent, current_ancestor, window; |
661 | 661 |
662 XSETWINDOW (window, w); | 662 window = wrap_window (w); |
663 | 663 |
664 parent = XWINDOW (window)->parent; | 664 parent = XWINDOW (window)->parent; |
665 current_ancestor = window; | 665 current_ancestor = window; |
666 | 666 |
667 while (!NILP (parent)) | 667 while (!NILP (parent)) |
686 int | 686 int |
687 window_is_highest (struct window *w) | 687 window_is_highest (struct window *w) |
688 { | 688 { |
689 Lisp_Object parent, current_ancestor, window; | 689 Lisp_Object parent, current_ancestor, window; |
690 | 690 |
691 XSETWINDOW (window, w); | 691 window = wrap_window (w); |
692 | 692 |
693 parent = XWINDOW (window)->parent; | 693 parent = XWINDOW (window)->parent; |
694 current_ancestor = window; | 694 current_ancestor = window; |
695 | 695 |
696 while (!NILP (parent)) | 696 while (!NILP (parent)) |
714 int | 714 int |
715 window_is_lowest (struct window *w) | 715 window_is_lowest (struct window *w) |
716 { | 716 { |
717 Lisp_Object parent, current_ancestor, window; | 717 Lisp_Object parent, current_ancestor, window; |
718 | 718 |
719 XSETWINDOW (window, w); | 719 window = wrap_window (w); |
720 | 720 |
721 parent = XWINDOW (window)->parent; | 721 parent = XWINDOW (window)->parent; |
722 current_ancestor = window; | 722 current_ancestor = window; |
723 | 723 |
724 while (!NILP (parent)) | 724 while (!NILP (parent)) |
992 | 992 |
993 /* The minibuffer never has margins. */ | 993 /* The minibuffer never has margins. */ |
994 if (MINI_WINDOW_P (w)) | 994 if (MINI_WINDOW_P (w)) |
995 return 0; | 995 return 0; |
996 | 996 |
997 XSETWINDOW (window, w); | 997 window = wrap_window (w); |
998 b = XBUFFER (w->buffer); | 998 b = XBUFFER (w->buffer); |
999 margin_cwidth = (left_margin ? XINT (w->left_margin_width) : | 999 margin_cwidth = (left_margin ? XINT (w->left_margin_width) : |
1000 XINT (w->right_margin_width)); | 1000 XINT (w->right_margin_width)); |
1001 | 1001 |
1002 default_face_height_and_width (window, 0, &font_width); | 1002 default_face_height_and_width (window, 0, &font_width); |
2283 and we include its frame as well as the selected one, | 2283 and we include its frame as well as the selected one, |
2284 next_frame may get stuck in that frame. | 2284 next_frame may get stuck in that frame. |
2285 If that happens, go back to the selected frame | 2285 If that happens, go back to the selected frame |
2286 so we can complete the cycle. */ | 2286 so we can complete the cycle. */ |
2287 if (EQ (tem, tem1)) | 2287 if (EQ (tem, tem1)) |
2288 XSETFRAME (tem, selected_frame ()); | 2288 tem = wrap_frame (selected_frame ()); |
2289 } | 2289 } |
2290 | 2290 |
2291 tem = FRAME_ROOT_WINDOW (XFRAME (tem)); | 2291 tem = FRAME_ROOT_WINDOW (XFRAME (tem)); |
2292 break; | 2292 break; |
2293 } | 2293 } |
2438 and we include its frame as well as the selected one, | 2438 and we include its frame as well as the selected one, |
2439 next_frame may get stuck in that frame. | 2439 next_frame may get stuck in that frame. |
2440 If that happens, go back to the selected frame | 2440 If that happens, go back to the selected frame |
2441 so we can complete the cycle. */ | 2441 so we can complete the cycle. */ |
2442 if (EQ (tem, tem1)) | 2442 if (EQ (tem, tem1)) |
2443 XSETFRAME (tem, selected_frame ()); | 2443 tem = wrap_frame (selected_frame ()); |
2444 } | 2444 } |
2445 | 2445 |
2446 /* If this frame has a minibuffer, find that window first, | 2446 /* If this frame has a minibuffer, find that window first, |
2447 because it is conceptually the last window in that frame. */ | 2447 because it is conceptually the last window in that frame. */ |
2448 if (FRAME_HAS_MINIBUF_P (XFRAME (tem))) | 2448 if (FRAME_HAS_MINIBUF_P (XFRAME (tem))) |
2487 */ | 2487 */ |
2488 (window)) | 2488 (window)) |
2489 { | 2489 { |
2490 Lisp_Object root; | 2490 Lisp_Object root; |
2491 struct window *w = decode_window (window); | 2491 struct window *w = decode_window (window); |
2492 XSETWINDOW (window, w); | 2492 window = wrap_window (w); |
2493 | 2493 |
2494 if (MINI_WINDOW_P (XWINDOW (window))) | 2494 if (MINI_WINDOW_P (XWINDOW (window))) |
2495 return Qnil; | 2495 return Qnil; |
2496 | 2496 |
2497 root = FRAME_ROOT_WINDOW (XFRAME (WINDOW_FRAME (XWINDOW (window)))); | 2497 root = FRAME_ROOT_WINDOW (XFRAME (WINDOW_FRAME (XWINDOW (window)))); |
2645 { | 2645 { |
2646 Lisp_Object device = XCAR (devcons); | 2646 Lisp_Object device = XCAR (devcons); |
2647 Lisp_Object the_frame; | 2647 Lisp_Object the_frame; |
2648 | 2648 |
2649 if (frame) | 2649 if (frame) |
2650 XSETFRAME (the_frame, frame); | 2650 the_frame = wrap_frame (frame); |
2651 else | 2651 else |
2652 the_frame = DEVICE_SELECTED_FRAME (XDEVICE (device)); | 2652 the_frame = DEVICE_SELECTED_FRAME (XDEVICE (device)); |
2653 | 2653 |
2654 if (NILP (the_frame)) | 2654 if (NILP (the_frame)) |
2655 continue; | 2655 continue; |
2857 int | 2857 int |
2858 buffer_window_count (struct buffer *b, struct frame *f) | 2858 buffer_window_count (struct buffer *b, struct frame *f) |
2859 { | 2859 { |
2860 Lisp_Object buffer, frame; | 2860 Lisp_Object buffer, frame; |
2861 | 2861 |
2862 XSETFRAME (frame, f); | 2862 frame = wrap_frame (f); |
2863 XSETBUFFER (buffer, b); | 2863 buffer = wrap_buffer (b); |
2864 | 2864 |
2865 return XINT (window_loop (GET_BUFFER_WINDOW_COUNT, buffer, 0, frame, 1, | 2865 return XINT (window_loop (GET_BUFFER_WINDOW_COUNT, buffer, 0, frame, 1, |
2866 Qnil)); | 2866 Qnil)); |
2867 } | 2867 } |
2868 | 2868 |
3038 struct window *w = decode_window (window); | 3038 struct window *w = decode_window (window); |
3039 struct buffer *b = XBUFFER (w->buffer); | 3039 struct buffer *b = XBUFFER (w->buffer); |
3040 Charbpos start_pos; | 3040 Charbpos start_pos; |
3041 int old_top = WINDOW_TOP (w); | 3041 int old_top = WINDOW_TOP (w); |
3042 | 3042 |
3043 XSETWINDOW (window, w); | 3043 window = wrap_window (w); |
3044 | 3044 |
3045 if (MINI_WINDOW_P (w) && old_top > 0) | 3045 if (MINI_WINDOW_P (w) && old_top > 0) |
3046 invalid_operation ("Can't expand minibuffer to full frame", Qunbound); | 3046 invalid_operation ("Can't expand minibuffer to full frame", Qunbound); |
3047 | 3047 |
3048 /* Ignore dedicated windows. */ | 3048 /* Ignore dedicated windows. */ |
3124 value = list_windows (XWINDOW (w->hchild), value); | 3124 value = list_windows (XWINDOW (w->hchild), value); |
3125 else if (!NILP (w->vchild)) | 3125 else if (!NILP (w->vchild)) |
3126 value = list_windows (XWINDOW (w->vchild), value); | 3126 value = list_windows (XWINDOW (w->vchild), value); |
3127 else | 3127 else |
3128 { | 3128 { |
3129 Lisp_Object window; | 3129 Lisp_Object window = wrap_window (w); |
3130 XSETWINDOW (window, w); | 3130 |
3131 value = Fcons (window, value); | 3131 value = Fcons (window, value); |
3132 } | 3132 } |
3133 if (NILP (w->next)) | 3133 if (NILP (w->next)) |
3134 break; | 3134 break; |
3135 w = XWINDOW (w->next); | 3135 w = XWINDOW (w->next); |
3661 { | 3661 { |
3662 Lisp_Object new; | 3662 Lisp_Object new; |
3663 struct window *o = XWINDOW (window); | 3663 struct window *o = XWINDOW (window); |
3664 struct window *p = alloc_lcrecord_type (struct window, &lrecord_window); | 3664 struct window *p = alloc_lcrecord_type (struct window, &lrecord_window); |
3665 | 3665 |
3666 XSETWINDOW (new, p); | 3666 new = wrap_window (p); |
3667 copy_lcrecord (p, o); | 3667 copy_lcrecord (p, o); |
3668 | 3668 |
3669 /* Don't copy the pointers to the line start cache or the face | 3669 /* Don't copy the pointers to the line start cache or the face |
3670 instances. */ | 3670 instances. */ |
3671 p->line_start_cache = Dynarr_new (line_start_cache); | 3671 p->line_start_cache = Dynarr_new (line_start_cache); |
3897 int include_gutters_p) | 3897 int include_gutters_p) |
3898 { | 3898 { |
3899 int avail_height; | 3899 int avail_height; |
3900 int defheight, defwidth; | 3900 int defheight, defwidth; |
3901 int char_height; | 3901 int char_height; |
3902 Lisp_Object window; | 3902 Lisp_Object window = wrap_window (w); |
3903 | 3903 |
3904 XSETWINDOW (window, w); | |
3905 | 3904 |
3906 avail_height = (pixel_height - | 3905 avail_height = (pixel_height - |
3907 (include_gutters_p ? 0 : | 3906 (include_gutters_p ? 0 : |
3908 window_top_window_gutter_height (w) + | 3907 window_top_window_gutter_height (w) + |
3909 window_bottom_window_gutter_height (w))); | 3908 window_bottom_window_gutter_height (w))); |
3926 { | 3925 { |
3927 int avail_height; | 3926 int avail_height; |
3928 int defheight, defwidth; | 3927 int defheight, defwidth; |
3929 int pixel_height; | 3928 int pixel_height; |
3930 | 3929 |
3931 Lisp_Object window; | 3930 Lisp_Object window = wrap_window (w); |
3932 | 3931 |
3933 XSETWINDOW (window, w); | |
3934 | 3932 |
3935 default_face_height_and_width (window, &defheight, &defwidth); | 3933 default_face_height_and_width (window, &defheight, &defwidth); |
3936 | 3934 |
3937 avail_height = char_height * defheight; | 3935 avail_height = char_height * defheight; |
3938 pixel_height = (avail_height + | 3936 pixel_height = (avail_height + |
3989 int ypos1 = dl->ypos + dl->descent; | 3987 int ypos1 = dl->ypos + dl->descent; |
3990 int ypos2 = WINDOW_TEXT_BOTTOM (w); | 3988 int ypos2 = WINDOW_TEXT_BOTTOM (w); |
3991 Lisp_Object window; | 3989 Lisp_Object window; |
3992 int defheight, defwidth; | 3990 int defheight, defwidth; |
3993 | 3991 |
3994 XSETWINDOW (window, w); | 3992 window = wrap_window (w); |
3995 | 3993 |
3996 if (dl->modeline) | 3994 if (dl->modeline) |
3997 { | 3995 { |
3998 num_lines--; | 3996 num_lines--; |
3999 | 3997 |
4043 int include_margins_p) | 4041 int include_margins_p) |
4044 { | 4042 { |
4045 int avail_width; | 4043 int avail_width; |
4046 int char_width; | 4044 int char_width; |
4047 int defheight, defwidth; | 4045 int defheight, defwidth; |
4048 Lisp_Object window; | 4046 Lisp_Object window = wrap_window (w); |
4049 | 4047 |
4050 XSETWINDOW (window, w); | |
4051 | 4048 |
4052 avail_width = (pixel_width - | 4049 avail_width = (pixel_width - |
4053 window_left_gutter_width (w, 0) - | 4050 window_left_gutter_width (w, 0) - |
4054 window_right_gutter_width (w, 0) - | 4051 window_right_gutter_width (w, 0) - |
4055 (include_margins_p ? 0 : window_left_margin_width (w)) - | 4052 (include_margins_p ? 0 : window_left_margin_width (w)) - |
4072 int include_margins_p) | 4069 int include_margins_p) |
4073 { | 4070 { |
4074 int avail_width; | 4071 int avail_width; |
4075 int pixel_width; | 4072 int pixel_width; |
4076 int defheight, defwidth; | 4073 int defheight, defwidth; |
4077 Lisp_Object window; | 4074 Lisp_Object window = wrap_window (w); |
4078 | 4075 |
4079 XSETWINDOW (window, w); | |
4080 | 4076 |
4081 default_face_height_and_width (window, &defheight, &defwidth); | 4077 default_face_height_and_width (window, &defheight, &defwidth); |
4082 | 4078 |
4083 avail_width = char_width * defwidth; | 4079 avail_width = char_width * defwidth; |
4084 pixel_width = (avail_width + | 4080 pixel_width = (avail_width + |
4154 if (delta == 0) | 4150 if (delta == 0) |
4155 return; | 4151 return; |
4156 | 4152 |
4157 check_min_window_sizes (); | 4153 check_min_window_sizes (); |
4158 | 4154 |
4159 XSETWINDOW (window, win); | 4155 window = wrap_window (win); |
4160 f = XFRAME (win->frame); | 4156 f = XFRAME (win->frame); |
4161 if (EQ (window, FRAME_ROOT_WINDOW (f))) | 4157 if (EQ (window, FRAME_ROOT_WINDOW (f))) |
4162 invalid_operation ("Won't change only window", Qunbound); | 4158 invalid_operation ("Won't change only window", Qunbound); |
4163 | 4159 |
4164 /* #### This is very likely incorrect and instead the char_to_pixel_ | 4160 /* #### This is very likely incorrect and instead the char_to_pixel_ |
4817 else | 4813 else |
4818 { | 4814 { |
4819 /* #### Is this going to work right when at eob? */ | 4815 /* #### Is this going to work right when at eob? */ |
4820 arg = Fprefix_numeric_value (arg); | 4816 arg = Fprefix_numeric_value (arg); |
4821 if (XINT (arg) < 0) | 4817 if (XINT (arg) < 0) |
4822 XSETINT (arg, XINT (arg) + height); | 4818 arg = make_int (XINT (arg) + height); |
4823 } | 4819 } |
4824 | 4820 |
4825 start = marker_position (w->start[CURRENT_DISP]); | 4821 start = marker_position (w->start[CURRENT_DISP]); |
4826 if (start < BUF_BEGV (b) || start > BUF_ZV (b)) | 4822 if (start < BUF_BEGV (b) || start > BUF_ZV (b)) |
4827 { | 4823 { |
5102 struct saved_window saved_windows[1]; | 5098 struct saved_window saved_windows[1]; |
5103 }; | 5099 }; |
5104 | 5100 |
5105 #define SAVED_WINDOW_N(conf, n) (&((conf)->saved_windows[(n)])) | 5101 #define SAVED_WINDOW_N(conf, n) (&((conf)->saved_windows[(n)])) |
5106 #define XWINDOW_CONFIGURATION(x) XRECORD (x, window_configuration, struct window_config) | 5102 #define XWINDOW_CONFIGURATION(x) XRECORD (x, window_configuration, struct window_config) |
5107 #define XSETWINDOW_CONFIGURATION(x, p) XSETRECORD (x, p, window_configuration) | |
5108 #define wrap_window_configuration(p) wrap_record (p, window_configuration) | 5103 #define wrap_window_configuration(p) wrap_record (p, window_configuration) |
5109 #define WINDOW_CONFIGURATIONP(x) RECORDP (x, window_configuration) | 5104 #define WINDOW_CONFIGURATIONP(x) RECORDP (x, window_configuration) |
5110 #define CHECK_WINDOW_CONFIGURATION(x) CHECK_RECORD (x, window_configuration) | 5105 #define CHECK_WINDOW_CONFIGURATION(x) CHECK_RECORD (x, window_configuration) |
5111 | 5106 |
5112 static Lisp_Object | 5107 static Lisp_Object |
5946 else | 5941 else |
5947 /* More than ten windows; just allocate directly */ | 5942 /* More than ten windows; just allocate directly */ |
5948 config = (struct window_config *) | 5943 config = (struct window_config *) |
5949 alloc_lcrecord (sizeof_window_config_for_n_windows (n_windows), | 5944 alloc_lcrecord (sizeof_window_config_for_n_windows (n_windows), |
5950 &lrecord_window_configuration); | 5945 &lrecord_window_configuration); |
5951 XSETWINDOW_CONFIGURATION (result, config); | 5946 result = wrap_window_configuration (config); |
5952 /* | 5947 /* |
5953 config->frame_width = FRAME_WIDTH (f); | 5948 config->frame_width = FRAME_WIDTH (f); |
5954 config->frame_height = FRAME_HEIGHT (f); */ | 5949 config->frame_height = FRAME_HEIGHT (f); */ |
5955 /* #### When using `push-window-configuration', often the minibuffer ends | 5950 /* #### When using `push-window-configuration', often the minibuffer ends |
5956 up as the selected window because functions run as the result of | 5951 up as the selected window because functions run as the result of |
5964 config->current_window = FRAME_SELECTED_WINDOW (f); | 5959 config->current_window = FRAME_SELECTED_WINDOW (f); |
5965 else | 5960 else |
5966 config->current_window = FRAME_LAST_NONMINIBUF_WINDOW (f); | 5961 config->current_window = FRAME_LAST_NONMINIBUF_WINDOW (f); |
5967 #endif | 5962 #endif |
5968 config->current_window = FRAME_SELECTED_WINDOW (f); | 5963 config->current_window = FRAME_SELECTED_WINDOW (f); |
5969 XSETBUFFER (config->current_buffer, current_buffer); | 5964 config->current_buffer = wrap_buffer (current_buffer); |
5970 config->minibuffer_scroll_window = Vminibuffer_scroll_window; | 5965 config->minibuffer_scroll_window = Vminibuffer_scroll_window; |
5971 config->root_window = FRAME_ROOT_WINDOW (f); | 5966 config->root_window = FRAME_ROOT_WINDOW (f); |
5972 config->min_height = window_min_height; | 5967 config->min_height = window_min_height; |
5973 config->min_width = window_min_width; | 5968 config->min_width = window_min_width; |
5974 config->saved_windows_count = n_windows; | 5969 config->saved_windows_count = n_windows; |
5975 save_window_save (FRAME_ROOT_WINDOW (f), config, 0); | 5970 save_window_save (FRAME_ROOT_WINDOW (f), config, 0); |
5976 | 5971 |
5977 /* save the minibuffer height using the heuristics from | 5972 /* save the minibuffer height using the heuristics from |
5978 change_frame_size_1 */ | 5973 change_frame_size_1 */ |
5979 | 5974 |
5980 XSETFRAME (frame, f); /* frame could have been nil ! */ | 5975 frame = wrap_frame (f); /* frame could have been nil ! */ |
5981 default_face_height_and_width (frame, &real_font_height, 0); | 5976 default_face_height_and_width (frame, &real_font_height, 0); |
5982 assert(real_font_height > 0); | 5977 assert(real_font_height > 0); |
5983 | 5978 |
5984 if (FRAME_HAS_MINIBUF_P (f) && ! FRAME_MINIBUF_ONLY_P (f)) | 5979 if (FRAME_HAS_MINIBUF_P (f) && ! FRAME_MINIBUF_ONLY_P (f)) |
5985 minibuf_height = XWINDOW(FRAME_MINIBUF_WINDOW(f))->pixel_height; | 5980 minibuf_height = XWINDOW(FRAME_MINIBUF_WINDOW(f))->pixel_height; |