comparison src/frame.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
187 Lisp_Object frame; 187 Lisp_Object frame;
188 Lisp_Object root_window; 188 Lisp_Object root_window;
189 struct frame *f = alloc_lcrecord_type (struct frame, &lrecord_frame); 189 struct frame *f = alloc_lcrecord_type (struct frame, &lrecord_frame);
190 190
191 nuke_all_frame_slots (f); 191 nuke_all_frame_slots (f);
192 XSETFRAME (frame, f); 192 frame = wrap_frame (f);
193 193
194 f->device = device; 194 f->device = device;
195 f->framemeths = XDEVICE (device)->devmeths; 195 f->framemeths = XDEVICE (device)->devmeths;
196 f->buffer_alist = Fcopy_sequence (Vbuffer_alist); 196 f->buffer_alist = Fcopy_sequence (Vbuffer_alist);
197 197
227 Lisp_Object buf; 227 Lisp_Object buf;
228 228
229 buf = Fcurrent_buffer (); 229 buf = Fcurrent_buffer ();
230 /* If buf is a 'hidden' buffer (i.e. one whose name starts with 230 /* If buf is a 'hidden' buffer (i.e. one whose name starts with
231 a space), try to find another one. */ 231 a space), try to find another one. */
232 if (string_char (XSTRING (Fbuffer_name (buf)), 0) == ' ') 232 if (XSTRING_CHAR (Fbuffer_name (buf), 0) == ' ')
233 buf = Fother_buffer (buf, Qnil, Qnil); 233 buf = Fother_buffer (buf, Qnil, Qnil);
234 Fset_window_buffer (root_window, buf, Qnil); 234 Fset_window_buffer (root_window, buf, Qnil);
235 } 235 }
236 236
237 return f; 237 return f;
239 239
240 static void 240 static void
241 setup_normal_frame (struct frame *f) 241 setup_normal_frame (struct frame *f)
242 { 242 {
243 Lisp_Object mini_window; 243 Lisp_Object mini_window;
244 Lisp_Object frame; 244 Lisp_Object frame = wrap_frame (f);
245 245
246 XSETFRAME (frame, f);
247 246
248 mini_window = allocate_window (); 247 mini_window = allocate_window ();
249 XWINDOW (f->root_window)->next = mini_window; 248 XWINDOW (f->root_window)->next = mini_window;
250 XWINDOW (mini_window)->prev = f->root_window; 249 XWINDOW (mini_window)->prev = f->root_window;
251 XWINDOW (mini_window)->mini_p = Qt; 250 XWINDOW (mini_window)->mini_p = Qt;
307 setup_minibuffer_frame (struct frame *f) 306 setup_minibuffer_frame (struct frame *f)
308 { 307 {
309 /* This function can GC */ 308 /* This function can GC */
310 /* First make a frame containing just a root window, no minibuffer. */ 309 /* First make a frame containing just a root window, no minibuffer. */
311 Lisp_Object mini_window; 310 Lisp_Object mini_window;
312 Lisp_Object frame; 311 Lisp_Object frame = wrap_frame (f);
313 312
314 XSETFRAME (frame, f);
315 313
316 f->no_split = 1; 314 f->no_split = 1;
317 f->has_minibuffer = 1; 315 f->has_minibuffer = 1;
318 316
319 /* Now label the root window as also being the minibuffer. 317 /* Now label the root window as also being the minibuffer.
378 int first_frame_on_console = 0; 376 int first_frame_on_console = 0;
379 Lisp_Object besmirched_cons = Qnil; 377 Lisp_Object besmirched_cons = Qnil;
380 int frame_name_is_defaulted = 1; 378 int frame_name_is_defaulted = 1;
381 379
382 d = decode_device (device); 380 d = decode_device (device);
383 XSETDEVICE (device, d); 381 device = wrap_device (d);
384 382
385 /* PROPS and NAME may be freshly-created, so make sure to GCPRO. */ 383 /* PROPS and NAME may be freshly-created, so make sure to GCPRO. */
386 GCPRO3 (frame, props, name); 384 GCPRO3 (frame, props, name);
387 385
388 props = make_sure_its_a_fresh_plist (props); 386 props = make_sure_its_a_fresh_plist (props);
409 if (!NILP (Fstring_match (make_string ((const Intbyte *) "\\.", 2), name, 407 if (!NILP (Fstring_match (make_string ((const Intbyte *) "\\.", 2), name,
410 Qnil, Qnil))) 408 Qnil, Qnil)))
411 syntax_error (". not allowed in frame names", name); 409 syntax_error (". not allowed in frame names", name);
412 410
413 f = allocate_frame_core (device); 411 f = allocate_frame_core (device);
414 XSETFRAME (frame, f); 412 frame = wrap_frame (f);
415 413
416 specbind (Qframe_being_created, name); 414 specbind (Qframe_being_created, name);
417 f->name = name; 415 f->name = name;
418 416
419 FRAMEMETH (f, init_frame_1, (f, props, frame_name_is_defaulted)); 417 FRAMEMETH (f, init_frame_1, (f, props, frame_name_is_defaulted));
644 */ 642 */
645 void 643 void
646 adjust_frame_size (struct frame *f) 644 adjust_frame_size (struct frame *f)
647 { 645 {
648 int keep_char_size = 0; 646 int keep_char_size = 0;
649 Lisp_Object frame; 647 Lisp_Object frame = wrap_frame (f);
650 XSETFRAME (frame, f); 648
651 649
652 if (!f->size_slipped) 650 if (!f->size_slipped)
653 return; 651 return;
654 652
655 /* Don't adjust tty frames. #### May break when TTY have menubars. 653 /* Don't adjust tty frames. #### May break when TTY have menubars.
810 device_selected_frame (struct device *d) 808 device_selected_frame (struct device *d)
811 { 809 {
812 Lisp_Object frame = DEVICE_SELECTED_FRAME (d); 810 Lisp_Object frame = DEVICE_SELECTED_FRAME (d);
813 if (NILP (frame)) 811 if (NILP (frame))
814 { 812 {
815 Lisp_Object device; 813 Lisp_Object device = wrap_device (d);
816 XSETDEVICE (device, d); 814
817 gui_error ("No frames exist on device", device); 815 gui_error ("No frames exist on device", device);
818 } 816 }
819 return XFRAME (frame); 817 return XFRAME (frame);
820 } 818 }
821 819
902 */ 900 */
903 (console)) 901 (console))
904 { 902 {
905 Lisp_Object result; 903 Lisp_Object result;
906 904
907 XSETCONSOLE (console, decode_console (console)); 905 console = wrap_console (decode_console (console));
908 /* Just in case the machinations in delete_frame_internal() resulted 906 /* Just in case the machinations in delete_frame_internal() resulted
909 in the last-nonminibuf-frame getting out of sync, make sure and 907 in the last-nonminibuf-frame getting out of sync, make sure and
910 return the selected frame if it's acceptable. */ 908 return the selected frame if it's acceptable. */
911 result = Fselected_frame (CONSOLE_SELECTED_DEVICE (XCONSOLE (console))); 909 result = Fselected_frame (CONSOLE_SELECTED_DEVICE (XCONSOLE (console)));
912 if (!NILP (result) && !FRAME_MINIBUF_ONLY_P (XFRAME (result))) 910 if (!NILP (result) && !FRAME_MINIBUF_ONLY_P (XFRAME (result)))
957 If FRAME is nil, the selected frame is used. 955 If FRAME is nil, the selected frame is used.
958 If FRAME is the selected frame, this makes WINDOW the selected window. 956 If FRAME is the selected frame, this makes WINDOW the selected window.
959 */ 957 */
960 (frame, window)) 958 (frame, window))
961 { 959 {
962 XSETFRAME (frame, decode_frame (frame)); 960 frame = wrap_frame (decode_frame (frame));
963 CHECK_LIVE_WINDOW (window); 961 CHECK_LIVE_WINDOW (window);
964 962
965 if (! EQ (frame, WINDOW_FRAME (XWINDOW (window)))) 963 if (! EQ (frame, WINDOW_FRAME (XWINDOW (window))))
966 invalid_argument ("In `set-frame-selected-window', WINDOW is not on FRAME", Qunbound); 964 invalid_argument ("In `set-frame-selected-window', WINDOW is not on FRAME", Qunbound);
967 965
1228 If `window-system', search all window-system devices. 1226 If `window-system', search all window-system devices.
1229 Any other non-nil value means search all devices. 1227 Any other non-nil value means search all devices.
1230 */ 1228 */
1231 (frame, which_frames, which_devices)) 1229 (frame, which_frames, which_devices))
1232 { 1230 {
1233 XSETFRAME (frame, decode_frame (frame)); 1231 frame = wrap_frame (decode_frame (frame));
1234 1232
1235 return next_frame (frame, which_frames, which_devices); 1233 return next_frame (frame, which_frames, which_devices);
1236 } 1234 }
1237 1235
1238 DEFUN ("previous-frame", Fprevious_frame, 0, 3, 0, /* 1236 DEFUN ("previous-frame", Fprevious_frame, 0, 3, 0, /*
1246 See `next-frame' for an explanation of the WHICH-FRAMES and WHICH-DEVICES 1244 See `next-frame' for an explanation of the WHICH-FRAMES and WHICH-DEVICES
1247 arguments. 1245 arguments.
1248 */ 1246 */
1249 (frame, which_frames, which_devices)) 1247 (frame, which_frames, which_devices))
1250 { 1248 {
1251 XSETFRAME (frame, decode_frame (frame)); 1249 frame = wrap_frame (decode_frame (frame));
1252 1250
1253 return previous_frame (frame, which_frames, which_devices); 1251 return previous_frame (frame, which_frames, which_devices);
1254 } 1252 }
1255 1253
1256 /* Return any frame for which PREDICATE is non-zero, or return Qnil 1254 /* Return any frame for which PREDICATE is non-zero, or return Qnil
1283 any other frames exist.) */ 1281 any other frames exist.) */
1284 1282
1285 int 1283 int
1286 other_visible_frames (struct frame *f) 1284 other_visible_frames (struct frame *f)
1287 { 1285 {
1288 Lisp_Object frame; 1286 Lisp_Object frame = wrap_frame (f);
1289 1287
1290 XSETFRAME (frame, f);
1291 if (FRAME_STREAM_P (f)) 1288 if (FRAME_STREAM_P (f))
1292 return !EQ (frame, next_frame (frame, Qt, Qt)); 1289 return !EQ (frame, next_frame (frame, Qt, Qt));
1293 return !EQ (frame, next_frame (frame, Qvisible_iconic_nomini, Qt)); 1290 return !EQ (frame, next_frame (frame, Qvisible_iconic_nomini, Qt));
1294 } 1291 }
1295 1292
1322 1319
1323 /* OK to delete an already deleted frame. */ 1320 /* OK to delete an already deleted frame. */
1324 if (! FRAME_LIVE_P (f)) 1321 if (! FRAME_LIVE_P (f))
1325 return; 1322 return;
1326 1323
1327 XSETFRAME (frame, f); 1324 frame = wrap_frame (f);
1328 GCPRO1 (frame); 1325 GCPRO1 (frame);
1329 1326
1330 device = FRAME_DEVICE (f); 1327 device = FRAME_DEVICE (f);
1331 d = XDEVICE (device); 1328 d = XDEVICE (device);
1332 console = DEVICE_CONSOLE (d); 1329 console = DEVICE_CONSOLE (d);
1698 struct frame *f; 1695 struct frame *f;
1699 1696
1700 if (NILP (frame)) 1697 if (NILP (frame))
1701 { 1698 {
1702 f = selected_frame (); 1699 f = selected_frame ();
1703 XSETFRAME (frame, f); 1700 frame = wrap_frame (f);
1704 } 1701 }
1705 else 1702 else
1706 { 1703 {
1707 CHECK_FRAME (frame); 1704 CHECK_FRAME (frame);
1708 f = XFRAME (frame); 1705 f = XFRAME (frame);
1764 { 1761 {
1765 struct window *w = 1762 struct window *w =
1766 find_window_by_pixel_pos (intx, inty, XFRAME (frame)->root_window); 1763 find_window_by_pixel_pos (intx, inty, XFRAME (frame)->root_window);
1767 if (w) 1764 if (w)
1768 { 1765 {
1769 XSETWINDOW (window, w); 1766 window = wrap_window (w);
1770 1767
1771 /* Adjust the position to be relative to the window. */ 1768 /* Adjust the position to be relative to the window. */
1772 intx -= w->pixel_left; 1769 intx -= w->pixel_left;
1773 inty -= w->pixel_top; 1770 inty -= w->pixel_top;
1774 XSETINT (x, intx); 1771 x = make_int (intx);
1775 XSETINT (y, inty); 1772 y = make_int (inty);
1776 } 1773 }
1777 } 1774 }
1778 else if (FRAMEP (frame)) 1775 else if (FRAMEP (frame))
1779 window = FRAME_SELECTED_WINDOW (XFRAME (frame)); 1776 window = FRAME_SELECTED_WINDOW (XFRAME (frame));
1780 1777
1812 &obj1, &obj2); 1809 &obj1, &obj2);
1813 if (res == OVER_TEXT) 1810 if (res == OVER_TEXT)
1814 { 1811 {
1815 lisp_x = make_int (x); 1812 lisp_x = make_int (x);
1816 lisp_y = make_int (y); 1813 lisp_y = make_int (y);
1817 XSETWINDOW (window, w); 1814 window = wrap_window (w);
1818 } 1815 }
1819 } 1816 }
1820 else if (FRAMEP (frame)) 1817 else if (FRAMEP (frame))
1821 window = FRAME_SELECTED_WINDOW (XFRAME (frame)); 1818 window = FRAME_SELECTED_WINDOW (XFRAME (frame));
1822 1819
2159 int pretend); 2156 int pretend);
2160 2157
2161 static void 2158 static void
2162 store_minibuf_frame_prop (struct frame *f, Lisp_Object val) 2159 store_minibuf_frame_prop (struct frame *f, Lisp_Object val)
2163 { 2160 {
2164 Lisp_Object frame; 2161 Lisp_Object frame = wrap_frame (f);
2165 XSETFRAME (frame, f); 2162
2166 2163
2167 if (WINDOWP (val)) 2164 if (WINDOWP (val))
2168 { 2165 {
2169 if (! MINI_WINDOW_P (XWINDOW (val))) 2166 if (! MINI_WINDOW_P (XWINDOW (val)))
2170 gui_error 2167 gui_error
2202 static int 2199 static int
2203 dissect_as_face_setting (Lisp_Object sym, Lisp_Object *face_out, 2200 dissect_as_face_setting (Lisp_Object sym, Lisp_Object *face_out,
2204 Lisp_Object *face_prop_out) 2201 Lisp_Object *face_prop_out)
2205 { 2202 {
2206 Lisp_Object list = Vbuilt_in_face_specifiers; 2203 Lisp_Object list = Vbuilt_in_face_specifiers;
2207 Lisp_String *s; 2204 Lisp_Object s;
2208 2205
2209 if (!SYMBOLP (sym)) 2206 if (!SYMBOLP (sym))
2210 return 0; 2207 return 0;
2211 2208
2212 s = symbol_name (XSYMBOL (sym)); 2209 s = symbol_name (XSYMBOL (sym));
2213 2210
2214 while (!NILP (list)) 2211 while (!NILP (list))
2215 { 2212 {
2216 Lisp_Object prop = Fcar (list); 2213 Lisp_Object prop = Fcar (list);
2217 Lisp_String *prop_name; 2214 Lisp_Object prop_name;
2218 2215
2219 if (!SYMBOLP (prop)) 2216 if (!SYMBOLP (prop))
2220 continue; 2217 continue;
2221 prop_name = symbol_name (XSYMBOL (prop)); 2218 prop_name = symbol_name (XSYMBOL (prop));
2222 if (string_length (s) > string_length (prop_name) + 1 2219 if (XSTRING_LENGTH (s) > XSTRING_LENGTH (prop_name) + 1
2223 && !memcmp (string_data (prop_name), 2220 && !memcmp (XSTRING_DATA (prop_name),
2224 string_data (s) + string_length (s) 2221 XSTRING_DATA (s) + XSTRING_LENGTH (s)
2225 - string_length (prop_name), 2222 - XSTRING_LENGTH (prop_name),
2226 string_length (prop_name)) 2223 XSTRING_LENGTH (prop_name))
2227 && string_data (s)[string_length (s) - string_length (prop_name) 2224 && XSTRING_DATA (s)[XSTRING_LENGTH (s) - XSTRING_LENGTH (prop_name)
2228 - 1] == '-') 2225 - 1] == '-')
2229 { 2226 {
2230 Lisp_Object face = 2227 Lisp_Object face =
2231 Ffind_face (make_string (string_data (s), 2228 Ffind_face (make_string (XSTRING_DATA (s),
2232 string_length (s) 2229 XSTRING_LENGTH (s)
2233 - string_length (prop_name) 2230 - XSTRING_LENGTH (prop_name)
2234 - 1)); 2231 - 1));
2235 if (!NILP (face)) 2232 if (!NILP (face))
2236 { 2233 {
2237 *face_out = face; 2234 *face_out = face;
2238 *face_prop_out = prop; 2235 *face_prop_out = prop;
2353 struct frame *f = decode_frame (frame); 2350 struct frame *f = decode_frame (frame);
2354 Lisp_Object tail; 2351 Lisp_Object tail;
2355 Lisp_Object *tailp; 2352 Lisp_Object *tailp;
2356 struct gcpro gcpro1, gcpro2; 2353 struct gcpro gcpro1, gcpro2;
2357 2354
2358 XSETFRAME (frame, f); 2355 frame = wrap_frame (f);
2359 GCPRO2 (frame, plist); 2356 GCPRO2 (frame, plist);
2360 Fcheck_valid_plist (plist); 2357 Fcheck_valid_plist (plist);
2361 plist = Fcopy_sequence (plist); 2358 plist = Fcopy_sequence (plist);
2362 Fcanonicalize_lax_plist (plist, Qnil); 2359 Fcanonicalize_lax_plist (plist, Qnil);
2363 for (tail = plist; !NILP (tail); tail = Fcdr (Fcdr (tail))) 2360 for (tail = plist; !NILP (tail); tail = Fcdr (Fcdr (tail)))
2441 (frame, property, default_)) 2438 (frame, property, default_))
2442 { 2439 {
2443 struct frame *f = decode_frame (frame); 2440 struct frame *f = decode_frame (frame);
2444 Lisp_Object value; 2441 Lisp_Object value;
2445 2442
2446 XSETFRAME (frame, f); 2443 frame = wrap_frame (f);
2447 2444
2448 property = get_property_alias (property); 2445 property = get_property_alias (property);
2449 2446
2450 if (EQ (Qname, property)) return f->name; 2447 if (EQ (Qname, property)) return f->name;
2451 2448
2520 Lisp_Object result = Qnil; 2517 Lisp_Object result = Qnil;
2521 struct gcpro gcpro1; 2518 struct gcpro gcpro1;
2522 2519
2523 GCPRO1 (result); 2520 GCPRO1 (result);
2524 2521
2525 XSETFRAME (frame, f); 2522 frame = wrap_frame (f);
2526 2523
2527 /* #### for the moment (since old code uses `frame-parameters'), 2524 /* #### for the moment (since old code uses `frame-parameters'),
2528 we call `copy-sequence' on f->plist. That allows frame-parameters 2525 we call `copy-sequence' on f->plist. That allows frame-parameters
2529 to destructively convert the plist into an alist, which is more 2526 to destructively convert the plist into an alist, which is more
2530 efficient than doing it non-destructively. At some point we 2527 efficient than doing it non-destructively. At some point we
2633 */ 2630 */
2634 (frame, lines, pretend)) 2631 (frame, lines, pretend))
2635 { 2632 {
2636 struct frame *f = decode_frame (frame); 2633 struct frame *f = decode_frame (frame);
2637 int height, width; 2634 int height, width;
2638 XSETFRAME (frame, f); 2635 frame = wrap_frame (f);
2639 CHECK_INT (lines); 2636 CHECK_INT (lines);
2640 2637
2641 if (window_system_pixelated_geometry (frame)) 2638 if (window_system_pixelated_geometry (frame))
2642 { 2639 {
2643 char_to_real_pixel_size (f, 0, XINT (lines), 0, &height); 2640 char_to_real_pixel_size (f, 0, XINT (lines), 0, &height);
2660 */ 2657 */
2661 (frame, cols, pretend)) 2658 (frame, cols, pretend))
2662 { 2659 {
2663 struct frame *f = decode_frame (frame); 2660 struct frame *f = decode_frame (frame);
2664 int width, height; 2661 int width, height;
2665 XSETFRAME (frame, f); 2662 frame = wrap_frame (f);
2666 CHECK_INT (cols); 2663 CHECK_INT (cols);
2667 2664
2668 if (window_system_pixelated_geometry (frame)) 2665 if (window_system_pixelated_geometry (frame))
2669 { 2666 {
2670 char_to_real_pixel_size (f, XINT (cols), 0, &width, 0); 2667 char_to_real_pixel_size (f, XINT (cols), 0, &width, 0);
2687 */ 2684 */
2688 (frame, cols, rows, pretend)) 2685 (frame, cols, rows, pretend))
2689 { 2686 {
2690 struct frame *f = decode_frame (frame); 2687 struct frame *f = decode_frame (frame);
2691 int height, width; 2688 int height, width;
2692 XSETFRAME (frame, f); 2689 frame = wrap_frame (f);
2693 CHECK_INT (cols); 2690 CHECK_INT (cols);
2694 CHECK_INT (rows); 2691 CHECK_INT (rows);
2695 2692
2696 if (window_system_pixelated_geometry (frame)) 2693 if (window_system_pixelated_geometry (frame))
2697 char_to_real_pixel_size (f, XINT (cols), XINT (rows), &width, &height); 2694 char_to_real_pixel_size (f, XINT (cols), XINT (rows), &width, &height);
2738 int cph; 2735 int cph;
2739 int egw; 2736 int egw;
2740 int obw, obh, bdr; 2737 int obw, obh, bdr;
2741 Lisp_Object frame, window; 2738 Lisp_Object frame, window;
2742 2739
2743 XSETFRAME (frame, f); 2740 frame = wrap_frame (f);
2744 if (real_face) 2741 if (real_face)
2745 default_face_height_and_width (frame, &cph, &cpw); 2742 default_face_height_and_width (frame, &cph, &cpw);
2746 else 2743 else
2747 default_face_height_and_width_1 (frame, &cph, &cpw); 2744 default_face_height_and_width_1 (frame, &cph, &cpw);
2748 2745
2869 `left' coordinates to be recomputed even though no frame size 2866 `left' coordinates to be recomputed even though no frame size
2870 change occurs. --kyle */ 2867 change occurs. --kyle */
2871 if (in_display) 2868 if (in_display)
2872 abort (); 2869 abort ();
2873 2870
2874 XSETFRAME (frame, f); 2871 frame = wrap_frame (f);
2875 2872
2876 default_face_height_and_width (frame, &real_font_height, 0); 2873 default_face_height_and_width (frame, &real_font_height, 0);
2877 default_face_height_and_width_1 (frame, &font_height, &font_width); 2874 default_face_height_and_width_1 (frame, &font_height, &font_width);
2878 2875
2879 /* This size-change overrides any pending one for this frame. */ 2876 /* This size-change overrides any pending one for this frame. */
3168 if (f->icon_changed || f->windows_changed) 3165 if (f->icon_changed || f->windows_changed)
3169 { 3166 {
3170 Lisp_Object frame; 3167 Lisp_Object frame;
3171 Lisp_Object new_icon; 3168 Lisp_Object new_icon;
3172 3169
3173 XSETFRAME (frame, f); 3170 frame = wrap_frame (f);
3174 new_icon = glyph_image_instance (Vframe_icon_glyph, frame, 3171 new_icon = glyph_image_instance (Vframe_icon_glyph, frame,
3175 ERROR_ME_WARN, 0); 3172 ERROR_ME_WARN, 0);
3176 if (!EQ (new_icon, f->icon)) 3173 if (!EQ (new_icon, f->icon))
3177 { 3174 {
3178 f->icon = new_icon; 3175 f->icon = new_icon;