[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6795b93d06 2/4: ; Don't set nil to be a face fore-/background
From: |
Philip Kaludercic |
Subject: |
master 6795b93d06 2/4: ; Don't set nil to be a face fore-/background |
Date: |
Tue, 20 Sep 2022 13:28:26 -0400 (EDT) |
branch: master
commit 6795b93d06917806cf0b8a962c5aef92c7a27343
Author: Philip Kaludercic <philip@icterid>
Commit: Philip Kaludercic <philipk@posteo.net>
; 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 5e48b3c70f..eb3b48da6e 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."