bug#41808: 28.0.50; Various battery.el improvements

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#41808: 28.0.50; Various battery.el improvements

Eli Zaretskii
> From: "Basil L. Contovounesios" <[hidden email]>
> Date: Thu, 11 Jun 2020 16:47:40 +0100
> Cc: mattias engdegård <[hidden email]>
>
> - ((fboundp 'w32-battery-status)
> +        ((functionp 'w32-battery-status)
>   #'w32-battery-status))

Is something wrong with fboundp?  I think we have dozens if not
hundreds of such uses of fboundp, so if something's wrong with it, we
had better fixed them all.



Reply | Threaded
Open this post in threaded view
|

bug#41808: 28.0.50; Various battery.el improvements

Basil L. Contovounesios
Eli Zaretskii <[hidden email]> writes:

>> From: "Basil L. Contovounesios" <[hidden email]>
>> Date: Thu, 11 Jun 2020 16:47:40 +0100
>> Cc: mattias engdegård <[hidden email]>
>>
>> - ((fboundp 'w32-battery-status)
>> +        ((functionp 'w32-battery-status)
>>   #'w32-battery-status))
>
> Is something wrong with fboundp?  I think we have dozens if not
> hundreds of such uses of fboundp, so if something's wrong with it, we
> had better fixed them all.

The only reason I switched to functionp is because
battery-status-function is passed to funcall, but now that I think about
it again we're only checking whether the definition exists at all here,
so I reverted to fboundp.

Thanks,

--
Basil



Reply | Threaded
Open this post in threaded view
|

bug#41808: 28.0.50; Various battery.el improvements

Basil L. Contovounesios
tags 41808 fixed
close 41808 28.1
quit

Pushed to master and closing.

Various battery.el improvements (bug#41808)
23a148c950 2020-06-18 12:58:28 +0100
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=23a148c9506f2a5bce71bd5c8822bb7cde6697e8

--
Basil