summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el13
-rw-r--r--lisp/acdw.el28
2 files changed, 21 insertions, 20 deletions
diff --git a/init.el b/init.el index c8b4404..8f2bc12 100644 --- a/init.el +++ b/init.el
@@ -3,7 +3,7 @@
3;; Created: Sometime during Covid-19, 2020 3;; Created: Sometime during Covid-19, 2020
4;; Keywords: configuration 4;; Keywords: configuration
5;; URL: https://tildegit.org/acdw/emacs 5;; URL: https://tildegit.org/acdw/emacs
6;; Bankruptcy: 5c 6;; Bankruptcy: 5d
7 7
8;; This file is NOT part of GNU Emacs. 8;; This file is NOT part of GNU Emacs.
9 9
@@ -402,11 +402,12 @@
402 :set '((elpher-ipv4-always t) 402 :set '((elpher-ipv4-always t)
403 (elpher-certificate-directory 403 (elpher-certificate-directory
404 (acdw/in-var "elpher/"))) 404 (acdw/in-var "elpher/")))
405 :binds (("n" elpher-next-link :map elpher-mode-map) 405 :now ((acdw/bind-after-map "elpher" elpher-mode-map
406 ("p" elpher-prev-link :map elpher-mode-map) 406 (("n" elpher-next-link :map-after "elpher")
407 ("o" elpher-follow-current-link :map elpher-mode-map) 407 ("p" elpher-prev-link :map-after "elpher")
408 ("G" elpher-go-current :map elpher-mode-map)) 408 ("o" elpher-follow-current-link :map-after "elpher")
409 :now ((when (boundp 'god-exempt-major-modes) 409 ("G" elpher-go-current :map-after "elpher")))
410 (when (boundp 'god-exempt-major-modes)
410 (add-to-list 'god-exempt-major-modes 'elpher-mode)))) 411 (add-to-list 'god-exempt-major-modes 'elpher-mode))))
411 412
412(acdw/pkg (gemini-mode 413(acdw/pkg (gemini-mode
diff --git a/lisp/acdw.el b/lisp/acdw.el index bd6c02a..62778e3 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -161,25 +161,25 @@ The following keywords are recognized:
161 defined in a different file than the command it binds (looking 161 defined in a different file than the command it binds (looking
162 at you, `org-mode')." 162 at you, `org-mode')."
163 (let ((after (when-let (sym (plist-get args :after)) 163 (let ((after (when-let (sym (plist-get args :after))
164 (if (not (listp sym)) 164 (if (not (listp sym))
165 (list sym) 165 (list sym)
166 sym))) 166 sym)))
167 (map-after (plist-get args :map-after)) 167 (map-after (plist-get args :map-after))
168 (keymap (or (plist-get args :map) acdw/bind-default-map)) 168 (keymap (or (plist-get args :map) acdw/bind-default-map))
169 (keycode (if (vectorp key) key (kbd key))) 169 (keycode (if (vectorp key) key (kbd key)))
170 (command-list)) 170 (command-list))
171 (let ((define-key-command `(define-key ,keymap ,keycode ',command))) 171 (let ((define-key-command `(define-key ,keymap ,keycode ',command)))
172 (if map-after 172 (if map-after
173 (push `(with-eval-after-load ,map-after 173 (push `(with-eval-after-load ,map-after
174 ,define-key-command) 174 ,define-key-command)
175 command-list) 175 command-list)
176 (push define-key-command command-list))) 176 (push define-key-command command-list)))
177 (when after 177 (when after
178 (unless (fboundp command) 178 (unless (fboundp command)
179 (push `(autoload ',command ,@after) command-list)) 179 (push `(autoload ',command ,@after) command-list))
180 (unless (or map-after 180 (unless (or map-after
181 (eq keymap acdw/bind-default-map)) 181 (eq keymap acdw/bind-default-map))
182 (push `(autoload ',keymap ,(car after) nil nil 'keymap) command-list))) 182 (push `(autoload ',keymap ,(car after) nil nil 'keymap) command-list)))
183 `(progn 183 `(progn
184 ,@command-list))) 184 ,@command-list)))
185 185