From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dont Ask Newsgroups: gmane.emacs.bugs Subject: bug#19519: 24.4; Multiple evaluation in cl-subseq setf macro Date: Mon, 5 Jan 2015 16:51:03 -0500 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c2fe46d2437a050beeafc9 X-Trace: ger.gmane.org 1420495594 11337 80.91.229.3 (5 Jan 2015 22:06:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Jan 2015 22:06:34 +0000 (UTC) To: 19519@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 05 23:06:28 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y8Fmt-00061M-Rq for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jan 2015 23:06:12 +0100 Original-Received: from localhost ([::1]:34125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8Fmt-0001dt-7h for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jan 2015 17:06:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8Fmn-0001dk-Ta for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 17:06:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8Fml-0008Gn-3p for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 17:06:05 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8Fml-0008Gj-0e for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 17:06:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y8Fmk-0002eM-Lj for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 17:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dont Ask Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Jan 2015 22:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19519 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.142049552510133 (code B ref -1); Mon, 05 Jan 2015 22:06:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Jan 2015 22:05:25 +0000 Original-Received: from localhost ([127.0.0.1]:37842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8Fm7-0002dK-O7 for submit@debbugs.gnu.org; Mon, 05 Jan 2015 17:05:25 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41951) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8FYP-0002Fs-KY for submit@debbugs.gnu.org; Mon, 05 Jan 2015 16:51:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8FYN-0003yD-9T for submit@debbugs.gnu.org; Mon, 05 Jan 2015 16:51:13 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:60237) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8FYN-0003y8-6s for submit@debbugs.gnu.org; Mon, 05 Jan 2015 16:51:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8FYL-0005pP-3x for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 16:51:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8FYH-0003x5-03 for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 16:51:09 -0500 Original-Received: from mail-ig0-x242.google.com ([2607:f8b0:4001:c05::242]:60307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8FYG-0003wr-PD for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2015 16:51:04 -0500 Original-Received: by mail-ig0-f194.google.com with SMTP id r10so829786igi.9 for ; Mon, 05 Jan 2015 13:51:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=7WgEPss+1X1b+aqvGK6tpIbVYBKAXFA/W5HtwBtb6XA=; b=ooQ2c/0ItrOj0tx5FAHf6QCDjR7dufy4ZxAgmp8RqQxSh0nyf7kCqyajcg7+zKgNfS cCLfka4f5jQYQHS+vorOORhi8IWggjsmIJ3o/o/5NSIOVznCbHrzaYtyj8kmJfm9RD9B mmeCfpRW2xW7V0pzSnILUioIsUm9NkPurntPs+hlfhblWVnTDBuJhYZikmVh31vwv4qg LOk4EVSzYVHNWlvFjKP/neXTn93jUDKy0+TTUXSnE0eOhZQlgwCv68yBJJVb9WHH+FOi 571n6PQ1ptBXQsw9N1p0c6HWlMXHM5Do9VibZ11gvFu/zLGJjcYGMwwP3JNCQwT/DXMt w4oQ== X-Received: by 10.43.154.196 with SMTP id lf4mr68472023icc.95.1420494663466; Mon, 05 Jan 2015 13:51:03 -0800 (PST) Original-Received: by 10.50.159.201 with HTTP; Mon, 5 Jan 2015 13:51:03 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Mon, 05 Jan 2015 17:05:22 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:98056 Archived-At: --001a11c2fe46d2437a050beeafc9 Content-Type: text/plain; charset=UTF-8 From: To: bug-gnu-emacs@gnu.org Subject: 24.4; Multiple evaluation in cl-subseq setf macro Date: Mon, 05 Jan 2015 16:45:13 -0500 Message-ID: <87vbkknbpy.fsf@ASUS.i-did-not-set--mail-host-address--so-tickle-me> --text follows this line-- Hi, look at the file `cl-extra.el' and the function `cl-subseq'. You can see in the definition of the `setf' expander that the `new' form is evaled twice, once to set the value and once to return the value! This should probably be fixed by saving the evaluated `new' in a temp variable. specifically line 509: (declare (gv-setter (lambda (new) `(progn (cl-replace ,seq ,new :start1 ,start :end1 ,end) ,new)))) Thanks! In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2015-01-05 on ASUS Windowing system distributor `The X.Org Foundation', version 11.0.11501000 System Description: Ubuntu 14.04.1 LTS Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: eldoc-mode: t desktop-save-mode: t show-paren-mode: t tooltip-mode: t electric-indent-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 auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-p C-p C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n M-f M-f M-f M-f P C C-M-x C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-n C-n C-n C-n C-n C-n C-n C-n C-M-h C-x C-e C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-p C-p C-p C-p C-p C-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-p C-p C-p C-p C-p C-n C-n C-M-h C-h f c l - s u b s e q C-x o C-e C-b C-b C-b C-x C-x b * s c r C-g C-x b * s c r n a c h t a c h t n c h t h a n c t M-b C-f C-r C-g C-b C-b C-b C-f C-f C-f c h a n t e e t 3 6 4 6 M-x e m a c s r e p r o r t - e m a c Recent messages: nil Auto-saving...done Auto-saving... Mark set [2 times] uncompressing cl-extra.el.gz...done Note: file is write protected Auto-saving... exchange-point-and-mark: No mark set in this buffer call-interactively: Buffer is read-only: # [5 times] Quit [2 times] Load-path shadows: /usr/share/emacs24/site-lisp/slime/slime-autoloads hides /usr/share/emacs/site-lisp/slime/slime-autoloads /usr/share/emacs24/site-lisp/slime/hyperspec hides /usr/share/emacs/site-lisp/slime/hyperspec /usr/share/emacs24/site-lisp/slime/slime hides /usr/share/emacs/site-lisp/slime/slime Features: (shadow sort mail-extr emacsbug message rfc822 mml 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 debug dabbrev misearch multi-isearch cl-macs help-mode ruler-mode mule-util hl-line hexl hi-lock org-element org-rmail org-mhe org-irc org-info org-gnus gnus-util org-docview doc-view image-mode dired org-bibtex bibtex org-bbdb org-w3m org org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint comint ansi-color ring ob-core ob-eval org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs info easymenu eldoc help-fns slime-autoloads sage sage-load jka-compr rx highlight-cl edmacro kmacro gv desktop frameset cl-loaddefs cl-lib paren cus-start cus-load time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-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 nadvice 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 dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 235973 22607) (symbols 48 29838 0) (miscs 40 221 623) (strings 32 54154 7009) (string-bytes 1 1733987) (vectors 16 20382) (vector-slots 8 505979 8791) (floats 8 125 241) (intervals 56 9915 591) (buffers 960 44) (heap 1024 39678 1275)) --001a11c2fe46d2437a050beeafc9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
From:
To: bug-= gnu-emacs@gnu.org
Subject: 24.4; Multiple evaluation in cl-subseq se= tf macro
Date: Mon, 05 Jan 2015 16:45:13 -0500
Message-ID: <87vbkk= nbpy.fsf@ASUS.i-did-not-set--mail-host-address--so-tickle-me>
--text = follows this line--

