emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 6ebce84ff2b: Use t for non-nil default values in boolean defc


From: Andreas Schwab
Subject: Re: master 6ebce84ff2b: Use t for non-nil default values in boolean defcustom declarations
Date: Tue, 02 May 2023 18:42:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

On Mai 02 2023, Robert Pluim wrote:

>>>>>> On Sat, 29 Apr 2023 13:23:42 +0200, Andreas Schwab 
>>>>>> <schwab@linux-m68k.org> said:
>
>     Andreas> On Apr 29 2023, Michael Albinus wrote:
>     >> Mattias Engdegård <mattiase@acm.org> writes:
>     >> 
>     >> Hi Mattias,
>     >> 
>     >>> Use t for non-nil default values in boolean defcustom declarations
>     >>> 
>     >>> +(defcustom viper-ms-style-os-p
>     >>> +  (not (not (memq system-type '(ms-dos windows-nt))))
>     >> 
>     >> I'm just curious. Is there an advantage in using the (not (not ...))
>     >> pattern?
>
>     Andreas> Logically, (not (null ...)) would fit better.
>
>     Andreas> (not is just an alias of null, so both are the same, of course).
>
> Yes, but (not (not ...)) maps nicely to '!!' in C

C doesn't have lists, and memq returns a list.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]