[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46722: test-map-into fails
From: |
Stefan Monnier |
Subject: |
bug#46722: test-map-into fails |
Date: |
Sat, 15 Jan 2022 10:16:48 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
FWIW, I think installing the cl-generic patch into `emacs-28` would be
a much better option. In my view it's "super safe" and it fixes
a nasty bug that can affect a lot of code (as we're witnessing here
with those test problems).
It admittedly doesn't fix a regression.
For reference the patch is just:
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index 983694204df..5090e060372 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -604,7 +604,9 @@ cl--generic-dispatchers
(defun cl--generic-get-dispatcher (dispatch)
(with-memoization
- (gethash dispatch cl--generic-dispatchers)
+ ;; We need `copy-sequence` here because this `dispatch' object might
be
+ ;; modified by side-effect in `cl-generic-define-method' (bug#46722).
+ (gethash (copy-sequence dispatch) cl--generic-dispatchers)
;; (message "cl--generic-get-dispatcher (%S)" dispatch)
(let* ((dispatch-arg (car dispatch))
(generalizers (cdr dispatch))
It's already the second time I say it, so I promise it's the last time
I insist here. I can live with either choice, but I'm sure Emacs-28 will
be better off with the patch than without.
Stefan
- bug#46722: test-map-into fails, (continued)
- bug#46722: test-map-into fails, Stefan Monnier, 2022/01/05
- bug#46722: test-map-into fails, Eli Zaretskii, 2022/01/05
- bug#46722: test-map-into fails, Stefan Monnier, 2022/01/05
- bug#46722: test-map-into fails, Philipp Stephani, 2022/01/13
- bug#46722: test-map-into fails, Stefan Monnier, 2022/01/13
- bug#46722: test-map-into fails, Philipp Stephani, 2022/01/13
- bug#46722: test-map-into fails, Lars Ingebrigtsen, 2022/01/14
- bug#46722: test-map-into fails, Philipp Stephani, 2022/01/14
- bug#46722: test-map-into fails, Lars Ingebrigtsen, 2022/01/15
- bug#46722: test-map-into fails, Philipp Stephani, 2022/01/15
- bug#46722: test-map-into fails,
Stefan Monnier <=
- bug#46722: test-map-into fails, Eli Zaretskii, 2022/01/15
- bug#46722: test-map-into fails, Lars Ingebrigtsen, 2022/01/20
bug#46722: test-map-into fails, Stefan Monnier, 2022/01/05