From: Philip Kaludercic Date: Mon, 19 Sep 2022 19:17:09 +0000 (+0200) Subject: ; Don't set nil to be a face fore-/background X-Git-Tag: emacs-29.0.90~1856^2~348 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6795b93d06917806cf0b8a962c5aef92c7a27343;p=emacs.git ; 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. --- 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."