From 493e48c83f53c1101bd486e14e783be8a11f3bf0 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Mon, 9 Jun 2025 13:16:17 +0200 Subject: [PATCH] ; * lisp/net/rcirc.el (rcirc-channel-p): Simplify implementation (cherry picked from commit 2438aaf76413e7255136f9ec900f1900188a0887) --- lisp/net/rcirc.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 9e1b930749d..e4192e2d7a4 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -1588,10 +1588,7 @@ If ALL is non-nil, update prompts in all IRC buffers." (defun rcirc-channel-p (target) "Return t if TARGET is a channel name." - (and target - (not (zerop (length target))) - (or (eq (aref target 0) ?#) - (eq (aref target 0) ?&)))) + (and (stringp target) (string-match-p (rx bos (or ?# ?&)) target))) (defcustom rcirc-log-directory (locate-user-emacs-file "rcirc-log") "Directory to keep IRC logfiles." -- 2.39.5