emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r104903: * cl.texi (For Clauses): @it


From: Lars Magne Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104903: * cl.texi (For Clauses): @items for hash-values and key-bindings
Date: Sun, 03 Jul 2011 14:40:59 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104903
fixes bug(s): http://debbugs.gnu.org/6599
author: Kevin Ryde <address@hidden>
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Sun 2011-07-03 14:40:59 +0200
message:
  * cl.texi (For Clauses): @items for hash-values and key-bindings
  to make them more visible when skimming.  Add examples of `using'
  clause to them, examples being clearer than a description in
  words.
modified:
  doc/misc/ChangeLog
  doc/misc/cl.texi
=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog        2011-07-01 09:42:55 +0000
+++ b/doc/misc/ChangeLog        2011-07-03 12:40:59 +0000
@@ -1,3 +1,10 @@
+2011-07-03  Kevin Ryde  <address@hidden>
+
+       * cl.texi (For Clauses): @items for hash-values and key-bindings
+       to make them more visible when skimming.  Add examples of `using'
+       clause to them, examples being clearer than a description in
+       words (bug#6599).
+
 2011-07-01  Alan Mackenzie  <address@hidden>
 
        * cc-mode.texi (Guessing the Style): New page.

=== modified file 'doc/misc/cl.texi'
--- a/doc/misc/cl.texi  2011-02-19 19:40:59 +0000
+++ b/doc/misc/cl.texi  2011-07-03 12:40:59 +0000
@@ -2449,22 +2449,33 @@
 or @code{while}.
 
 @item for @var{var} being the hash-keys of @var{hash-table}
-This clause iterates over the entries in @var{hash-table}.  For each
-hash table entry, @var{var} is bound to the entry's key.  If you write
address@hidden hash-values} instead, @var{var} is bound to the values
-of the entries.  The clause may be followed by the additional
-term @samp{using (hash-values @var{var2})} (where @code{hash-values}
-is the opposite word of the word following @code{the}) to cause
address@hidden and @var{var2} to be bound to the two parts of each
-hash table entry.
address@hidden for @var{var} being the hash-values of @var{hash-table}
+This clause iterates over the entries in @var{hash-table} with
address@hidden bound to each key, or value.  A @samp{using} clause can bind
+a second variable to the opposite part.
+
address@hidden
+(loop for k being the hash-keys of h
+            using (hash-values v)
+      do
+      (message "key %S -> value %S" k v))
address@hidden example
 
 @item for @var{var} being the key-codes of @var{keymap}
address@hidden for @var{var} being the key-bindings of @var{keymap}
 This clause iterates over the entries in @var{keymap}.
 The iteration does not enter nested keymaps but does enter inherited
 (parent) keymaps.
-You can use @samp{the key-bindings} to access the commands bound to
-the keys rather than the key codes, and you can add a @code{using}
-clause to access both the codes and the bindings together.
+A @code{using} clause can access both the codes and the bindings
+together.
+
address@hidden
+(loop for c being the key-codes of (current-local-map)
+            using (key-bindings b)
+      do
+      (message "key %S -> binding %S" c b))
address@hidden example
+
 
 @item for @var{var} being the key-seqs of @var{keymap}
 This clause iterates over all key sequences defined by @var{keymap}


reply via email to

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