[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

shiftf is not parallel

From: Kalle Olavi Niemitalo
Subject: shiftf is not parallel
Date: 14 Apr 2001 21:01:27 +0300

In GNU Emacs 20.6.4 (i386-debian-linux-gnu, X toolkit)
 of Thu Jun  1 2000 on PC486
configured using `configure  i386-debian-linux-gnu --prefix=/usr 
--sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib 
--infodir=/usr/share/info --with-pop=yes --with-x=yes --with-x-toolkit=yes'

According to Info: (cl)Modify Macros, "(shiftf A B C D) is
equivalent to (prog1 A (psetf A B B C C D)) except that the
subforms of A, B, and C are actually evaluated only once each and
in the apparent order."  This implies that D is evaluated using
the original values of A, B and C.  However:

(let ((a 1) (b 2))
  (shiftf a b (cons a b))
=> (2 . 2)

(let ((a 1) (b 2))
  (prog1 a
    (psetf a b
           b (cons a b)))
=> (1 . 2)

I believe both expressions should return the same thing.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]