Skip to content

Commit 16278de

Browse files
committed
Fix derived-mode-p call for Emacs 28-29 compatibility
derived-mode-p only accepts individual mode arguments on Emacs 28-29; passing a list silently fails. This broke inf-clojure-enable-on-existing-clojure-buffers on those versions.
1 parent 4f8bed3 commit 16278de

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

inf-clojure.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,9 @@ whatever namespace the REPL is currently in."
563563

564564
(defun inf-clojure--clojure-buffer-p ()
565565
"Return TRUE if the current buffer is a Clojure buffer."
566-
(derived-mode-p (inf-clojure--get-preferred-major-modes)))
566+
;; TODO: Replace `apply' with a direct call once Emacs 30 is the
567+
;; minimum version, as `derived-mode-p' accepts a list from 30+.
568+
(apply #'derived-mode-p (inf-clojure--get-preferred-major-modes)))
567569

568570
(defun inf-clojure--clojure-buffers ()
569571
"Return a list of all existing `clojure-mode' buffers."

0 commit comments

Comments
 (0)