GNU bug report logs - #6878
bool-vectors of length 0 signal error when aref/aset the 0th element

Previous Next

Package: emacs;

Reported by: MON KEY <monkey <at> sandpframing.com>

Date: Wed, 18 Aug 2010 04:19:02 UTC

Severity: minor

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 6878 <at> debbugs.gnu.org (full text, mbox):

From: MON KEY <monkey <at> sandpframing.com>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: Andreas Schwab <schwab <at> linux-m68k.org>, 6878 <at> debbugs.gnu.org,
	Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#6878: bool-vectors of length 0 signal error when aref/aset
	the 0th element
Date: Thu, 19 Aug 2010 13:09:35 -0400
On Thu, Aug 19, 2010 at 12:18 PM, Chong Yidong <cyd <at> stupidchicken.com> wrote:
> MON KEY <monkey <at> sandpframing.com> writes:
>
>> So why would/should Emacs let me create a bool-vectors that I can
>> neither set nor get without signalling an error?
>
> You can vconcat them.
>

Yep:

(let* ((ab (make-bool-vector 1 t))
      (abeq (cons ab ab)))
 (vconcat (car abeq) (cdr abeq)))

;=>[t t]

But, again, where is the `t' or `nil'?

(let* ((ab (make-bool-vector 0 t))
      (abeq (cons ab ab)))
 (vconcat (car abeq) (cdr abeq)))

;=> []

The manual says a `t' or `nil' "must" be there.

--
/s_P\




This bug report was last modified 14 years and 337 days ago.

Previous Next


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