GNU bug report logs - #6659
24.0.50; doc string of `format'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 16 Jul 2010 21:50:03 UTC

Severity: minor

Tags: fixed

Found in version 24.0.50

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Drew Adams" <drew.adams <at> oracle.com>
To: 6659 <at> debbugs.gnu.org
Subject: bug#6659: 24.0.50; doc string of `format'
Date: Fri, 16 Jul 2010 14:48:51 -0700
The Elisp manual says this about the 0 and - flags for `format':
 
 "The flag `-' causes the padding inserted by the width specifier, if
 any, to be inserted on the right rather than the left.  The flag `0'
 ensures that the padding consists of `0' characters instead of spaces,
 inserted on the left.  These flags are ignored for specification
 characters for which they do not make sense: `%s', `%S' and `%c' accept
 the `0' flag, but still pad with _spaces_ on the left."
 
1. What does "for which they do not make sense" mean, exactly?  The text
goes on to say that `0' is never used for the non-numeric specs.  But it
says nothing about `-'.  When does `-' "not make sense"?
 
2. That information about `-' and `0' being ignored in some cases is
completely missing from the doc string for `format'.  The doc string in
fact contradicts this, saying that "The padding character is normally a
space, but it is 0 if the 0 flag is present."  That sentence is false
for anything except a number spec - it is never 0 for a number spec.
 
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-07-12 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags -Ic:/xpm/include'
 





This bug report was last modified 14 years and 19 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.