Add a formatter for notices
This commit is contained in:
parent
7a2a4523aa
commit
91f0b224e1
1 changed files with 10 additions and 0 deletions
|
@ -202,6 +202,16 @@ passed on to `lui-format'."
|
|||
(circe-serenity--define-formatter 'circe-serenity-server-nick-regain-formatter
|
||||
'circe-format-server-nick-regain)
|
||||
|
||||
(defun circe-serenity-notice-formatter (&rest keywords)
|
||||
"Format a notice.
|
||||
KEYWORDS should be a plist with at least a :nick and :body key."
|
||||
(propertize
|
||||
(lui-format
|
||||
(format "{intro:%ds} -{nick}- {body}" circe-serenity-longest-nick)
|
||||
(plist-put keywords :intro "***"))
|
||||
'wrap-prefix (circe-serenity--fill-string)))
|
||||
(circe-serenity--define-formatter 'circe-serenity-notice-formatter 'circe-format-notice)
|
||||
|
||||
;;;###autoload
|
||||
(defun enable-circe-serenity ()
|
||||
"Enable Serenity for Circe."
|
||||
|
|
Loading…
Reference in a new issue