summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-02-27 08:16:12 -0600
committerCase Duckworth2021-02-27 08:16:12 -0600
commite6e6c6aa91f16e5d66ce3df03ad19b7bfa20de27 (patch)
tree080a37ce58fdb56b939912636317ea8576088e1a
parentRemove comment (diff)
downloademacs-e6e6c6aa91f16e5d66ce3df03ad19b7bfa20de27.tar.gz
emacs-e6e6c6aa91f16e5d66ce3df03ad19b7bfa20de27.zip
Change acdw/bind-after-map thinking
-rw-r--r--config.org53
1 files changed, 16 insertions, 37 deletions
diff --git a/config.org b/config.org index 5221a70..c4af8b0 100644 --- a/config.org +++ b/config.org
@@ -790,7 +790,7 @@ to /hide/ those contents.
790#+end_src 790#+end_src
791 791
792#+begin_src emacs-lisp :noweb-ref bindings 792#+begin_src emacs-lisp :noweb-ref bindings
793 (acdw/bind-after-map 'icomplete icomplete-minibuffer-map 793 (acdw/bind-after-map icomplete icomplete-minibuffer-map
794 (("<down>" #'icomplete-forward-completions) 794 (("<down>" #'icomplete-forward-completions)
795 ("C-n" #'icomplete-forward-completions) 795 ("C-n" #'icomplete-forward-completions)
796 ("<up>" #'icomplete-backward-completions) 796 ("<up>" #'icomplete-backward-completions)
@@ -821,39 +821,11 @@ to /hide/ those contents.
821 821
822*** Consult :package: 822*** Consult :package:
823 823
824#+begin_src emacs-lisp :noweb-ref modes
825 (straight-use-package 'consult)
826 (dolist (f '(consult-history
827 consult-mode-command
828 consult-complex-command
829 consult-buffer
830 consult-buffer-other-window
831 consult-buffer-other-frame
832 consult-register
833 consult-bookmark
834 consult-line
835 consult-outline
836 consult-mark
837 consult-global-mark
838 consult-imenu
839 consult-error
840 consult-grep
841 consult-find
842 consult-line
843 consult-multi-occur
844 consult-keep-lines
845 consult-focus-lines
846 consult-yank-pop
847 consult-apropos))
848 (unless (fboundp f)
849 (autoload (function f) "consult")))
850#+end_src
851
852Consult has a lot of great bindings that work well with Emacs's 824Consult has a lot of great bindings that work well with Emacs's
853default completion system. These all come from the [[https://github.com/minad/consult#configuration][example configuration]]. 825default completion system. These all come from the [[https://github.com/minad/consult#configuration][example configuration]].
854 826
855#+begin_src emacs-lisp :noweb-ref bindings 827#+begin_src emacs-lisp :noweb-ref bindings
856 (acdw/bind-after-map 'consult acdw/map 828 (acdw/bind-after-map consult nil
857 ;; C-c bindings (`mode-specific-map') 829 ;; C-c bindings (`mode-specific-map')
858 (("C-c h" #'consult-history) 830 (("C-c h" #'consult-history)
859 ("C-c m" #'consult-mode-command) 831 ("C-c m" #'consult-mode-command)
@@ -994,12 +966,19 @@ little sugar on top of =define-key= et al.
994 FEATURE is the argument to `with-eval-after-load'. KEYMAP is 966 FEATURE is the argument to `with-eval-after-load'. KEYMAP is
995 passed to the `:map' argument of `acdw/bind', if it's non-nil." 967 passed to the `:map' argument of `acdw/bind', if it's non-nil."
996 (declare (indent 2)) 968 (declare (indent 2))
997 (let (bind-list) 969 (let ((bind-list)
970 (name-string (if (stringp feature) feature
971 (symbol-name feature))))
998 (dolist (bind bindings bind-list) 972 (dolist (bind bindings bind-list)
999 (if keymap 973 (push `(progn (unless (fboundp ,(cadr bind))
1000 (push `(acdw/bind ,@bind :map ,keymap) bind-list) 974 (autoload ,(cadr bind)
1001 (push `(acdw/bind ,@bind) bind-list))) 975 ,name-string nil t))
1002 `(with-eval-after-load ,feature 976 (acdw/bind ,@bind
977 :map
978 ,(if keymap keymap
979 'acdw/map)))
980 bind-list))
981 `(with-eval-after-load ',feature
1003 ,@bind-list))) 982 ,@bind-list)))
1004#+end_src 983#+end_src
1005 984
@@ -1720,7 +1699,7 @@ I've switched =query-replace= and =query-replace-regexp= with their anzu
1720versions, because of the regex thing. 1699versions, because of the regex thing.
1721 1700
1722#+begin_src emacs-lisp :noweb-ref bindings 1701#+begin_src emacs-lisp :noweb-ref bindings
1723 (acdw/bind-after-map 'anzu nil 1702 (acdw/bind-after-map anzu nil
1724 (([remap query-replace] #'anzu-query-replace-regexp) 1703 (([remap query-replace] #'anzu-query-replace-regexp)
1725 ([remap query-replace-regexp] #'anzu-query-replace) 1704 ([remap query-replace-regexp] #'anzu-query-replace)
1726 ([remap isearch-query-replace] #'anzu-isearch-query-replace 1705 ([remap isearch-query-replace] #'anzu-isearch-query-replace
@@ -2441,7 +2420,7 @@ others.
2441#+end_src 2420#+end_src
2442 2421
2443#+begin_src emacs-lisp :noweb-ref bindings 2422#+begin_src emacs-lisp :noweb-ref bindings
2444 (acdw/bind-after-map 'elpher elpher-mode-map 2423 (acdw/bind-after-map elpher elpher-mode-map
2445 (("n" #'elpher-next-link) 2424 (("n" #'elpher-next-link)
2446 ("p" #'elpher-prev-link) 2425 ("p" #'elpher-prev-link)
2447 ("o" #'elpher-follow-current-link) 2426 ("o" #'elpher-follow-current-link)