aboutsummaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/init.org
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/init.org')
-rw-r--r--emacs/.emacs.d/init.org38
1 files changed, 11 insertions, 27 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index a802bba..6eeceec 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -92,10 +92,11 @@ To start off, first I need to enable lexical binding.
and can be used.
#+BEGIN_SRC emacs-lisp
- (add-to-list 'load-path (locate-user-emacs-file "site-lisp/"))
- (let ((loaddefs (locate-user-emacs-file "site-lisp/site-autoloads.el")))
- (when (file-exists-p loaddefs)
- (load loaddefs)))
+ (eval-and-compile
+ (add-to-list 'load-path (locate-user-emacs-file "site-lisp/"))
+ (let ((loaddefs (locate-user-emacs-file "site-lisp/site-autoloads.el")))
+ (when (file-exists-p loaddefs)
+ (load loaddefs))))
#+END_SRC
* Helper functions
@@ -666,14 +667,8 @@ To start off, first I need to enable lexical binding.
messages.
#+BEGIN_SRC emacs-lisp
- (defun oni:gnus-delete-forward ()
- "Delete the article under point and move to the next one."
- (interactive)
- (gnus-summary-delete-article)
- (gnus-summary-next-subject 1))
-
(with-eval-after-load 'gnus
- (define-key gnus-summary-mode-map (kbd "M-d") #'oni:gnus-delete-forward))
+ (define-key gnus-summary-mode-map (kbd "M-d") 'oni-gnus-delete-forward))
#+END_SRC
*** ryuslash.org
@@ -788,22 +783,11 @@ To start off, first I need to enable lexical binding.
(ensure-library circe)
#+END_SRC
- I prefer storing my passwords in a GPG encrypted authinfo
- file. Circe doesn't look at this out-of-the-box, but it's easy
- enough to get this. This function returns a function that will get
- a stored password for the given host.
+ Make sure that Emacs knows these function exist when the file is
+ being compiled.
#+BEGIN_SRC emacs-lisp
- (defun oni:circe-get-password-for (host)
- (lambda (_)
- (let ((found (nth 0 (auth-source-search :max 1
- :host host
- :require '(:secret)))))
- (when found
- (let ((secret (plist-get found :secret)))
- (if (functionp secret)
- (funcall secret)
- secret))))))
+ (eval-when-compile (require 'oni-circe))
#+END_SRC
I spend most of my time on IRC on Freenode.
@@ -822,7 +806,7 @@ To start off, first I need to enable lexical binding.
"#linuxvoice"
"#conkeror")
:nickserv-password
- ,(oni:circe-get-password-for "irc.freenode.net"))))
+ ,(oni-circe-get-password-for "irc.freenode.net"))))
#+END_SRC
Sometimes I watch some Twitch streams as well.
@@ -834,7 +818,7 @@ To start off, first I need to enable lexical binding.
:use-tls nil
:nick "ryuslash"
:host "irc.twitch.tv"
- :pass ,(oni:circe-get-password-for "irc.twitch.tv")
+ :pass ,(oni-circe-get-password-for "irc.twitch.tv")
:port 6667)))
#+END_SRC