[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 9025628: (format "%#x" 0) yields "0", not "0x0"
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 9025628: (format "%#x" 0) yields "0", not "0x0" |
Date: |
Mon, 23 Jul 2018 13:24:29 -0400 (EDT) |
branch: master
commit 90256285e107641b064d6ec51a9c5bb03c3eee6a
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
(format "%#x" 0) yields "0", not "0x0"
* doc/lispref/strings.texi (Formatting Strings):
* src/editfns.c (Fformat): Document this.
---
doc/lispref/strings.texi | 2 +-
src/editfns.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index f68199e..2fff3c7 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -1025,7 +1025,7 @@ both flags are used, @samp{+} takes precedence.
The flag @samp{#} specifies an alternate form which depends on
the format in use. For @samp{%o}, it ensures that the result begins
-with a @samp{0}. For @samp{%x} and @samp{%X}, it prefixes the result
+with a @samp{0}. For @samp{%x} and @samp{%X}, it prefixes nonzero results
with @samp{0x} or @samp{0X}. For @samp{%e} and @samp{%f}, the
@samp{#} flag means include a decimal point even if the precision is
zero. For @samp{%g}, it always includes a decimal point, and also
diff --git a/src/editfns.c b/src/editfns.c
index ccc0d27..09f836c 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -4202,7 +4202,7 @@ The - and 0 flags affect the width specifier, as
described below.
The # flag means to use an alternate display form for %o, %x, %X, %e,
%f, and %g sequences: for %o, it ensures that the result begins with
-\"0\"; for %x and %X, it prefixes the result with \"0x\" or \"0X\";
+\"0\"; for %x and %X, it prefixes nonzero results with \"0x\" or \"0X\";
for %e and %f, it causes a decimal point to be included even if the
precision is zero; for %g, it causes a decimal point to be
included even if the precision is zero, and also forces trailing
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 9025628: (format "%#x" 0) yields "0", not "0x0",
Paul Eggert <=