all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Rafael D Sorkin <rsorkin@perimeterinstitute.ca>
Cc: 24270-done@debbugs.gnu.org
Subject: bug#24270: Seeming bug in `setf'
Date: Sat, 20 Aug 2016 16:03:34 +0200	[thread overview]
Message-ID: <87r39j4jwp.fsf@web.de> (raw)
In-Reply-To: <E1bazHd-0006nA-7E@mars.pi.local> (Rafael D. Sorkin's message of "Sat, 20 Aug 2016 01:57:29 -0400")

Hello Rafael,

> (emacs-version) ; GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version
> 3.10.7) of 2014-03-07 on lamiak, modified by Debian
>
> (setq z ())
> (getf z  'indic)			; nil
> (setf (getf z 'indic) 6)		; (indic 6)  SHOULD BE JUST 6
> (getf z  'indic)			; 6  okay

Thanks for reporting.  Yes, there was such a bug, but your Emacs version
is very old...and the bug has been fixed in the meantime (three years
ago) in


c46c57b, Stefan Monnier <monnier@iro.umontreal.ca>

* lisp/emacs-lisp/cl-extra.el (cl-getf): Return the proper value in
the setter.

Fixes: debbugs:14387


modified   lisp/emacs-lisp/cl-extra.el
@@ -597,8 +597,11 @@ cl-getf
                   (macroexp-let2 nil d def
                     (funcall do `(cl-getf ,getter ,k ,d)
                              (lambda (v)
-                               (funcall setter
-                                        `(cl--set-getf ,getter ,k ,v))))))))))
+                               (macroexp-let2 nil val v
+                                 `(progn
+                                    ,(funcall setter
+                                              `(cl--set-getf ,getter ,k ,val))
+                                    ,val))))))))))
   (setplist '--cl-getf-symbol-- plist)
   (or (get '--cl-getf-symbol-- tag)
       ;; Originally we called cl-get here,
modified   lisp/emacs-lisp/cl-loaddefs.el


Regards,

Michael.





  reply	other threads:[~2016-08-20 14:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-20  5:57 bug#24270: Seeming bug in `setf' Rafael D Sorkin
2016-08-20 14:03 ` Michael Heerdegen [this message]
2016-08-20 14:03 ` Nicolas Petton
2016-08-22  0:34 ` Rafael D Sorkin
2016-08-22 10:53   ` Nicolas Petton
2016-08-22 11:05     ` Michael Heerdegen
2016-08-23  2:55 ` Rafael D Sorkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r39j4jwp.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=24270-done@debbugs.gnu.org \
    --cc=rsorkin@perimeterinstitute.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.