From: Paul Eggert Date: Thu, 20 Mar 2014 17:58:01 +0000 (-0700) Subject: * internals.texi (C Integer Types): Prefer 'false' and 'true' X-Git-Tag: emacs-25.0.90~2612^2~709^2~1175^2~26^2~6^2~4 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4c073dab2aad714c148c6d5e9e9b488e9af9bfbc;p=emacs.git * internals.texi (C Integer Types): Prefer 'false' and 'true' to '0' and '1' for booleans. --- diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index fb79a74405b..c2d6c8d7012 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2014-03-20 Paul Eggert + + * internals.texi (C Integer Types): Prefer 'false' and 'true' + to '0' and '1' for booleans. + 2014-03-19 Paul Eggert * numbers.texi: Improve and clarify a bit, and fix some minor bugs. diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index 3eaef134f74..d91b0349810 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi @@ -1620,10 +1620,10 @@ might not be. Single-bit bit fields are invariably @code{unsigned int} so that their values are 0 and 1. @item -In C, Emacs commonly uses @code{bool}, 1, and 0 for boolean values. -Using @code{bool} for booleans can make programs easier to read and a -bit faster than using @code{int}. Although it is also OK to use -@code{int}, this older style is gradually being phased out. When +Prefer @code{bool}, @code{false} and @code{true} for booleans. +Using @code{bool} can make programs easier to read and a bit faster than +using @code{int}. Although it is also OK to use @code{int}, @code{0} +and @code{1}, this older style is gradually being phased out. When using @code{bool}, respect the limitations of the replacement implementation of @code{bool}, as documented in the source file @file{lib/stdbool.in.h}, so that Emacs remains portable to pre-C99