bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#6659: 24.0.50; doc string of `format'


From: Lars Magne Ingebrigtsen
Subject: bug#6659: 24.0.50; doc string of `format'
Date: Sun, 03 Jul 2011 15:03:29 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

"Drew Adams" <drew.adams@oracle.com> writes:

> 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.

I've now clarified both the manual and the doc string.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





reply via email to

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