From 744d57c895cbacb5be005ba158a0aceee0810227 Mon Sep 17 00:00:00 2001 From: Peter Selby Date: Sat, 1 May 2021 17:13:05 -0700 Subject: [PATCH] Added md4rd config --- site.d/reddit.el | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 site.d/reddit.el diff --git a/site.d/reddit.el b/site.d/reddit.el new file mode 100644 index 0000000..0807b9b --- /dev/null +++ b/site.d/reddit.el @@ -0,0 +1,54 @@ +;;; reddit.el --- Description -*- lexical-binding: t; -*- +;; +;; Copyright (C) 2021 Niten +;; +;; This file is not part of GNU Emacs. +;; +;;; Code: + +(when (require 'md4rd nil 'noerror) + + (setq md4rd-subs-active + (list academicbiblical + askhistorian + askreddit + askscience + bitcoin + changemyview + clojure + common_lisp + compsci + cryptocurrency + emacs + fire + futurelings + guile + guix + ipfs + learnprogramming + linux + lisp + neutralpolitics + nixos + outoftheloop + personalfinance + politics + programming + racket + science + todayilearned + unpopularopinion + worldnews)) + + (defun consider-refresh-md4rd-login () + (when (and (boundp 'md4rd--oauth-client-id) + (boundp 'md4rd--oauth-access-token) + (boundp 'md4rd--oauth-refresh-token)) + (md4rd-refresh-login))) + + (run-with-timer 0 3540 'consider-refresh-md4rd-login) + + (add-hook 'md4rd-mode-hook 'md4rd-indent-all-the-lines)) + +(provide 'reddit) +;;; reddit.el ends here