diff options
author | Kim F. Storm <storm@cua.dk> | 2006-12-29 01:20:48 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2006-12-29 01:20:48 +0000 |
commit | f8a265f26e6dc93507aa423c2775ca1dd21550da (patch) | |
tree | 23c5305a03a57038990be6614cb9c9d1dd8e44aa | |
parent | 8f2b5ec6ecd64e0177026b550fda8515c472a52d (diff) | |
download | emacs-f8a265f26e6dc93507aa423c2775ca1dd21550da.tar.gz |
(bindat--unpack-group, bindat--length-group)
(bindat--pack-group): Let-bind COUNT during repeat block evaluation.
-rw-r--r-- | lisp/emacs-lisp/bindat.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index 792272ef88a..6053fb3cf09 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -319,8 +319,8 @@ ((eq type 'struct) (setq data (bindat--unpack-group (eval len)))) ((eq type 'repeat) - (let ((index 0)) - (while (< index len) + (let ((index 0) (count len)) + (while (< index count) (setq data (cons (bindat--unpack-group (nthcdr tail item)) data)) (setq index (1+ index))) (setq data (nreverse data)))) @@ -415,8 +415,8 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (bindat--length-group (if field (bindat-get-field struct field) struct) (eval len))) ((eq type 'repeat) - (let ((index 0)) - (while (< index len) + (let ((index 0) (count len)) + (while (< index count) (bindat--length-group (nth index (bindat-get-field struct field)) (nthcdr tail item)) @@ -559,8 +559,8 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (bindat--pack-group (if field (bindat-get-field struct field) struct) (eval len))) ((eq type 'repeat) - (let ((index 0)) - (while (< index len) + (let ((index 0) (count len)) + (while (< index count) (bindat--pack-group (nth index (bindat-get-field struct field)) (nthcdr tail item)) |