You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.org
+38-38Lines changed: 38 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -388,23 +388,23 @@ Embark comes with the following indicators:
388
388
- =embark-minimal-indicator=: shows a messages in the echo area or
389
389
minibuffer prompt showing the current target and the types of all
390
390
targets starting with the current one; this one is on by default.
391
-
391
+
392
392
- =embark-highlight-indicator=: highlights the target at point;
393
393
also on by default.
394
-
394
+
395
395
- =embark-verbose-indicator=: displays a table of actions and their key
396
396
bindings in a buffer; this is not on by default, in favor of the
397
397
mixed indicator described next.
398
-
398
+
399
399
- =embark-mixed-indicator=: starts out by behaving as the minimal
400
400
indicator but after a short delay acts as the verbose indicator;
401
401
this is on by default.
402
-
402
+
403
403
- =embark-isearch-highlight-indicator=: this only does something when
404
404
the current target is the symbol at point, in which case it
405
405
lazily highlights all occurrences of that symbol in the current
406
406
buffer, like isearch; also on by default.
407
-
407
+
408
408
Users of the popular [[https://github.com/justbur/emacs-which-key][which-key]] package may prefer to use the
409
409
=embark-which-key-indicator= from the [[https://github.com/oantolin/embark/wiki/Additional-Configuration#use-which-key-like-a-key-menu-prompt][Embark wiki]]. Just copy its
410
410
definition from the wiki into your configuration and customize the
@@ -633,24 +633,23 @@ For around-action hooks:
633
633
634
634
** Creating your own keymaps
635
635
636
-
All internal keymaps are defined with a helper macro
637
-
=embark-define-keymap= that you can use to define your own keymaps,
638
-
whether they are for new categories in =embark-keymap-alist= or for any
639
-
other purpose! For example a simple version of the file action keymap
636
+
All internal keymaps are defined with the standard helper macro
637
+
=defvar-keymap=. For example a simple version of the file action keymap
640
638
could be defined as follows:
641
639
642
640
#+BEGIN_SRC emacs-lisp
643
-
(embark-define-keymap embark-file-map
644
-
"Example keymap with a few file actions"
645
-
("d" delete-file)
646
-
("r" rename-file)
647
-
("c" copy-file))
641
+
(defvar-keymap embark-file-map
642
+
:doc "Example keymap with a few file actions"
643
+
:parent embark-general-map
644
+
"d" #'delete-file
645
+
"r" #'rename-file
646
+
"c" #'copy-file)
648
647
#+END_SRC
649
648
650
-
Remember also that these action keymaps are perfectly normal Emacs
651
-
keymaps, and do not need to be created with this helper macro. You
652
-
can use the built-in =define-key=, or your favorite external package
653
-
such as =bind-key= or =general.el= to manage them.
649
+
These action keymaps are perfectly normal Emacs
650
+
keymaps. You may want to inherit from the =embark-general-map= if you
651
+
want to access the default Embark actions. Note that =embark-collect=
652
+
and =embark-export= are also made available via =embark-general-map=.
654
653
655
654
** Defining actions for new categories of targets
656
655
@@ -743,11 +742,12 @@ commands, instead of defining new ones.
743
742
the kill-ring, which you get for free). Then this will do:
744
743
745
744
#+begin_src emacs-lisp
746
-
(embark-define-keymap embark-tab-actions
747
-
"Keymap for actions for tab-bar tabs (when mentioned by name)."
748
-
("s" tab-bar-select-tab-by-name)
749
-
("r" tab-bar-rename-tab-by-name)
750
-
("k" tab-bar-close-tab-by-name))
745
+
(defvar-keymap embark-tab-actions
746
+
:doc "Keymap for actions for tab-bar tabs (when mentioned by name)."
0 commit comments