🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99017

Bug in the Elisp Reference Manual (info documentation)

#99017
From: Christophe Muller
Date: Wed, 02 Jan 1991 20:31
45 lines
1999 bytes
[Sorry if you saw this twice, our News system is %$#$&^%&#!]

Hi,

It's probably not important at all.. :-)

in The Elisp Reference Manual

in node Lists -> Modifying Lists -> Setcdr

in second example, the picture is false, and we didn't simply "delete"
b from the list, we created a new cons for c and lost the old one (for GC :-)

Example:

(setq x1 '(a b c))      = (a b c)
(setq x2 (cdr x1))      = (b c)
(eq x2 (cdr x1))        = t
(setcdr x1 '(c))        = (c)
x1                      = (a c)
x2                      = (b c)
(cdr x1)                = (c)
(cdr x2)                = (c)
(eq (cdr x1) (cdr x2))  = nil

Here is the result in box notation:

                         
      ---------------         ---------------
     |car    |cdr    |       |car    |cdr    |
     |   a   |   o---------->|   c   |  nil  |
     |       |       |       |       |       |
      ---------------         ---------------

      ---------------         ---------------
     |car    |cdr    |       |car    |cdr    |
     |   b   |   o---------->|   c   |  nil  |
     |       |       |       |       |       |
      ---------------         ---------------


Cheers,
Christophe.

 -=- Computers are useless; they can only give answers.  -- Picasso   -=-
Technical Details
Message-ID: <28862@mimsy.umd.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!PHOENIX.SRC.UMD.EDU!muller

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,f30149908f26ba5c,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-01-02 12:31:09 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!PHOENIX.SRC.UMD.EDU!muller
From: muller@PHOENIX.SRC.UMD.EDU (Christophe Muller)
Newsgroups: gnu.emacs.bug
Subject: Bug in the Elisp Reference Manual (info documentation)
Message-ID: <28862@mimsy.umd.edu>
Date: 2 Jan 91 20:31:09 GMT
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: muller@phoenix.src.umd.edu (Christophe Muller)
Distribution: gnu
Organization: SIMULOG - 3 Av. du centre - 78182 ST QUENTIN - FRANCE -
Lines: 45
Approved: bug-gnu-emacs@prep.ai.mit.edu