[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why is booleanp defined this way?
From: |
Tassilo Horn |
Subject: |
Re: Why is booleanp defined this way? |
Date: |
Sat, 18 Apr 2015 08:13:26 +0200 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
Marcin Borkowski <mbork@mbork.pl> writes:
Hi Marcin,
> Of course, this "normalizes" any "truthy" value to "t", but is it
> really needed for anything (except perhaps being elegant)?
It's just as you say and the others already explained. And then have a
look where and `booleanp` is actually used. Basically all usages in
emacs itself are
(put 'some-variable 'safe-local-variable 'booleanp)
So some-variable is safe as a file-local variable only if it is either
nil or t but it is not safe when its value is (eval (shell-command "rm
-rf ~/")).
Another use-case is when you are talking to some external service that
wan't "real" (aka, non-generalized booleans) and use some marshalling
code which automatically converts nil to false and t to true.
Bye,
Tassilo
- Why is booleanp defined this way?, Marcin Borkowski, 2015/04/17
- Re: Why is booleanp defined this way?, Jorge A. Alfaro-Murillo, 2015/04/17
- Message not available
- Re: Why is booleanp defined this way?, Emanuel Berg, 2015/04/17
- Re: Why is booleanp defined this way?, Pascal J. Bourguignon, 2015/04/17
- Re: Why is booleanp defined this way?, Emanuel Berg, 2015/04/17
- Re: Why is booleanp defined this way?, Pascal J. Bourguignon, 2015/04/17
- Re: Why is booleanp defined this way?, Marcin Borkowski, 2015/04/18
- Re: Why is booleanp defined this way?, Stefan Nobis, 2015/04/18
- Re: Why is booleanp defined this way?, Emanuel Berg, 2015/04/19
RE: Why is booleanp defined this way?, Drew Adams, 2015/04/17
Re: Why is booleanp defined this way?,
Tassilo Horn <=
Re: Why is booleanp defined this way?, Rusi, 2015/04/17