summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-01-05 11:24:46 -0600
committerCase Duckworth2022-01-05 11:24:46 -0600
commitf66b316f8a027a30f127220f46bec4f743fe3dee (patch)
tree7885a1d2971aca3095f93f1ab948e54e1e0d15d5
parentDon't ensure functions in :+key, :+leader, :+menu (diff)
downloademacs-f66b316f8a027a30f127220f46bec4f743fe3dee.tar.gz
emacs-f66b316f8a027a30f127220f46bec4f743fe3dee.zip
Add +link-hint-map
-rw-r--r--init.el7
-rw-r--r--lisp/+link-hint.el3
2 files changed, 9 insertions, 1 deletions
diff --git a/init.el b/init.el index 8ebdb45..0248444 100644 --- a/init.el +++ b/init.el
@@ -1081,7 +1081,12 @@ See also `crux-reopen-as-root-mode'."
1081 (:require +link-hint) 1081 (:require +link-hint)
1082 (+link-hint-setup-open-secondary) 1082 (+link-hint-setup-open-secondary)
1083 (:option link-hint-avy-style 'at-full) 1083 (:option link-hint-avy-style 'at-full)
1084 (:+key "M-l" #'+link-hint-open-link)) 1084 (:+key "M-l" +link-hint-map)
1085 (:with-map +link-hint-map
1086 (:bind "M-l" #'+link-hint-open-link "l" #'+link-hint-open-link
1087 "M-m" #'link-hint-open-multiple-links
1088 "m" #'link-hint-open-multiple-links
1089 "M-c" #'link-hint-copy-link "c" #'link-hint-copy-link)))
1085 1090
1086(setup (:straight marginalia) 1091(setup (:straight marginalia)
1087 (marginalia-mode +1)) 1092 (marginalia-mode +1))
diff --git a/lisp/+link-hint.el b/lisp/+link-hint.el index e9d215a..e2d2a84 100644 --- a/lisp/+link-hint.el +++ b/lisp/+link-hint.el
@@ -22,6 +22,9 @@
22 w3m-message-link) 22 w3m-message-link)
23 "Link types to define `:open-secondary' for.") 23 "Link types to define `:open-secondary' for.")
24 24
25(defvar +link-hint-map (make-sparse-keymap)
26 "Keymap for `link-hint' functionality.")
27
25(defun +link-hint-setup-open-secondary (&optional types) 28(defun +link-hint-setup-open-secondary (&optional types)
26 "Define the `:open-secondary' link-hint type for TYPES. 29 "Define the `:open-secondary' link-hint type for TYPES.
27If TYPES is nil, define it for `+link-hint-open-secondary-types'." 30If TYPES is nil, define it for `+link-hint-open-secondary-types'."