* bug#19519: 24.4; Multiple evaluation in cl-subseq setf macro
@ 2015-01-05 21:51 Dont Ask
2015-01-05 22:41 ` Leo Liu
0 siblings, 1 reply; 3+ messages in thread
From: Dont Ask @ 2015-01-05 21:51 UTC (permalink / raw)
To: 19519
[-- Attachment #1: Type: text/plain, Size: 5806 bytes --]
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 <backspace> 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
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> <down> <down> <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> <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> <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>
<help-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> <backspace>
t 3 6 <backspace> <backspace> 4 6 M-x e m a c s <backspace>
<backspace> <backspace> <backspace> <backspace> r e
p r <backspace> o r t - e m a c <tab> <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-and-mark: No mark set in this buffer
call-interactively: Buffer is read-only: #<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/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))
[-- Attachment #2: Type: text/html, Size: 7143 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#19519: 24.4; Multiple evaluation in cl-subseq setf macro
2015-01-05 21:51 bug#19519: 24.4; Multiple evaluation in cl-subseq setf macro Dont Ask
@ 2015-01-05 22:41 ` Leo Liu
2015-01-18 6:21 ` Leo Liu
0 siblings, 1 reply; 3+ messages in thread
From: Leo Liu @ 2015-01-05 22:41 UTC (permalink / raw)
To: Dont Ask; +Cc: 19519
On 2015-01-06 08:51 +1100, Dont Ask wrote:
> 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--
> (declare (gv-setter
> (lambda (new)
> `(progn (cl-replace ,seq ,new :start1 ,start :end1 ,end)
> ,new))))
>
> Thanks!
Confirmed with thanks. I will fix it along with bug#19434.
Leo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-18 6:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-05 21:51 bug#19519: 24.4; Multiple evaluation in cl-subseq setf macro Dont Ask
2015-01-05 22:41 ` Leo Liu
2015-01-18 6:21 ` Leo Liu
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).