GNU bug report logs -
#56739
29.0.50; `cl-psetq' and `cl-psetf' fail to recognize symbol macros
Previous Next
Full log
Message #31 received at 56739 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> - (let ((p args) (simple t) (vars nil))
>> + (let ((p args) (simple t) (vars nil)
>> + (smacros (alist-get :cl-symbol-macros macroexpand-all-environment)))
>> (while p
>> - (if (or (not (symbolp (car p))) (cl--expr-depends-p (nth 1 p) vars))
>> - (setq simple nil))
>> - (if (memq (car p) vars)
>> - (error "Destination duplicated in psetf: %s" (car p)))
>> + (when (or (not (symbolp (car p)))
>> + (assq (car p) smacros)
>
> This looks like a safe way to make it work when the place is
> a symbol macro.
>
>> + (and (symbolp (nth 1 p))
>> + (assq (nth 1 p) smacros))
>> + (cl--expr-depends-p (nth 1 p) vars))
>
> But this doesn't look strong enough; if (nth 1 p) is (+ c c) where `c`
> is a symbol macro the same problem will appear. So the test needs to be
> pushed into `cl--expr-depends-p` (probably into `cl--safe-expr-p` where
> it will fix other related problems elsewhere).
(That was one year ago.)
Michael, did you have a chance to look into this? It would be nice to
get this bug fixed.
This bug report was last modified 1 year and 282 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.