From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thuna Newsgroups: gmane.emacs.bugs Subject: bug#58439: [PATCH] [ELPA GNU] rcirc-color: Fix color assigning Date: Tue, 11 Oct 2022 15:39:31 +0200 Message-ID: <8735buqy24.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/x-patch Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40705"; mail-complaints-to="usenet@ciao.gmane.io" To: 58439@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 11 15:42:50 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oiFWz-000ARn-Az for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Oct 2022 15:42:49 +0200 Original-Received: from localhost ([::1]:56148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiFWy-0002Q0-Cz for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Oct 2022 09:42:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiFUJ-00004q-Ne for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 09:40:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52355) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiFUI-0000DZ-Oj for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 09:40:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oiFUI-0002zY-JY for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 09:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thuna Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2022 13:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58439 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166549557911464 (code B ref -1); Tue, 11 Oct 2022 13:40:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Oct 2022 13:39:39 +0000 Original-Received: from localhost ([127.0.0.1]:51433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiFTu-0002yq-KF for submit@debbugs.gnu.org; Tue, 11 Oct 2022 09:39:38 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:34474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiFTt-0002yh-9L for submit@debbugs.gnu.org; Tue, 11 Oct 2022 09:39:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiFTt-0007r4-1Z for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 09:39:37 -0400 Original-Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]:33432) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiFTr-00009N-EC for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 09:39:36 -0400 Original-Received: by mail-ej1-x62f.google.com with SMTP id q9so26921759ejd.0 for ; Tue, 11 Oct 2022 06:39:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-description:content-disposition:mime-version:message-id :date:subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=iSmVCpCorjKZO9DlY3y6YP9ID0N1Gw6ZpCfZKZ1DbGc=; b=ozPyUezXwfBXJRESCbCcHe5ADWL3dd2vN0lC4+hSBJD3TCtrqUBsfMrY4eHr/FHKid SHyQRw6ZtEJgXrz7G7/UVtZvXruqDFubn7AbceYccA0aO8Bc5AtGGHbNlWHVLjHiPq/3 HhdkDjgn2CqHVyD2ArssUCoz+ceQsy7zg/wd57S9SJK19dQMR1z4+xZIVJ5QY7kso1UY oSA2w4r7uPBnvyrQQMm97F89sFZ9+y7XyLBWaI9i8Xrd7SxkBlMnsBhBuRr5HP6HQwD4 PH4mmQ+I/DqIUzfWfdi5xZaYNR9ELlOLe5TMBXWMFCat9Asx+KJHVL4Fkr9jfZDxTn9Q PVOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-description:content-disposition:mime-version:message-id :date:subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iSmVCpCorjKZO9DlY3y6YP9ID0N1Gw6ZpCfZKZ1DbGc=; b=J1BLlqW0658MJEaeze7d/NdDyM2YEwsaEyuzR8DKBgLWOsmyV7g65NZh1aYmuf6WFY rGDwSShXdBp8HPEl1mqqmsmz+Wsl0JPJ0q+99Bu58pl3ZX8ftAQDAipcK9jh/dwmjC5P a9DvTxU05z3yzV64hvE2LaA+MTVYeFwLOErht/CDwNQcMrX5I0FJ7b4XxfWbiFZtPfKR KzsLwcKRNkPz+DzeQGbjLVEl5fef5lPPe8A4pzrt9RMylISUlqEuNaabGOQ08kYCr1vD m35uKMElhFIYk20Tr2+cL5vDSnc2BX51sn+x7KMWrWrymJV+PXusZFy49cR6ZQwguzlL fpKQ== X-Gm-Message-State: ACrzQf3neFhtm7+c3Wq7Z6IHYLtYAUpAiFFJEqVxLJpM3t/bBwJudv+9 9IHWlgCnLmjfPVEhmuk0gjNeNtrJsvo= X-Google-Smtp-Source: AMsMyM6nh1XKthWfbjPovLy0MyaTRu5/zUD7gj89pOT5FO/IEktQWAISbTJ6iCMIwoyk6MzLgWSKJg== X-Received: by 2002:a17:907:1624:b0:78d:d61c:2b4a with SMTP id hb36-20020a170907162400b0078dd61c2b4amr2913703ejc.208.1665495573253; Tue, 11 Oct 2022 06:39:33 -0700 (PDT) Original-Received: from thuna ([90.147.71.145]) by smtp.gmail.com with ESMTPSA id kv13-20020a17090778cd00b00741a251d9e8sm7104841ejc.171.2022.10.11.06.39.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 06:39:32 -0700 (PDT) Content-Disposition: attachment; filename=0001-rcirc-color-Fix-color-assigning.patch Content-Description: The patch Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=thuna.cing@gmail.com; helo=mail-ej1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245108 Archived-At: >From 73f917c6de3acbab3f34fa839cc9e1b56517d084 Mon Sep 17 00:00:00 2001 From: Thuna Date: Tue, 11 Oct 2022 15:35:47 +0200 Subject: [PATCH] rcirc-color: Fix color assigning * rcirc-color.el (rcirc-do-color): When a color is given to rcirc-color with `/color NICK COLOR', use the specified COLOR instead of getting a random one. --- rcirc-color.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rcirc-color.el b/rcirc-color.el index b66f4a1143..ee96ae8bd5 100644 --- a/rcirc-color.el +++ b/rcirc-color.el @@ -162,7 +162,7 @@ commands." (rcirc-print process (rcirc-nick process) "NOTICE" target (mapconcat 'identity names " "))) (let* ((index (random (length rcirc-colors))) - (color (elt rcirc-colors index)) + (color (or color (elt rcirc-colors index))) (face `(:foreground ,color ,@rcirc-color-other-attributes))) (puthash nick face rcirc-color-mapping)))) -- 2.35.1