[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/rcirc-color ca97928 3/5: rcirc-color: add rcirc-color-o
From: |
Stefan Monnier |
Subject: |
[elpa] externals/rcirc-color ca97928 3/5: rcirc-color: add rcirc-color-other-attributes |
Date: |
Sun, 29 Nov 2020 00:09:42 -0500 (EST) |
branch: externals/rcirc-color
commit ca97928b594f4f5ed7d288cc3ad1faea08e20453
Author: Alex Schroeder <alex@gnu.org>
Commit: Alex Schroeder <alex@gnu.org>
rcirc-color: add rcirc-color-other-attributes
This allows users to specify more attributes to use for other nicks
in addition to foreground color.
---
rcirc-color.el | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/rcirc-color.el b/rcirc-color.el
index 27950be..134b6c5 100644
--- a/rcirc-color.el
+++ b/rcirc-color.el
@@ -1,10 +1,10 @@
;;; rcirc-color.el --- color nicks
-;; Copyright (C) 2005-2017 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2018 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
;; Maintainer: Alex Schroeder <alex@gnu.org>
-;; Version: 0.3
+;; Version: 0.4
;; Keywords: comm
;; This file is part of GNU Emacs.
@@ -86,16 +86,21 @@ If you set this variable to a non-nil value, an md5 hash is
computed based on the nickname and the first twelve bytes are
used to determine the color: #rrrrggggbbbb.")
+(defvar rcirc-color-other-attributes nil
+ "Other attributes to use for nicks.
+Example: (setq rcirc-color-other-attributes '(:weight bold))")
+
(defadvice rcirc-facify (before rcirc-facify-colors last activate)
"Add colors to other nicks based on `rcirc-colors'."
(when (and (eq face 'rcirc-other-nick)
(not (string= string "")))
(let ((cell (gethash string rcirc-color-mapping)))
(unless cell
- (setq cell (cons 'foreground-color
- (if rcirc-color-is-deterministic
- (concat "#" (substring (md5 string) 0 12))
- (elt rcirc-colors (random (length rcirc-colors))))))
+ (setq cell (nconc (list :foreground
+ (if rcirc-color-is-deterministic
+ (concat "#" (substring (md5 string) 0 12))
+ (elt rcirc-colors (random (length
rcirc-colors)))))
+ rcirc-color-other-attributes))
(puthash (substring-no-properties string) cell rcirc-color-mapping))
(setq face (list cell)))))
- [elpa] branch externals/rcirc-color created (now 28f3583), Stefan Monnier, 2020/11/29
- [elpa] externals/rcirc-color cba966f 1/5: Add rcirc-color, Stefan Monnier, 2020/11/29
- [elpa] externals/rcirc-color af5ae62 2/5: * rcirc-menu, rcirc-color: Fix copyright, Stefan Monnier, 2020/11/29
- [elpa] externals/rcirc-color ca97928 3/5: rcirc-color: add rcirc-color-other-attributes,
Stefan Monnier <=
- [elpa] externals/rcirc-color a966743 4/5: rcirc-color: make compatible with latest rcirc, Stefan Monnier, 2020/11/29
- [elpa] externals/rcirc-color 28f3583 5/5: * .gitignore: New file, Stefan Monnier, 2020/11/29