GNU bug report logs - #14369
24.3; loop docstring does not mention hash-map

Previous Next

Package: emacs;

Reported by: Wilfred Hughes <wilfred <at> editd.com>

Date: Wed, 8 May 2013 15:45:02 UTC

Severity: minor

Found in version 24.3

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Wilfred Hughes <wilfred <at> editd.com>
To: 14369 <at> debbugs.gnu.org
Subject: bug#14369: 24.3; loop docstring does not mention hash-map
Date: Wed, 8 May 2013 14:29:39 +0100
[Message part 1 (text/plain, inline)]
Emacs' implementation of cl-loop includes support for the for-as-hash part
of Common Lisp's loop grammar.

The grammar:

for-as-hash::= var [type-spec] being {each | the}
               {{hash-key | hash-keys} {in | of} hash-table
                [using (hash-value other-var)] |
                {hash-value | hash-values} {in | of} hash-table
                [using (hash-key other-var)]}

Example usage:

(loop for key being the hash-keys of #s(hash-table data (1 2 3 4))
      do (message "key: %s" key))

However, the docstring for cl-loop does not mention this syntax. I believe
it should.

Thanks
Wilfred
[Message part 2 (text/html, inline)]

This bug report was last modified 12 years and 39 days ago.

Previous Next


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