Mercurial > emacs
changeset 99511:c4253d0af9b0
(x_set_alpha): Set alpha to -1 if nil given.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Wed, 12 Nov 2008 15:52:12 +0000 |
parents | a6f3b375799a |
children | 0ba1e475119f |
files | src/frame.c |
diffstat | 1 files changed, 18 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/src/frame.c Wed Nov 12 15:51:35 2008 +0000 +++ b/src/frame.c Wed Nov 12 15:52:12 2008 +0000 @@ -3654,25 +3654,24 @@ else item = arg; - if (! NILP (item)) - { - if (FLOATP (item)) - { - alpha = XFLOAT_DATA (item); - if (alpha < 0.0 || 1.0 < alpha) - args_out_of_range (make_float (0.0), make_float (1.0)); - } - else if (INTEGERP (item)) - { - ialpha = XINT (item); - if (ialpha < 0 || 100 < ialpha) - args_out_of_range (make_number (0), make_number (100)); - else - alpha = ialpha / 100.0; - } - else - wrong_type_argument (Qnumberp, item); - } + if (NILP (item)) + alpha = - 1.0; + else if (FLOATP (item)) + { + alpha = XFLOAT_DATA (item); + if (alpha < 0.0 || 1.0 < alpha) + args_out_of_range (make_float (0.0), make_float (1.0)); + } + else if (INTEGERP (item)) + { + ialpha = XINT (item); + if (ialpha < 0 || 100 < ialpha) + args_out_of_range (make_number (0), make_number (100)); + else + alpha = ialpha / 100.0; + } + else + wrong_type_argument (Qnumberp, item); newval[i] = alpha; }