From 6795b93d06917806cf0b8a962c5aef92c7a27343 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Mon, 19 Sep 2022 21:17:09 +0200 Subject: [PATCH] ; Don't set nil to be a face fore-/background * lisp/net/rcirc.el (rcirc-color-attributes): Check if the parsed background or foreground is nil before using it. --- lisp/net/rcirc.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 5e48b3c70f2..eb3b48da6ee 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -3042,10 +3042,8 @@ indicated by RESPONSE)." ((<= 0 bg (1- (length rcirc-color-codes))))) (setq background (aref rcirc-color-codes bg))) (rcirc-add-face (match-beginning 0) (match-end 0) - `(face (:foreground - ,foreground - :background - ,background)))))) + `(face (,@(and foreground (list :foreground foreground)) + ,@(and background (list :background background)))))))) (defun rcirc-remove-markup-codes (_sender _response) "Remove ASCII control codes used to designate markup." -- 2.39.2