emacs-devel
[Top][All Lists]
Advanced

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

Re: Technically correct or conceptually easier?


From: Stefan Monnier
Subject: Re: Technically correct or conceptually easier?
Date: Thu, 02 Apr 2020 17:22:21 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> The first sentence of the documentation says:
>
>   Non-nil means disregard read-only status of buffers or characters.
>
> OK.  And what nil means?  I guess the omission of its meaning implies
> its meaning is the exact opposite of the one given to a non-nil value;
> and apparently this conjecture can be factually verified by
> experimentation.

Yes, we often rely on the abuse of "if" to mean "if and only if".
Usually those abuses allow for less verbose text, so there's
a trade-off.  I think here the trade-off is worthwhile.  At some other
places we correctly add an explicit mention of what happens if it's nil.
And of course at yet other places we made the wrong call :-(

>   If the value is a list, disregard ‘buffer-read-only’ and disregard a
>   ‘read-only’ text property if the property value is a member of the
>   list.
>
> Well, nil is a list.

I think this case is a documentation error: it should say "a non-empty
list", although admittedly, the context makes it clearish what is meant.


        Stefan "who likes `iff`"




reply via email to

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