GNU bug report logs - #79673
[PATCH] (setf (plist-get x) y) returns wrong value when setting new keys

Previous Next

Package: emacs;

Reported by: Jacob Komissar <dev <at> jacob.komissar.net>

Date: Wed, 22 Oct 2025 07:15:03 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 79673 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#79673; Package emacs. (Wed, 22 Oct 2025 07:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jacob Komissar <dev <at> jacob.komissar.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 22 Oct 2025 07:15:04 GMT) Full text and rfc822 format available.

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

From: Jacob Komissar <dev <at> jacob.komissar.net>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] (setf (plist-get x) y) returns wrong value when setting new
 keys
Date: Tue, 21 Oct 2025 21:51:27 -0400
[Message part 1 (text/plain, inline)]
I noticed that this code returns the full plist instead of just the
newly-set value, contrary to the documentation for setf.

    (let ((plist '(:a 1)))
      (setf (plist-get :b) 2))

I've attached a patch that fixes the plist-get gv expander to return the
correct value.

---Jacob Komissar
[0001-Make-plist-get-s-gv-setter-return-the-new-value.patch (text/x-patch, attachment)]

This bug report was last modified 14 days ago.

Previous Next


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