Hi, look at the file `cl-extra.el' and the f= unction `cl-subseq'. You can
see in the definition of the `setf'= expander that the `new' form is
evaled twice, once to set the value= and once to return the value! This
should probably be fixed by saving t= he evaluated `new' in a temp
variable.

specifically line 509:=

(declare (gv-setter
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 (lambda (new)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 `(progn (cl-replace ,seq ,new= :start1 ,start :end1 ,end)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 ,new))))

Thanks!



In GNU Emacs 24.4.1 (x86_6= 4-unknown-linux-gnu, GTK+ Version 3.10.8)
=C2=A0of 2015-01-05 on ASUSWindowing system distributor `The X.Org Foundation', version 11.0.1150= 1000
System Description:=C2=A0=C2=A0=C2=A0 Ubuntu 14.04.1 LTS

Imp= ortant settings:
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 value of $= XMODIFIERS: @im=3Dibus
=C2=A0 locale-coding-system: utf-8-unix

Ma= jor mode: Lisp Interaction

Minor modes in effect:
=C2=A0 eldoc-mo= de: t
=C2=A0 desktop-save-mode: t
=C2=A0 show-paren-mode: t
=C2=A0= tooltip-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mo= de: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-= name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-= mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: = t
=C2=A0 auto-compression-mode: t
=C2=A0 column-number-mode: t
=C2= =A0 line-number-mode: t
=C2=A0 transient-mark-mode: t

Recent inpu= t:
C-p C-p C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n
C-S-n C-S= -n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
M-f M-f M-f M-f <backspac= e> P C C-M-x C-S-n C-S-n C-S-n
C-S-n C-S-n C-S-n C-S-n C-S-n C-S-n C= -S-n C-S-n C-S-n
C-S-n C-S-n C-S-n C-n C-n C-n C-n C-n C-n C-n C-n C-M-= h
<backspace> <backspace> C-x C-e C-S-p C-S-p C-S-p C-S-p <= br>C-S-p C-S-p C-S-p C-S-p C-p C-p C-p C-p C-p C-p C-S-p
C-S-p C-S-p C-= S-p C-S-p C-S-p C-S-p C-S-p C-S-p C-S-p
C-S-p C-S-p C-S-p C-S-p C-S-p C= -S-p C-S-p C-S-p C-S-p
C-p C-p C-p C-p C-p <down> <down> &l= t;down> <down> <up>
<up> <up> <up> <= ;up> <up> <up> <up> <up> <up> <up> &= lt;up>
<up> <up> <up> <up> <up> <up= > <up> <up> <up> <up> <up>
<up> = <up> <up> <up> <up> <up> <up> <up>= ; <up> <up> <up>
<up> <up> <up> <= ;up> <up> <up> <up> <up> <up> <up> &= lt;up>
<up> <up> <up> <up> <up> <up= > <up> <up> <up> <up> <up>
<up> = <up> <up> <up> <up> <up> <up> <up>= ; <up> <up> <up>
<up> <up> <up> <= ;up> <up> C-n C-n C-M-h <backspace>
C-h f c l - s u b s = e q <return> C-x o C-e C-b C-b
C-b <return> C-x C-x b * s c= r C-g C-x b * s c r <tab>
<return> n a c h t <return>= ; a c h t <backspace> <backspace>
<backspace> n c h t= <backspace> <backspace> <backspace>
<backspace>= ; h a n c t M-b C-f <backspace> C-r C-g <help-echo>
<hel= p-echo> <down-mouse-1> <mouse-1> C-b C-b C-b C-f
C-f C-f= <backspace> <backspace> <backspace> <backspace> <backspace> c h a n t e e <backspace> <backspace> <b= ackspace>
t 3 6 <backspace> <backspace> 4 6 M-x e m a c = s <backspace>
<backspace> <backspace> <backspace&g= t; <backspace> r e
p r <backspace> o r t - e m a c <tab&= gt; <return>

Recent messages:
nil
Auto-saving...done
= Auto-saving...
Mark set [2 times]

uncompressing cl-extra.el.gz...= done
Note: file is write protected
Auto-saving...
exchange-point-a= nd-mark: No mark set in this buffer
call-interactively: Buffer is read-o= nly: #<buffer cl-extra.el.gz> [5 times]
Quit [2 times]

Load= -path shadows:
/usr/share/emacs24/site-lisp/slime/slime-autoloads hides = /usr/share/emacs/site-lisp/slime/slime-autoloads
/usr/share/emacs24/site= -lisp/slime/hyperspec hides /usr/share/emacs/site-lisp/slime/hyperspec
/= usr/share/emacs24/site-lisp/slime/slime hides /usr/share/emacs/site-lisp/sl= ime/slime

Features:
(shadow sort mail-extr emacsbug message rfc82= 2 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbre= v gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-= prsvr mail-utils debug
dabbrev misearch multi-isearch cl-macs help-mode = ruler-mode mule-util
hl-line hexl hi-lock org-element org-rmail org-mhe = org-irc org-info
org-gnus gnus-util org-docview doc-view image-mode dire= d org-bibtex
bibtex org-bbdb org-w3m org org-macro org-footnote org-pcom= plete
pcomplete org-list org-faces org-entities noutline outline easy-mm= ode
org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp=
org-src ob-keys ob-comint comint ansi-color ring ob-core ob-eval
org= -compat org-macs org-loaddefs format-spec find-func cal-menu calendar
ca= l-loaddefs cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles= cc-align cc-engine cc-vars cc-defs info easymenu eldoc
help-fns slime-a= utoloads sage sage-load jka-compr rx highlight-cl
edmacro kmacro gv desk= top frameset cl-loaddefs cl-lib paren cus-start
cus-load time-date toolt= ip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-= dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomme= nt lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select s= croll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham = georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korea= n japanese hebrew greek
romanian slovak czech european ethiopic indian c= yrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev min= ibuffer nadvice
loaddefs button faces cus-face macroexp files text-prope= rties overlay
sha1 md5 base64 format env code-pages mule custom widgethashtable-print-readable backquote make-network-process dbusbind
gfile= notify dynamic-setting system-font-setting font-render-setting
move-tool= bar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses= 16 235973 22607)
=C2=A0(symbols 48 29838 0)
=C2=A0(miscs 40 221 623)=
=C2=A0(strings 32 54154 7009)
=C2=A0(string-bytes 1 1733987)
=C2= =A0(vectors 16 20382)
=C2=A0(vector-slots 8 505979 8791)
=C2=A0(float= s 8 125 241)
=C2=A0(intervals 56 9915 591)
=C2=A0(buffers 960 44)
= =C2=A0(heap 1024 39678 1275))

--001a11c2fe46d2437a050beeafc9--