Ignore errors if display-buffer ALIST is malformed
The gud.el library uses display-buffer incorrectly, by passing a list of functions as its second argument, instead of as a nested list. CORRECT: (display-buffer buffer '((display-buffer-reuse-window display-buffer-in-previous-window display-buffer-same-window display-buffer-pop-up-window))) INCORRECT (how gud does it): (display-buffer buffer '(display-buffer-reuse-window display-buffer-in-previous-window display-buffer-same-window display-buffer-pop-up-window)) This causes "wrong-type-argument: listp display-buffer-in-previous-window" error. However, it appears Emacs handles malformed alists by just ignoring them, so Doom will do the same. Reported by @maskray
This commit is contained in:
parent
57020cdfdb
commit
a406b2d0c8
1 changed files with 2 additions and 2 deletions
|
@ -99,12 +99,12 @@ and enables `+popup-buffer-mode'."
|
||||||
(let ((alist ; handle defaults
|
(let ((alist ; handle defaults
|
||||||
(cl-remove-duplicates
|
(cl-remove-duplicates
|
||||||
(append alist +popup-default-alist)
|
(append alist +popup-default-alist)
|
||||||
:key #'car :from-end t))
|
:key #'car-safe :from-end t))
|
||||||
(parameters
|
(parameters
|
||||||
(cl-remove-duplicates
|
(cl-remove-duplicates
|
||||||
(append (cdr (assq 'window-parameters alist))
|
(append (cdr (assq 'window-parameters alist))
|
||||||
+popup-default-parameters)
|
+popup-default-parameters)
|
||||||
:key #'car :from-end t)))
|
:key #'car-safe :from-end t)))
|
||||||
;; handle `size'
|
;; handle `size'
|
||||||
(when-let* ((size (cdr (assq 'size alist)))
|
(when-let* ((size (cdr (assq 'size alist)))
|
||||||
(side (or (cdr (assq 'side alist)) 'bottom))
|
(side (or (cdr (assq 'side alist)) 'bottom))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue