From ff77f56c21ff54f180e0fbd9e1fe333760faf627 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 6 May 2021 17:45:57 -0500 Subject: Configure `gnus-cloud-covered-servers' I don't think gnus actually 'remembers' these ... possibly they're reset after it loads >-< --- gnus.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnus.el b/gnus.el index 3701c70..5fdb08f 100644 --- a/gnus.el +++ b/gnus.el @@ -31,7 +31,8 @@ ;;; Gnus cloud (setq gnus-cloud-method "nnimap:fastmail.com" gnus-cloud-storage-method nil ; Don't always have GPG or gzip - ) + gnus-cloud-covered-servers '("nntp:news.tilde.club" + "nntp:news.gwene.org")) (add-hook 'gnus-started-hook #'gnus-cloud-download-all-data) (add-hook 'gnus-exit-gnus-hook #'gnus-cloud-upload-all-data) -- cgit 1.4.1-21-gabe81 From 0f1fe1c098f5f4aecec03482155cc42c397f2a4c Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 6 May 2021 17:47:07 -0500 Subject: Refactor CL IDE binding code This is a prelude to writing 'acdw-cl.el', since the two IDEs (that's what I'm calling them) each have a known structure. So I'm going to write a little library to abstract that out. --- init.el | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/init.el b/init.el index 74993fe..9e6f79f 100644 --- a/init.el +++ b/init.el @@ -649,6 +649,37 @@ (:option inferior-lisp-program acdw/lisp-bin) (setup (:straight clhs)) + + (defmacro acdw/cl-define-key (key-string &rest bindings) + "Define KEY-STRING to functions in BINDINGS. +KEY-STRING is passed directly to `kbd'. BINDINGS are a lists of +the form (:IDE MAP FUNC AFTER), where IDE is an IDE (like `slime' or +`sly'), MAP is the mapping in which to bind KEY-STRING, FUNC +is the function to bind KEY-STRING to in that IDE and MAP, and AFTER is the file to `eval-after-load' the `define-key' definition. +`acdw/cl-define-key' only binds the keys that match `acdw/cl-ide' +to save computation time." + (declare (indent 1)) + (let* ((binding (catch :found + (dolist (b bindings) + (when (eq (car b) acdw/cl-ide) + (throw :found b))))) + (binding-map `,(nth 1 binding)) + (binding-func `(function ,(nth 2 binding))) + (binding-after `,(nth 3 binding))) + `(with-eval-after-load ',binding-after + (define-key ,binding-map (kbd ,key-string) ,binding-func)))) + + (dolist (key '("RET" "")) + (acdw/cl-define-key key + (:slime slime-repl-mode-map slime-repl-return-at-end slime) + (:sly sly-mrepl-mode-map sly-mrepl-return-at-end sly-mrepl))) + + (eval-after-load 'sly-mrepl + (function + (lambda nil + (define-key sly-mrepl-mode-map + (kbd "C-c C-c") + (function sly-mrepl-return))))) (pcase acdw/cl-ide (:slime @@ -661,10 +692,6 @@ "~/var/quicklisp/slime-helper.el")))) (load slime-helper)) - (with-eval-after-load 'slime - (dolist (key (list (kbd "RET") - (kbd ""))) - (define-key slime-repl-mode-map key #'slime-repl-return-at-end))) (defun slime-repl-return-at-end () (interactive) (if (<= (point-max) (point)) @@ -680,11 +707,6 @@ (:sly (setup (:straight sly) (:option sly-kill-without-query-p t) - - (with-eval-after-load 'sly-mrepl - (dolist (key (list (kbd "RET") - (kbd ""))) - (define-key sly-mrepl-mode-map key #'sly-mrepl-return-at-end))) (defun sly-mrepl-return-at-end () (interactive) -- cgit 1.4.1-21-gabe81