From unknown Tue Jun 24 05:07:58 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#14387 <14387@debbugs.gnu.org> To: bug#14387 <14387@debbugs.gnu.org> Subject: Status: 24.3; The return value of setf is not the last VAL in the list Reply-To: bug#14387 <14387@debbugs.gnu.org> Date: Tue, 24 Jun 2025 12:07:58 +0000 retitle 14387 24.3; The return value of setf is not the last VAL in the list reassign 14387 emacs submitter 14387 =E7=99=BD=E4=BA=95 =E5=BD=B0 severity 14387 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat May 11 13:52:10 2013 Received: (at submit) by debbugs.gnu.org; 11 May 2013 17:52:10 +0000 Received: from localhost ([127.0.0.1]:36778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UbDxp-0003ew-L9 for submit@debbugs.gnu.org; Sat, 11 May 2013 13:52:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40706) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UbCrM-0000Pp-1t for submit@debbugs.gnu.org; Sat, 11 May 2013 12:41:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UbCr2-0003aI-QZ for submit@debbugs.gnu.org; Sat, 11 May 2013 12:41:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: *** X-Spam-Status: No, score=3.2 required=5.0 tests=BAYES_40, CHARSET_FARAWAY_HEADER, FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:48303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbCr2-0003a9-N8 for submit@debbugs.gnu.org; Sat, 11 May 2013 12:41:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52043) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbCqz-0006OO-Mb for bug-gnu-emacs@gnu.org; Sat, 11 May 2013 12:41:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UbCqv-0003YB-Pu for bug-gnu-emacs@gnu.org; Sat, 11 May 2013 12:41:01 -0400 Received: from mail-pb0-x235.google.com ([2607:f8b0:400e:c01::235]:48974) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbCqv-0003Y2-8K for bug-gnu-emacs@gnu.org; Sat, 11 May 2013 12:40:57 -0400 Received: by mail-pb0-f53.google.com with SMTP id un1so3437693pbc.26 for ; Sat, 11 May 2013 09:40:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:from:to:content-type :content-transfer-encoding:mime-version:subject:date:cc:x-mailer; bh=U3r69HYPs1VSMj3dJJUH04Fic8QWT9hxldJjrRjT3Dc=; b=Xa+RlpRR2R2HcE94LrsQtcSZuHwH3EQjlHhaL5/ZHu/JJYsQJ0GsEqvnO84IH05fTf lHy1KqZPtaHVjPMbBJLK3cUCnLg4rx2dLzngFP1BNviEayptRZeCoqTc5yO6Toh37RRz 1Mjfio6vKJDsdN3UEMxa4iKdOLRpqATbfPeEt04UCZb/8+H6/CNqLudUrCcR5HkAIgij tuotVMiVqsoYii/pFGh6j8axAUACD2p3dfasuogTNJHGrxKO+/yjHEBLIFawALxFFIX8 /WRe9TioiBY7uAki+2eEqZ3OQtZsnyH1kQYGBsMik1lw/Ipv7YSPPbp65t/ceVlS+zBX WeXA== X-Received: by 10.66.20.7 with SMTP id j7mr22859627pae.142.1368290455546; Sat, 11 May 2013 09:40:55 -0700 (PDT) Received: from [172.20.10.4] (pw126253199129.6.panda-world.ne.jp. [126.253.199.129]) by mx.google.com with ESMTPSA id to7sm7651929pab.0.2013.05.11.09.40.52 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 11 May 2013 09:40:54 -0700 (PDT) Message-Id: From: =?ISO-2022-JP?B?GyRCR3IwZhsoQiAbJEI+NBsoQg==?= To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: 24.3; The return value of setf is not the last VAL in the list Date: Sun, 12 May 2013 01:40:49 +0900 X-Mailer: Apple Mail (2.936) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 11 May 2013 13:52:08 -0400 Cc: okshirai@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) (describe-function 'setf) says "The return value is the last VAL in the list.", but it does not: % /Users/shiraiakira/emacs-24.3/nextstep/Emacs.app/Contents/MacOS/ Emacs -Q (require 'gv) gv (require 'cl) cl (let ((pl '(aaa bbb))) (setf (cl-getf pl 'aaa) 'ccc)) (aaa ccc) ; This should be ccc In GNU Emacs 24.3.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54) of 2013-04-30 on mini2.local Windowing system distributor `Apple', version 10.3.949 Configured using: `configure '--with-ns' '--without-x'' Important settings: value of $LANG: ja_JP.ujis locale-coding-system: japanese-iso-8bit-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: ( r e q u i r e SPC ' g v ) C-j ( r e q u i r e SPC ' c l ) C-j ( l e t SPC ( ( p l SPC ' ( a a a SPC b b b ) ) ) SPC ( s e t f SPC ( c l - g e t f SPC p l SPC ' a a a ) SPC ' c c c ) ) C-j x r e p o r t - e m a c s - b u g Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message cl-macs format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl cl-lib gv time-date japan-util tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Tue May 14 22:01:12 2013 Received: (at 14387) by debbugs.gnu.org; 15 May 2013 02:01:12 +0000 Received: from localhost ([127.0.0.1]:44922 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UcR1k-0007M1-20 for submit@debbugs.gnu.org; Tue, 14 May 2013 22:01:12 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:21061) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UcR1h-0007LL-Er for 14387@debbugs.gnu.org; Tue, 14 May 2013 22:01:10 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFG4rwb8/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJLEfkA6RCgOkeoFegxM X-IPAS-Result: Av8EABK/CFG4rwb8/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJLEfkA6RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="12056496" Received: from 184-175-6-252.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([184.175.6.252]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 14 May 2013 22:00:56 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id C8428AE0C3; Tue, 14 May 2013 22:01:00 -0400 (EDT) From: Stefan Monnier To: =?utf-8?B?55m95LqVIOW9sA==?= Subject: Re: bug#14387: 24.3; The return value of setf is not the last VAL in the list Message-ID: References: Date: Tue, 14 May 2013 22:01:00 -0400 In-Reply-To: (=?utf-8?B?IueZveS6lSDlvbAiJ3M=?= message of "Sun, 12 May 2013 01:40:49 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 14387 Cc: 14387@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > (let ((pl '(aaa bbb))) (setf (cl-getf pl 'aaa) 'ccc)) > (aaa ccc) ; This should be ccc Oops, good point. The patch below should fix it (installed in trunk). Stefan === modified file 'lisp/emacs-lisp/cl-extra.el' --- lisp/emacs-lisp/cl-extra.el 2013-01-02 16:13:04 +0000 +++ lisp/emacs-lisp/cl-extra.el 2013-05-15 01:55:53 +0000 @@ -597,8 +597,11 @@ (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, From debbugs-submit-bounces@debbugs.gnu.org Tue May 14 22:01:34 2013 Received: (at control) by debbugs.gnu.org; 15 May 2013 02:01:34 +0000 Received: from localhost ([127.0.0.1]:44925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UcR26-0007Nm-99 for submit@debbugs.gnu.org; Tue, 14 May 2013 22:01:34 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:45955) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UcR24-0007N9-CR for control@debbugs.gnu.org; Tue, 14 May 2013 22:01:32 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EABK/CFG4rwb8/2dsb2JhbABEvw4Xc4IfAQVWMws0EhQYDYhIsR+QDo1hgykDpHqBXoMT X-IPAS-Result: Av0EABK/CFG4rwb8/2dsb2JhbABEvw4Xc4IfAQVWMws0EhQYDYhIsR+QDo1hgykDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="12056535" Received: from 184-175-6-252.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([184.175.6.252]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 14 May 2013 22:01:20 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 68E71AE0C3; Tue, 14 May 2013 22:01:24 -0400 (EDT) From: Stefan Monnier To: control@debbugs.gnu.org Subject: Re: bug#14387: 24.3; The return value of setf is not the last VAL in the list Message-ID: References: Date: Tue, 14 May 2013 22:01:24 -0400 In-Reply-To: (=?utf-8?B?IueZveS6lSDlvbAiJ3M=?= message of "Sun, 12 May 2013 01:40:49 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) close 14387 thanks From unknown Tue Jun 24 05:07:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 12 Jun 2013 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator