Skip to content

Commit d80c2ff

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

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

meow-util.el

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
;;; Code:
2424

25+
(require 'subr-x)
2526
(require 'cl-lib)
2627
(require 'seq)
2728
(require 'color)
@@ -149,16 +150,10 @@ This uses the variable meow-update-cursor-functions-alist, finds the first
149150
item in which the car evaluates to true, and runs the cdr. The last item's car
150151
in the list will always evaluate to true."
151152
(with-current-buffer (window-buffer)
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)))))
153+
(thread-last meow-update-cursor-functions-alist
154+
(cl-remove-if-not (lambda (el) (funcall (car el))))
155+
(cdar)
156+
(funcall))))
162157

163158
(defun meow--get-state-name (state)
164159
"Get the name of the current state.

0 commit comments

Comments
 (0)