You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that "foo" should only be printed once, but it's being printed twice here.
You can get a clearer idea of the issue by looking at the compiled output:
> (print (compile (expand '(set x (set (get (or (print 'foo) (obj)) 'a) 42)))))
(print("foo") or {}).a = 42
x = (print("foo") or {}).a
I made a couple attempts at solving this by modifying lower-set, but I haven't been able to come up with a solution at all, let alone a solution that's simple.
I think it's necessary to check whether the left-hand side expression starts with (get ...), since I'm not sure there's another situation where this can arise. But it feels odd to special case it like that.
It's possible this might not be a bug at all -- emacs mentions in their gv macro documentation that they can be expanded multiple times. But I'm not sure.
The text was updated successfully, but these errors were encountered:
I ran across an interesting one. It's not immediately clear how to solve it:
The problem is that "foo" should only be printed once, but it's being printed twice here.
You can get a clearer idea of the issue by looking at the compiled output:
I made a couple attempts at solving this by modifying
lower-set
, but I haven't been able to come up with a solution at all, let alone a solution that's simple.I think it's necessary to check whether the left-hand side expression starts with
(get ...)
, since I'm not sure there's another situation where this can arise. But it feels odd to special case it like that.It's possible this might not be a bug at all -- emacs mentions in their
gv
macro documentation that they can be expanded multiple times. But I'm not sure.The text was updated successfully, but these errors were encountered: