Mercurial > emacs
changeset 40802:82e6baf4446f
(x_set_frame_parameters): Avoid infinite recursion.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 07 Nov 2001 08:33:33 +0000 |
parents | f49e883aeab2 |
children | 1f33171d77f6 |
files | src/xfns.c |
diffstat | 1 files changed, 22 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xfns.c Wed Nov 07 08:03:55 2001 +0000 +++ b/src/xfns.c Wed Nov 07 08:33:33 2001 +0000 @@ -906,13 +906,18 @@ { register Lisp_Object param_index, old_value; - param_index = Fget (prop, Qx_frame_parameter); old_value = get_frame_param (f, prop); - store_frame_param (f, prop, val); - if (NATNUMP (param_index) - && (XFASTINT (param_index) - < sizeof (x_frame_parms)/sizeof (x_frame_parms[0]))) - (*x_frame_parms[XINT (param_index)].setter)(f, val, old_value); + + if (NILP (Fequal (val, old_value))) + { + store_frame_param (f, prop, val); + + param_index = Fget (prop, Qx_frame_parameter); + if (NATNUMP (param_index) + && (XFASTINT (param_index) + < sizeof (x_frame_parms)/sizeof (x_frame_parms[0]))) + (*x_frame_parms[XINT (param_index)].setter)(f, val, old_value); + } } } @@ -943,13 +948,18 @@ { register Lisp_Object param_index, old_value; - param_index = Fget (prop, Qx_frame_parameter); old_value = get_frame_param (f, prop); - store_frame_param (f, prop, val); - if (NATNUMP (param_index) - && (XFASTINT (param_index) - < sizeof (x_frame_parms)/sizeof (x_frame_parms[0]))) - (*x_frame_parms[XINT (param_index)].setter)(f, val, old_value); + + if (NILP (Fequal (val, old_value))) + { + store_frame_param (f, prop, val); + + param_index = Fget (prop, Qx_frame_parameter); + if (NATNUMP (param_index) + && (XFASTINT (param_index) + < sizeof (x_frame_parms)/sizeof (x_frame_parms[0]))) + (*x_frame_parms[XINT (param_index)].setter)(f, val, old_value); + } } }