doomemacs/modules/app/irc/autoload/settings.el
Henrik Lissner fd12794930
refactor(lib): use cl-callf instead of plist-{put,delete}!
I rediscovered cl-callf and decided to cut down on redundancies.
2022-06-17 18:20:45 +02:00

18 lines
592 B
EmacsLisp

;;; app/irc/autoload/settings.el -*- lexical-binding: t; -*-
;;;###autodef
(defun set-irc-server! (server plist)
"Registers an irc SERVER for circe.
SERVER can either be a name for the network (in which case you must specify a
:host), or it may be the hostname itself, in which case it will be used as the
:host.
See `circe-network-options' for details."
(declare (indent 1))
(after! circe
(unless (plist-member plist :host)
(cl-callf plist-put plist :host server))
(setf (alist-get server circe-network-options
nil nil #'equal)
plist)))