comparison src/frame.c @ 109689:ffde65bb1dd2

merge emacs-23
author Kenichi Handa <handa@etlken>
date Tue, 27 Jul 2010 16:01:48 +0900
parents 1b5ca039f5f2
children 60516122d066 bfc9f85a0e9d
comparison
equal deleted inserted replaced
108493:e5f3704cf67a 109689:ffde65bb1dd2
98 Lisp_Object Qcursor_color, Qcursor_type; 98 Lisp_Object Qcursor_color, Qcursor_type;
99 Lisp_Object Qgeometry; /* Not used */ 99 Lisp_Object Qgeometry; /* Not used */
100 Lisp_Object Qheight, Qwidth; 100 Lisp_Object Qheight, Qwidth;
101 Lisp_Object Qleft, Qright; 101 Lisp_Object Qleft, Qright;
102 Lisp_Object Qicon_left, Qicon_top, Qicon_type, Qicon_name; 102 Lisp_Object Qicon_left, Qicon_top, Qicon_type, Qicon_name;
103 Lisp_Object Qtooltip;
103 Lisp_Object Qinternal_border_width; 104 Lisp_Object Qinternal_border_width;
104 Lisp_Object Qmouse_color; 105 Lisp_Object Qmouse_color;
105 Lisp_Object Qminibuffer; 106 Lisp_Object Qminibuffer;
106 Lisp_Object Qscroll_bar_width, Qvertical_scroll_bars; 107 Lisp_Object Qscroll_bar_width, Qvertical_scroll_bars;
107 Lisp_Object Qvisibility; 108 Lisp_Object Qvisibility;
1327 { 1328 {
1328 struct frame *f; 1329 struct frame *f;
1329 struct frame *sf = SELECTED_FRAME (); 1330 struct frame *sf = SELECTED_FRAME ();
1330 struct kboard *kb; 1331 struct kboard *kb;
1331 1332
1332 int minibuffer_selected; 1333 int minibuffer_selected, tooltip_frame;
1333 1334
1334 if (EQ (frame, Qnil)) 1335 if (EQ (frame, Qnil))
1335 { 1336 {
1336 f = sf; 1337 f = sf;
1337 XSETFRAME (frame, f); 1338 XSETFRAME (frame, f);
1379 error ("Attempt to delete a surrogate minibuffer frame"); 1380 error ("Attempt to delete a surrogate minibuffer frame");
1380 } 1381 }
1381 } 1382 }
1382 } 1383 }
1383 1384
1385 tooltip_frame = !NILP (Fframe_parameter (frame, intern ("tooltip")));
1386
1384 /* Run `delete-frame-functions' unless FORCE is `noelisp' or 1387 /* Run `delete-frame-functions' unless FORCE is `noelisp' or
1385 frame is a tooltip. FORCE is set to `noelisp' when handling 1388 frame is a tooltip. FORCE is set to `noelisp' when handling
1386 a disconnect from the terminal, so we don't dare call Lisp 1389 a disconnect from the terminal, so we don't dare call Lisp
1387 code. */ 1390 code. */
1388 if (NILP (Vrun_hooks) || !NILP (Fframe_parameter (frame, intern ("tooltip")))) 1391 if (NILP (Vrun_hooks) || tooltip_frame)
1389 ; 1392 ;
1390 if (EQ (force, Qnoelisp)) 1393 else if (EQ (force, Qnoelisp))
1391 pending_funcalls 1394 pending_funcalls
1392 = Fcons (list3 (Qrun_hook_with_args, Qdelete_frame_functions, frame), 1395 = Fcons (list3 (Qrun_hook_with_args, Qdelete_frame_functions, frame),
1393 pending_funcalls); 1396 pending_funcalls);
1394 else 1397 else
1395 safe_call2 (Qrun_hook_with_args, Qdelete_frame_functions, frame); 1398 safe_call2 (Qrun_hook_with_args, Qdelete_frame_functions, frame);
1631 /* No frames left on this kboard--say no minibuffer either. */ 1634 /* No frames left on this kboard--say no minibuffer either. */
1632 kb->Vdefault_minibuffer_frame = Qnil; 1635 kb->Vdefault_minibuffer_frame = Qnil;
1633 } 1636 }
1634 1637
1635 /* Cause frame titles to update--necessary if we now have just one frame. */ 1638 /* Cause frame titles to update--necessary if we now have just one frame. */
1636 update_mode_lines = 1; 1639 if (!tooltip_frame)
1640 update_mode_lines = 1;
1637 1641
1638 return Qnil; 1642 return Qnil;
1639 } 1643 }
1640 1644
1641 DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 2, "", 1645 DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 2, "",
4449 staticpro (&Qgeometry); 4453 staticpro (&Qgeometry);
4450 Qicon_left = intern_c_string ("icon-left"); 4454 Qicon_left = intern_c_string ("icon-left");
4451 staticpro (&Qicon_left); 4455 staticpro (&Qicon_left);
4452 Qicon_top = intern_c_string ("icon-top"); 4456 Qicon_top = intern_c_string ("icon-top");
4453 staticpro (&Qicon_top); 4457 staticpro (&Qicon_top);
4458 Qtooltip = intern_c_string ("tooltip");
4459 staticpro (&Qtooltip);
4454 Qleft = intern_c_string ("left"); 4460 Qleft = intern_c_string ("left");
4455 staticpro (&Qleft); 4461 staticpro (&Qleft);
4456 Qright = intern_c_string ("right"); 4462 Qright = intern_c_string ("right");
4457 staticpro (&Qright); 4463 staticpro (&Qright);
4458 Quser_position = intern_c_string ("user-position"); 4464 Quser_position = intern_c_string ("user-position");