emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#24270: closed (Seeming bug in `setf')


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#24270: closed (Seeming bug in `setf')
Date: Sat, 20 Aug 2016 14:04:02 +0000

Your message dated Sat, 20 Aug 2016 16:03:34 +0200
with message-id <address@hidden>
and subject line Re: bug#24270: Seeming bug in `setf'
has caused the debbugs.gnu.org bug report #24270,
regarding Seeming bug in `setf'
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
24270: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24270
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Seeming bug in `setf' Date: Sat, 20 Aug 2016 01:57:29 -0400
Hello,

The macro `setf' seems to have developed a bug somewhere between emacs 23.1.1 
and 24.3.1:


(emacs-version) ; GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) 
of 2014-03-07 on lamiak, modified by Debian

(setq z ())
(getf z  'indic)                        ; nil
(setf (getf z 'indic) 6)                ; (indic 6)  SHOULD BE JUST 6
(getf z  'indic)                        ; 6  okay


Here's some info on the hardware from /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 44
model name      : Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz
stepping        : 2
microcode       : 0x13
cpu MHz         : 2393.834
cache size      : 12288 KB
physical id     : 1
siblings        : 8
core id         : 0
cpu cores       : 4
apicid          : 32
initial apicid  : 32
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb 
rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology 
nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 
ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt aes lahf_lm ida arat dtherm 
tpr_shadow vnmi flexpriority ept vpid
bogomips        : 4787.66
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

Thanks,

~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
 Rafael Sorkin
 Perimeter Institute for Theoretical Physics
 31 Caroline Street North
 Waterloo, ON  N2L 2Y5
 Canada
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~



--- End Message ---
--- Begin Message --- Subject: Re: bug#24270: Seeming bug in `setf' Date: Sat, 20 Aug 2016 16:03:34 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
Hello Rafael,

> (emacs-version) ; GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version
> 3.10.7) of 2014-03-07 on lamiak, modified by Debian
>
> (setq z ())
> (getf z  'indic)                      ; nil
> (setf (getf z 'indic) 6)              ; (indic 6)  SHOULD BE JUST 6
> (getf z  'indic)                      ; 6  okay

Thanks for reporting.  Yes, there was such a bug, but your Emacs version
is very old...and the bug has been fixed in the meantime (three years
ago) in


c46c57b, Stefan Monnier <address@hidden>

* lisp/emacs-lisp/cl-extra.el (cl-getf): Return the proper value in
the setter.

Fixes: debbugs:14387


modified   lisp/emacs-lisp/cl-extra.el
@@ -597,8 +597,11 @@ cl-getf
                   (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,
modified   lisp/emacs-lisp/cl-loaddefs.el


Regards,

Michael.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]