Remove direct usages of dash.el from init.el

Unnecessary, and also anaphora bad
This commit is contained in:
eriedaberrie 2025-02-05 15:50:09 +00:00
parent 0de7841345
commit 7127b4080e

22
init.el
View file

@ -38,13 +38,6 @@
(use-package f (use-package f
:demand t) :demand t)
(use-package dash
:demand t
:hook (emacs-lisp-mode . dash-fontify-mode)
:init
(with-eval-after-load 'info-look
(dash-register-info-lookup)))
(use-package undo-fu (use-package undo-fu
:demand t :demand t
:config :config
@ -764,12 +757,12 @@ This function is called by `org-babel-execute-src-block'."
(lui-fill-type nil) (lui-fill-type nil)
(lui-time-stamp-format "%T") (lui-time-stamp-format "%T")
:config :config
(--when-let (nth 0 (auth-source-search :max 1 (when-let* ((auth-info (car (auth-source-search :max 1
:require '(:user :secret) :require '(:user :secret)
:host "irc.libera.chat" :host "irc.libera.chat"
:port 6697)) :port 6697)))
(let ((user (plist-get it :user)) (user (plist-get auth-info :user))
(secret (plist-get it :secret))) (secret (plist-get auth-info :secret)))
(setq circe-network-options (setq circe-network-options
`(("Libera Chat" `(("Libera Chat"
:tls t :tls t
@ -778,7 +771,7 @@ This function is called by `org-babel-execute-src-block'."
:sasl-password ,(if (functionp secret) :sasl-password ,(if (functionp secret)
(funcall secret) (funcall secret)
secret) secret)
:channels ("#emacs" "#nixos" "#lisp" "#commonlisp")))))) :channels ("#emacs" "#nixos" "#lisp" "#commonlisp")))))
(add-hook 'lui-mode-hook (add-hook 'lui-mode-hook
(lambda () (lambda ()
(visual-line-mode) (visual-line-mode)
@ -914,7 +907,8 @@ This function is called by `org-babel-execute-src-block'."
:config :config
(when (boundp 'my--agenix-email-json-data) (when (boundp 'my--agenix-email-json-data)
(setq mu4e-contexts (setq mu4e-contexts
(--map (pcase-let ((`(,type (address . ,address) (name . ,name) ,_) it)) (mapcar (lambda (profile)
(pcase-let ((`(,type (address . ,address) (name . ,name) ,_) profile))
(make-mu4e-context (make-mu4e-context
:name (symbol-name type) :name (symbol-name type)
:enter-func (lambda () :enter-func (lambda ()
@ -936,7 +930,7 @@ This function is called by `org-babel-execute-src-block'."
(mu4e-sent-folder . ,(folder-name "Sent Mail")) (mu4e-sent-folder . ,(folder-name "Sent Mail"))
(mu4e-trash-folder . ,(folder-name "Trash")) (mu4e-trash-folder . ,(folder-name "Trash"))
(smtpmail-smtp-server . "smtp.gmail.com") (smtpmail-smtp-server . "smtp.gmail.com")
(smtpmail-smtp-user . ,address))))) (smtpmail-smtp-user . ,address))))))
my--agenix-email-json-data))) my--agenix-email-json-data)))
(when (fboundp 'imagemagick-register-types) (when (fboundp 'imagemagick-register-types)
(imagemagick-register-types))) (imagemagick-register-types)))