GNU bug report logs - #48
bugs in (loop for ... being the key-codes|key-seqs ...)

Previous Next

Package: emacs;

Reported by: "Jonas Bernoulli" <jonas <at> bernoulli.cc>

Date: Mon, 10 Mar 2008 16:15:06 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Jonas Bernoulli" <jonas <at> bernoulli.cc>
To: bug-gnu-emacs <at> gnu.org
Subject: bugs in (loop for ... being the key-codes|key-seqs ...)
Date: Mon, 10 Mar 2008 14:28:24 +0100
Both 22.1 and 23.0.60 are affected.

(loop for key being the key-seqs of
      (let ((map (make-sparse-keymap)))
	(define-key map "a" 'a-97)
	(define-key map "b" 'b-98)
	map)
      collect key)

=> ([97] [97])

but should be:

=> ([98] [97])


(loop for key being the key-codes of
      (let ((map (make-sparse-keymap)))
	(define-key map "a" 'a-97)
	(define-key map "b" 'b-98)
	(set-keymap-parent map
			   (let ((map (make-sparse-keymap)))
			     (define-key map "c" 'c-99)
			     map))
	map)
      collect key)

=> (98 97 99)

but should be:

=> (98 97)

`for VAR being the key-codes of KEYMAP'
     This clause iterates over the entries in KEYMAP.  The iteration
     does not enter nested keymaps or inherited (parent) keymaps.

-- jonas





This bug report was last modified 17 years and 127 days ago.

Previous Next


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