From a406b2d0c8480675026cd39ab32cf973b717258d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 4 Jul 2018 21:42:33 +0200 Subject: [PATCH] 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 --- modules/ui/popup/autoload/popup.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui/popup/autoload/popup.el b/modules/ui/popup/autoload/popup.el index c70c49b1e..224056ff6 100644 --- a/modules/ui/popup/autoload/popup.el +++ b/modules/ui/popup/autoload/popup.el @@ -99,12 +99,12 @@ and enables `+popup-buffer-mode'." (let ((alist ; handle defaults (cl-remove-duplicates (append alist +popup-default-alist) - :key #'car :from-end t)) + :key #'car-safe :from-end t)) (parameters (cl-remove-duplicates (append (cdr (assq 'window-parameters alist)) +popup-default-parameters) - :key #'car :from-end t))) + :key #'car-safe :from-end t))) ;; handle `size' (when-let* ((size (cdr (assq 'size alist))) (side (or (cdr (assq 'side alist)) 'bottom))