all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Michael Heerdegen <michael_heerdegen@web.de>,
	56739@debbugs.gnu.org, Wing Hei Chan <whmunkchan@outlook.com>
Subject: bug#56739: 29.0.50; `cl-psetq' and `cl-psetf' fail to recognize symbol macros
Date: Thu, 7 Sep 2023 11:31:34 -0700	[thread overview]
Message-ID: <CADwFkmmYJzsNgx1Xq=t-fPJndga2DYWQY35LtvKFxHxgYs_7NQ@mail.gmail.com> (raw)
In-Reply-To: <jwv4jxls0qg.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 05 Sep 2022 22:22:28 -0400")

Stefan Monnier <monnier@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.





  reply	other threads:[~2023-09-07 18:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-24 12:12 bug#56739: 29.0.50; `cl-psetq' and `cl-psetf' fail to recognize symbol macros Wing Hei Chan
2022-08-02  2:41 ` Michael Heerdegen
2022-08-02 23:59 ` Michael Heerdegen
2022-08-03  0:20   ` Michael Heerdegen
2022-09-05 19:14     ` Lars Ingebrigtsen
2022-09-06  1:29       ` Michael Heerdegen
2022-09-06  2:22     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-07 18:31       ` Stefan Kangas [this message]
2023-09-08  3:07         ` Michael Heerdegen
2023-09-09  6:12           ` Michael Heerdegen
2023-09-09  7:08             ` Gerd Möllmann
     [not found]               ` <f49326d6-85e2-4fed-83ae-815a82cefe30@outlook.com>
2023-09-09  8:03                 ` Wing Hei Chan
2023-09-09  9:24                   ` Gerd Möllmann
2023-09-09 15:42               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-09 16:33                 ` Gerd Möllmann
2022-09-06  2:29 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkmmYJzsNgx1Xq=t-fPJndga2DYWQY35LtvKFxHxgYs_7NQ@mail.gmail.com' \
    --to=stefankangas@gmail.com \
    --cc=56739@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    --cc=whmunkchan@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.