unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* trivial bug in eintr
@ 2006-05-25  8:35 Ralph Moritz
  2006-05-25  9:06 ` David Kastrup
  0 siblings, 1 reply; 2+ messages in thread
From: Ralph Moritz @ 2006-05-25  8:35 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 885 bytes --]

Hello Emacs,

edition 2.14 of the Emacs Lisp Introduction (eintr) says the
following in section 7.5 (Node: setcar),

  ...
       (setq animals '(antelope giraffe lion tiger))
  ...
       (setcar animals 'hippopotamus)
  ...
       animals
            => (hippopotamus giraffe lion tiger)

  The first element on the list, `antelope' is replaced by `hippopotamus'.

     So we can see that `setcar' did not add a new element to the list as
  `cons' would have; it replaced `giraffe' with `hippopotamus'; it
  _changed_ the list.

I believe that `giraffe' should be changed to `antelope' in the last
paragraph, above.

Regards,
Ralph

-- 
Ralph Moritz
Ph:     +27 72385 0679 (cell)
        +27 31705 5268 (home)

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on Usenet?

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: trivial bug in eintr
  2006-05-25  8:35 trivial bug in eintr Ralph Moritz
@ 2006-05-25  9:06 ` David Kastrup
  0 siblings, 0 replies; 2+ messages in thread
From: David Kastrup @ 2006-05-25  9:06 UTC (permalink / raw)
  Cc: emacs-devel

"Ralph Moritz" <ralmoritz@gmail.com> writes:

> Hello Emacs,
>
> edition 2.14 of the Emacs Lisp Introduction (eintr) says the
> following in section 7.5 (Node: setcar),
>
>  ...
>       (setq animals '(antelope giraffe lion tiger))
>  ...
>       (setcar animals 'hippopotamus)
>  ...
>       animals
>            => (hippopotamus giraffe lion tiger)
>
>  The first element on the list, `antelope' is replaced by `hippopotamus'.
>
>     So we can see that `setcar' did not add a new element to the list as
>  `cons' would have; it replaced `giraffe' with `hippopotamus'; it
>  _changed_ the list.
>
> I believe that `giraffe' should be changed to `antelope' in the last
> paragraph, above.

Fixed.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-05-25  9:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-25  8:35 trivial bug in eintr Ralph Moritz
2006-05-25  9:06 ` David Kastrup

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).