all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thuna <thuna.cing@gmail.com>
To: 58439@debbugs.gnu.org
Subject: bug#58439: [PATCH] [ELPA GNU] rcirc-color: Fix color assigning
Date: Tue, 11 Oct 2022 15:39:31 +0200	[thread overview]
Message-ID: <8735buqy24.fsf@gmail.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: The patch --]
[-- Type: text/x-patch, Size: 995 bytes --]

From 73f917c6de3acbab3f34fa839cc9e1b56517d084 Mon Sep 17 00:00:00 2001
From: Thuna <thuna.cing@gmail.com>
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






             reply	other threads:[~2022-10-11 13:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 13:39 Thuna [this message]
2022-10-12 11:24 ` bug#58439: [PATCH] [ELPA GNU] rcirc-color: Fix color assigning Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735buqy24.fsf@gmail.com \
    --to=thuna.cing@gmail.com \
    --cc=58439@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.