From c2394fc7954170fd05a23f5e44ea74b12c25e637 Mon Sep 17 00:00:00 2001 From: Phil Hudson Date: Tue, 21 May 2024 16:04:07 +0100 Subject: [PATCH] Fix buggy special-display-buffer-names check (#3673) The code in function cider-popup-display-buffer falsely assumes that each element of special-display-buffer-names is a list. In fact and as documented, each element can be either a string or a list (the car of which is a string). --- CHANGELOG.md | 1 + cider-popup.el | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f65d4996f..589c7c987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ ### Bugs fixed +- [#3673](https://github.com/clojure-emacs/cider/pull/3673): Fix buggy `special-display-buffer-names` check. - [#3659](https://github.com/clojure-emacs/cider/pull/3659): Fixes completions when using `flex`-like completion styles. - [#3600](https://github.com/clojure-emacs/cider/pull/3600): Fix scittle jack-in when using `cider-jack-in-clj`. - [#3663](https://github.com/clojure-emacs/cider/issues/3663): Fix `cider-interactive-eval-override` invocation. diff --git a/cider-popup.el b/cider-popup.el index 5d7beb564..d5e797b92 100644 --- a/cider-popup.el +++ b/cider-popup.el @@ -64,7 +64,10 @@ by adding BUFFER-NAME to the `special-display-buffer-names' list." ;; another time through `cider-popup-buffer-display'): (if (and (boundp 'special-display-buffer-names) (seq-find (lambda (entry) - (equal (car entry) buffer-name)) + ;; Fix issue #3672 Phil Hudson 2024-05-21 + ;; entry can be either a list or a string + ;; Previous code falsely assumed entry is always a list + (equal (if (listp entry) (car entry) entry) buffer-name)) special-display-buffer-names)) (progn (display-buffer buffer-name)