Skip to content

Conversation

@svetlyak40wt
Copy link
Contributor

Example produced wrong results:

CL-USER> (format nil "Items:~#[ none~; ~S~; ~S and ~S~:;~@{~#[~; and~] ~S~^ ,~}~]." :foo :bar :baz :kadabr)
"Items: :FOO , :BAR , :BAZ , and :KADABR."

With this fix, it uses commas correctly:

CL-USER> (format nil "Items: ~#[ none~; ~S~; ~S and ~S~:;~@{~S~^~#[~; and ~:;, ~]~}~]." :foo :bar :baz :kadabr)
"Items: :FOO, :BAR, :BAZ and :KADABR."

Example produced wrong results:
```
CL-USER> (format nil "Items:~#[ none~; ~S~; ~S and ~S~:;~@{~#[~; and~] ~S~^ ,~}~]." :foo :bar :baz :kadabr)
"Items: :FOO , :BAR , :BAZ , and :KADABR."
```

With this fix, it uses commas correctly:

```
CL-USER> (format nil "Items: ~#[ none~; ~S~; ~S and ~S~:;~@{~S~^~#[~; and ~:;, ~]~}~]." :foo :bar :baz :kadabr)
"Items: :FOO, :BAR, :BAZ and :KADABR."
```
@svetlyak40wt svetlyak40wt changed the title Fixed "full hairy example" of formatting control string Fixed "full hairy example" of formatting control string in Common Lisp style guide Jul 30, 2017
@gfavors21
Copy link

Ok

@svetlyak40wt
Copy link
Contributor Author

@kevinlindkvist is it possible to merge this pull?

@svetlyak40wt
Copy link
Contributor Author

Guys, are there any chances this pull will be merged?

@svetlyak40wt
Copy link
Contributor Author

@gfavors21 please, merge the pull request.

@svetlyak40wt
Copy link
Contributor Author

What does this mean "cla:yes?

@svetlyak40wt
Copy link
Contributor Author

Guys, please, merge this pull!

@svetlyak40wt
Copy link
Contributor Author

@tonyruscoe Tony, could you please merge this pull-request?

@tonyruscoe
Copy link
Member

Apologies for the silence here. I’m following up with the owners of the Common Lisp Style Guide at Google, since it looks like this file is out of sync with our internal version. Thanks for your patience!

@svetlyak40wt
Copy link
Contributor Author

Great! Thank you!

@sfreilich sfreilich merged commit 276f2d9 into google:gh-pages May 27, 2020
@svetlyak40wt
Copy link
Contributor Author

Thank you, @sfreilich!

zasgar referenced this pull request in pixie-io/cpplint Sep 2, 2021
Fixed "full hairy example" of formatting control string in Common Lisp style guide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants