-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix parsing of pcase-let*
and seq-let
for newer Emacs
#43
Comments
The current approach currently assumes to much. Fixing this might involve The flags might need to replace the declaration of Thread on the mailing list where I ask about accessing variable used by Pcase: https://lists.gnu.org/archive/html/help-gnu-emacs/2021-03/msg00089.html The conversation is still ongoing. |
UPDATE: This is mostly fixed in testing, but the situation is still developing. It remains to be seen whether the new behavior reliably assigns to variables in One problem found is destructuring with more complex patterns. It seems that For example, (loopy (flag pcase)
(list i '((1 2) [3 4 5] (6 7) [8 9 10]))
(sum (or `(,a ,b) `[,b ,c ,a]) i)) currently expands to (let ((a 0)
(c 0)
(b 0))
(let* ((list-248 '((1 2) [3 4 5] (6 7) [8 9 10]))
(i nil))
(cl-block nil
(while (consp list-248)
(setq i (car list-248))
(cond
((consp i)
(let* ((x249 (car-safe i))
(x250 (cdr-safe i)))
(if (consp x250)
(let* ((x251 (car-safe x250))
(x252 (cdr-safe x250)))
(if (null x252)
(progn
(setq a (+ x249 a))
(setq c (+ nil c))
(setq b (+ x251 b))))))))
((vectorp i)
(let* ((x253 (length i)))
(if (eql x253 3)
(let* ((x254 (pcase--flip aref 0 i))
(x255 (pcase--flip aref 1 i))
(x256 (pcase--flip aref 2 i)))
(progn
(setq a (+ x256 a))
(setq c (+ x255 c))
(setq b (+ x254 b))))))))
(setq list-248 (cdr list-248)))
(list b c a)))) |
UPDATE:
|
Emacs 27 is the minimum required version. We're now using Github Actions to test the package on Emacs 27 automatically. I am manually checking against Emacs 28. All |
The macro expansion has changed drastically.
This
becomes
instead of something like the below, as it did previously.
The text was updated successfully, but these errors were encountered: