# HG changeset patch # User james # Date 1077031329 0 # Node ID d1312c7bdfab5e04a182525199ac0a0030b4e850 # Parent 7473844a83d3e8a04bd5edd39a6c6353584a2fee [xemacs-hg @ 2004-02-17 15:22:09 by james] Evaluate safely when in redisplay. diff -r 7473844a83d3 -r d1312c7bdfab src/gui-x.c --- a/src/gui-x.c Tue Feb 17 15:20:57 2004 +0000 +++ b/src/gui-x.c Tue Feb 17 15:22:09 2004 +0000 @@ -318,11 +318,12 @@ #if 1 /* Eval the activep slot of the menu item */ -# define wv_set_evalable_slot(slot,form) do { \ - Lisp_Object wses_form = (form); \ - (slot) = (NILP (wses_form) ? 0 : \ - EQ (wses_form, Qt) ? 1 : \ - !NILP (Feval (wses_form))); \ +# define wv_set_evalable_slot(slot,form) do { \ + Lisp_Object wses_form = (form); \ + (slot) = (NILP (wses_form) ? 0 : \ + EQ (wses_form, Qt) ? 1 : \ + !NILP (in_display ? eval_within_redisplay (wses_form) \ + : Feval (wses_form))); \ } while (0) #else /* Treat the activep slot of the menu item as a boolean */