Skip to content

Commit cee4a34

Browse files
committed
Fix a compilation warning in Emacs29
1 parent fb61ce5 commit cee4a34

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

meow-util.el

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,16 @@ This uses the variable meow-update-cursor-functions-alist, finds the first
149149
item in which the car evaluates to true, and runs the cdr. The last item's car
150150
in the list will always evaluate to true."
151151
(with-current-buffer (window-buffer)
152-
(thread-last meow-update-cursor-functions-alist
153-
(cl-remove-if-not (lambda (el) (funcall (car el))))
154-
(cdar)
155-
(funcall))))
152+
;; Adapt Emacs29
153+
;; Using thread-last here causes following error:
154+
;; Warning: Optimization failure for cdar: Handler: internal--compiler-macro-cXXr (wrong-number-of-arguments (2 . 2) 1)
155+
;; Original code:
156+
;; (thread-last meow-update-cursor-functions-alist
157+
;; (cl-remove-if-not (lambda (el) (funcall (car el))))
158+
;; (cdar)
159+
;; (funcall))
160+
(funcall (cdar (cl-remove-if-not (lambda (el) (funcall (car el)))
161+
meow-update-cursor-functions-alist)))))
156162

157163
(defun meow--get-state-name (state)
158164
"Get the name of the current state.

0 commit comments

Comments
 (0)