Skip to content

Commit c2394fc

Browse files
authored
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).
1 parent 167634a commit c2394fc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
### Bugs fixed
3737

38+
- [#3673](https://github.com/clojure-emacs/cider/pull/3673): Fix buggy `special-display-buffer-names` check.
3839
- [#3659](https://github.com/clojure-emacs/cider/pull/3659): Fixes completions when using `flex`-like completion styles.
3940
- [#3600](https://github.com/clojure-emacs/cider/pull/3600): Fix scittle jack-in when using `cider-jack-in-clj`.
4041
- [#3663](https://github.com/clojure-emacs/cider/issues/3663): Fix `cider-interactive-eval-override` invocation.

cider-popup.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ by adding BUFFER-NAME to the `special-display-buffer-names' list."
6464
;; another time through `cider-popup-buffer-display'):
6565
(if (and (boundp 'special-display-buffer-names)
6666
(seq-find (lambda (entry)
67-
(equal (car entry) buffer-name))
67+
;; Fix issue #3672 Phil Hudson 2024-05-21
68+
;; entry can be either a list or a string
69+
;; Previous code falsely assumed entry is always a list
70+
(equal (if (listp entry) (car entry) entry) buffer-name))
6871
special-display-buffer-names))
6972
(progn
7073
(display-buffer buffer-name)

0 commit comments

Comments
 (0)