From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 08 11:45:11 2011 Received: (at submit) by debbugs.gnu.org; 8 Aug 2011 15:45:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QqS0r-0006Un-OF for submit@debbugs.gnu.org; Mon, 08 Aug 2011 11:45:11 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QqKbH-0002yh-Oj for submit@debbugs.gnu.org; Mon, 08 Aug 2011 03:50:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqKaH-0003Fo-It for submit@debbugs.gnu.org; Mon, 08 Aug 2011 03:49:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:52046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqKaH-0003Fk-HO for submit@debbugs.gnu.org; Mon, 08 Aug 2011 03:49:13 -0400 Received: from eggs.gnu.org ([140.186.70.92]:53593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqKaG-0006k9-9j for bug-gnu-emacs@gnu.org; Mon, 08 Aug 2011 03:49:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqKaE-0003FW-MC for bug-gnu-emacs@gnu.org; Mon, 08 Aug 2011 03:49:12 -0400 Received: from mail-iy0-f175.google.com ([209.85.210.175]:48647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqKaE-0003FQ-Ha for bug-gnu-emacs@gnu.org; Mon, 08 Aug 2011 03:49:10 -0400 Received: by iyn15 with SMTP id 15so6455860iyn.6 for ; Mon, 08 Aug 2011 00:49:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.131.71 with SMTP id y7mr5398911ics.315.1312789748832; Mon, 08 Aug 2011 00:49:08 -0700 (PDT) Received: by 10.42.170.197 with HTTP; Mon, 8 Aug 2011 00:49:04 -0700 (PDT) X-Originating-IP: [114.217.231.129] Date: Mon, 8 Aug 2011 15:49:04 +0800 X-Google-Sender-Auth: 3AKMhasQsbnZ5vrM-tdi_YBxf5s Message-ID: Subject: `let' behavior is strange From: =?UTF-8?B?5bCP5rGf5rKI?= To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=90e6ba212173a4dad704a9f9ae65 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 08 Aug 2011 11:45:08 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.6 (------) --90e6ba212173a4dad704a9f9ae65 Content-Type: text/plain; charset=UTF-8 (progn (put 'defun 'x "out") (let ((old (plist-member (symbol-plist 'defun) 'x))) (message "old: %s." old) (put 'defun 'x "in") (message "old: %s." old) nil)) When I eval this form, I get something like this in *message* buffer: old: (x out). old: (x in). nil I thought it should be: old: (x out). old: (x out). nil If it is not a bug, how can I save the prev symbol property? Thank you. In GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.4) of 2011-04-11 on brahms, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11002000 configured using `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.3/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.3/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.utf8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-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-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x r e p o r Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Load-path shadows: /usr/share/emacs/23.3/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs/23.3/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.3/lisp/textmodes/flyspell /usr/share/emacs/23.3/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.3/lisp/textmodes/ispell Features: (shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug help-mode easymenu view tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs) --90e6ba212173a4dad704a9f9ae65 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
(progn (put 'defun 'x "out")
=C2=A0 =C2=A0= =C2=A0 =C2=A0(let ((old (plist-member (symbol-plist 'defun) 'x)))<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(message "old: %s." o= ld)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(put 'defun 'x &quo= t;in")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(message "old: %s." old)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nil))

W= hen I eval this form, I get something like this in *message* buffer:
<= div>old: (x out).
old: (x in).
nil

I thought it should be:
old: (x= out).
old: (x out).
nil

If it= is not a bug, how can I save the prev symbol property?

Thank you.



In G= NU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.4)
=C2=A0= of 2011-04-11 on brahms, modified by Debian
Windowing system dist= ributor `The X.Org Foundation', version 11.0.11002000
configured using `configure =C2=A0'--build' 'x86_64-linux-= gnu' '--build' 'x86_64-linux-gnu' '--prefix=3D/usr&= #39; '--sharedstatedir=3D/var/lib' '--libexecdir=3D/usr/lib'= ; '--localstatedir=3D/var/lib' '--infodir=3D/usr/share/info'= ; '--mandir=3D/usr/share/man' '--with-pop=3Dyes' '--ena= ble-locallisppath=3D/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.3/sit= e-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.3/site-lisp:/us= r/share/emacs/site-lisp:/usr/share/emacs/23.3/leim' '--with-x=3Dyes= ' '--with-x-toolkit=3Dgtk' '--with-toolkit-scroll-bars'= 'build_alias=3Dx86_64-linux-gnu' 'CFLAGS=3D-DDEBIAN -g -O2'= ; 'LDFLAGS=3D-g' 'CPPFLAGS=3D''

Important settings:
=C2=A0 value of $LC_ALL: = nil
=C2=A0 value of $LC_COLLATE: nil
=C2=A0 value of $L= C_CTYPE: nil
=C2=A0 value of $LC_MESSAGES: nil
=C2=A0 v= alue of $LC_MONETARY: nil
=C2=A0 value of $LC_NUMERIC: nil
=C2=A0 value of $LC_TIME: n= il
=C2=A0 value of $LANG: en_US.utf8
=C2=A0 value of $X= MODIFIERS: @im=3Dibus
=C2=A0 locale-coding-system: utf-8-unix
=C2=A0 default enable-multibyte-characters: t

Major mode: Lisp Interaction

M= inor modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 mou= se-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-ba= r-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mod= e: t
=C2=A0 line-number-mode: t
=C2=A0 transient-mark-mode: t

Recent input:
M-x r e p o <tab> r <tab> <return>
Recent messages:
For information about GNU Emacs and = the GNU system, type C-h C-a.
Making completion list...

Load-path shadows:<= /div>
/usr/share/emacs/23.3/site-lisp/debian-startup hides /usr/share/e= macs/site-lisp/debian-startup
/usr/share/emacs/23.3/site-lisp/dic= tionaries-common/flyspell hides /usr/share/emacs/23.3/lisp/textmodes/flyspe= ll
/usr/share/emacs/23.3/site-lisp/dictionaries-common/ispell hides /usr/= share/emacs/23.3/lisp/textmodes/ispell

Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc82= 2 mml
mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-pars= e
rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-= util
netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailhe= ader canlock
sha1 hex-util hashcash mail-utils emacsbug help-mode easymenu view
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
=
font-setting tool-bar dnd fontset image fringe lisp-mode register page=
menu-bar rfn-eshadow timer select scroll-bar mldrag 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 heb= rew
greek romanian slovak czech european ethiopic indian cyrillic chinese<= /div>
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs but= ton
minibuffer faces cus-face files text-properties overlay md5 b= ase64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)

--90e6ba212173a4dad704a9f9ae65-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 08 13:17:03 2011 Received: (at 9261) by debbugs.gnu.org; 8 Aug 2011 17:17:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QqTRn-00011g-6i for submit@debbugs.gnu.org; Mon, 08 Aug 2011 13:17:03 -0400 Received: from mail-out.m-online.net ([212.18.0.9]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QqTRj-00011E-IU for 9261@debbugs.gnu.org; Mon, 08 Aug 2011 13:17:00 -0400 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 74F9C1C01D83; Mon, 8 Aug 2011 19:15:55 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 47DCE1C000A5; Mon, 8 Aug 2011 19:15:55 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id rv9xURvhw871; Mon, 8 Aug 2011 19:15:55 +0200 (CEST) Received: from igel.home (ppp-88-217-127-53.dynamic.mnet-online.de [88.217.127.53]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 8 Aug 2011 19:15:54 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id E87B6CA293; Mon, 8 Aug 2011 19:15:53 +0200 (CEST) From: Andreas Schwab To: =?utf-8?B?5bCP5rGf5rKI?= Subject: Re: bug#9261: `let' behavior is strange References: X-Yow: I'm not an Iranian!! I voted for Dianne Feinstein!! Date: Mon, 08 Aug 2011 19:15:53 +0200 In-Reply-To: (=?utf-8?B?IuWwj+axn+ayiCIncw==?= message of "Mon, 8 Aug 2011 15:49:04 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 9261 Cc: 9261@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.6 (--) 小江沈 writes: > (progn (put 'defun 'x "out") > (let ((old (plist-member (symbol-plist 'defun) 'x))) > (message "old: %s." old) > (put 'defun 'x "in") > (message "old: %s." old) > nil)) > > When I eval this form, I get something like this in *message* buffer: > old: (x out). > old: (x in). > nil This has nothing to do with let. plist-member returns a tail of the property list, and when the value of an existing property is changed only the cdr of the cons cell is overwritten by put, so the reference to the cons cell in `old' will follow the change. > If it is not a bug, how can I save the prev symbol property? Use plist-get or get to extract the property value, or make a copy. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 08 22:45:32 2011 Received: (at 9261) by debbugs.gnu.org; 9 Aug 2011 02:45:32 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QqcJv-0007PY-MT for submit@debbugs.gnu.org; Mon, 08 Aug 2011 22:45:31 -0400 Received: from mail-iy0-f182.google.com ([209.85.210.182]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QqcJq-0007PO-7w for 9261@debbugs.gnu.org; Mon, 08 Aug 2011 22:45:27 -0400 Received: by iye1 with SMTP id 1so10362981iye.13 for <9261@debbugs.gnu.org>; Mon, 08 Aug 2011 19:44:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.147.198 with SMTP id o6mr6716942icv.181.1312857860225; Mon, 08 Aug 2011 19:44:20 -0700 (PDT) Received: by 10.42.170.197 with HTTP; Mon, 8 Aug 2011 19:44:20 -0700 (PDT) X-Originating-IP: [173.230.145.92] In-Reply-To: References: Date: Tue, 9 Aug 2011 10:44:20 +0800 X-Google-Sender-Auth: 1ctcu7njs_90S4wJH2MZX4YSHrM Message-ID: Subject: Re: bug#9261: `let' behavior is strange From: =?UTF-8?B?5bCP5rGf5rKI?= To: Andreas Schwab Content-Type: multipart/alternative; boundary=90e6ba1efd266638cb04aa098a3f X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 9261 Cc: 9261@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.6 (---) --90e6ba1efd266638cb04aa098a3f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks, `plist-get' does work. 2011/8/9 Andreas Schwab > =E5=B0=8F=E6=B1=9F=E6=B2=88 writes: > > > (progn (put 'defun 'x "out") > > (let ((old (plist-member (symbol-plist 'defun) 'x))) > > (message "old: %s." old) > > (put 'defun 'x "in") > > (message "old: %s." old) > > nil)) > > > > When I eval this form, I get something like this in *message* buffer: > > old: (x out). > > old: (x in). > > nil > > This has nothing to do with let. plist-member returns a tail of the > property list, and when the value of an existing property is changed > only the cdr of the cons cell is overwritten by put, so the reference to > the cons cell in `old' will follow the change. > > > If it is not a bug, how can I save the prev symbol property? > > Use plist-get or get to extract the property value, or make a copy. > > Andreas. > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED= 5 > "And now for something completely different." > --90e6ba1efd266638cb04aa098a3f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks, `plist-get' does work.


2011/8/9 Andreas Schwab <schwab@linux-m68k.org>
=E5=B0=8F=E6=B1=9F=E6=B2=88 <x= iaojiang@siteshen.com> writes:

> (progn (put 'defun 'x "out")
> =C2=A0 =C2=A0 =C2=A0 =C2=A0(let ((old (plist-member (symbol-plist '= ;defun) 'x)))
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(message "old: %s." old) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(put 'defun 'x "in"= ;)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(message "old: %s." old) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nil))
>
> When I eval this form, I get something like this in *message* buffer:<= br> > old: (x out).
> old: (x in).
> nil

This has nothing to do with let. =C2=A0plist-member returns a tail of the property list, and when the value of an existing property is changed
only the cdr of the cons cell is overwritten by put, so the reference to the cons cell in `old' will follow the change.

> If it is not a bug, how can I save the prev symbol property?

Use plist-get or get to extract the property value, or make a copy.

Andreas.

--
Andreas Schwab, schwab@linux-m68k.= org
GPG Key fingerprint =3D 58CA 54C7 6D53 942B 1756 =C2=A001D3 44D5 214B 8276 = 4ED5
"And now for something completely different."

--90e6ba1efd266638cb04aa098a3f-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 10 02:38:03 2011 Received: (at control) by debbugs.gnu.org; 10 Aug 2011 06:38:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qr2QT-0007fn-DS for submit@debbugs.gnu.org; Wed, 10 Aug 2011 02:38:02 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qr2QP-0007fc-GH for control@debbugs.gnu.org; Wed, 10 Aug 2011 02:37:59 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Qr2PF-0004zM-6p for control@debbugs.gnu.org; Wed, 10 Aug 2011 02:36:45 -0400 Date: Wed, 10 Aug 2011 02:36:45 -0400 Message-Id: Subject: control message for bug 9261 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.4 (------) tag 9261 notabug close 9261 From unknown Sat Jun 21 03:08:35 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, 07 Sep 2011 11:24:03 +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