comparison src/gui.c @ 5118:e0db3c197671 ben-lisp-object

merge up to latest default branch, doesn't compile yet
author Ben Wing <ben@xemacs.org>
date Sat, 26 Dec 2009 21:18:49 -0600
parents 3742ea8250b5 8f1ee2d15784
children 623d57b7fbe8
comparison
equal deleted inserted replaced
5117:3742ea8250b5 5118:e0db3c197671
380 380
381 static int 381 static int
382 gui_item_value (Lisp_Object form) 382 gui_item_value (Lisp_Object form)
383 { 383 {
384 /* This function can call Lisp. */ 384 /* This function can call Lisp. */
385
386 #ifndef ERROR_CHECK_DISPLAY 385 #ifndef ERROR_CHECK_DISPLAY
387 /* Shortcut to avoid evaluating Qt/Qnil each time; but don't do it when 386 /* Shortcut to avoid evaluating Qt/Qnil each time; but don't do it when
388 error-checking so we catch unprotected eval within redisplay quicker */ 387 error-checking so we catch unprotected eval within redisplay quicker */
389 if (NILP (form)) 388 if (NILP (form))
390 return 0; 389 return 0;
391 if (EQ (form, Qt)) 390 if (EQ (form, Qt))
392 return 1; 391 return 1;
393 #endif 392 #endif
394 return !NILP (in_display ? eval_within_redisplay (form) : Feval (form)); 393 return !NILP (in_display ?
394 IGNORE_MULTIPLE_VALUES (eval_within_redisplay (form))
395 : IGNORE_MULTIPLE_VALUES (Feval (form)));
395 } 396 }
396 397
397 /* 398 /*
398 * Decide whether a GUI item is active by evaluating its :active form 399 * Decide whether a GUI item is active by evaluating its :active form
399 * if any 400 * if any
505 Lisp_Object suffix = pgui_item->suffix; 506 Lisp_Object suffix = pgui_item->suffix;
506 /* Shortcut to avoid evaluating suffix each time */ 507 /* Shortcut to avoid evaluating suffix each time */
507 if (!STRINGP (suffix)) 508 if (!STRINGP (suffix))
508 { 509 {
509 suffix = Feval (suffix); 510 suffix = Feval (suffix);
511 suffix = IGNORE_MULTIPLE_VALUES (suffix);
510 CHECK_STRING (suffix); 512 CHECK_STRING (suffix);
511 } 513 }
512 514
513 retval = concat3 (pgui_item->name, build_string (" "), suffix); 515 retval = concat3 (pgui_item->name, build_string (" "), suffix);
514 } 516 }
798 GCPRO1 (ret); 800 GCPRO1 (ret);
799 ret = Fcons (ret, parse_gui_item_tree_children (XCDR (list))); 801 ret = Fcons (ret, parse_gui_item_tree_children (XCDR (list)));
800 RETURN_UNGCPRO (ret); 802 RETURN_UNGCPRO (ret);
801 } 803 }
802 804
803 static void 805 DEFINE_NODUMP_LISP_OBJECT ("gui-item", gui_item,
804 finalize_gui_item (void *UNUSED (header), int UNUSED (for_disksave)) 806 mark_gui_item, print_gui_item,
805 { 807 0, gui_item_equal,
806 } 808 gui_item_hash,
807 809 gui_item_description,
808 DEFINE_NONDUMPABLE_LISP_OBJECT ("gui-item", gui_item, 810 Lisp_Gui_Item);
809 mark_gui_item, print_gui_item,
810 finalize_gui_item, gui_item_equal,
811 gui_item_hash,
812 gui_item_description,
813 Lisp_Gui_Item);
814 811
815 DOESNT_RETURN 812 DOESNT_RETURN
816 gui_error (const Ascbyte *reason, Lisp_Object frob) 813 gui_error (const Ascbyte *reason, Lisp_Object frob)
817 { 814 {
818 signal_error (Qgui_error, reason, frob); 815 signal_error (Qgui_error, reason, frob);