summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--completion.org16
1 files changed, 10 insertions, 6 deletions
diff --git a/completion.org b/completion.org
index 77bf93c..a1aac20 100644
--- a/completion.org
+++ b/completion.org
@@ -248,8 +248,9 @@
:init
(setq embark-quit-after-action nil
embark-verbose-indicator-buffer-sections
- '(jao-embark--bindings "\n" target " - " shadowed-targets)
- embark-indicator #'embark-verbose-indicator
+ '(jao-embark--bindings "\n" target " " jao-embark--other)
+ embark-indicator #'embark-mixed-indicator
+ embark-mixed-indicator-both nil
embark-verbose-indicator-excluded-commands
'(embark-become embark-export embark-collect)
embark-verbose-indicator-nested nil
@@ -267,13 +268,16 @@
(if (= lxk lyk) (string< x y) (< lxk lyk))))
(defun jao-embark--cmd-doc (cmd)
- (ignore-errors
- (propertize (car (split-string (documentation cmd) "\n"))
- 'face 'embark-verbose-indicator-documentation)))
+ (propertize (car (split-string (or (embark--function-doc cmd) "") "\n"))
+ 'face 'embark-verbose-indicator-documentation))
(defun jao--max-len (strs)
(seq-reduce (lambda (m x) (max m (length x))) strs 0))
+ (cl-defun jao-embark--other (&key shadowed-targets &allow-other-keys)
+ (propertize (format "%s" (or shadowed-targets ""))
+ 'face 'embark-verbose-indicator-shadowed))
+
(cl-defun jao-embark--bindings (&key bindings &allow-other-keys)
(let* ((cmds (mapcar #'caddr bindings))
(docs (mapcar #'jao-embark--cmd-doc cmds))
@@ -284,7 +288,7 @@
(cmds (mapcar (lambda (b)
(propertize (cadr b) 'face 'embark-command))
bindings))
- (fmt (format "%%-%ds %%-%ds %%s\n"
+ (fmt (format "%%-%ds %%-%ds %%s\n"
(jao--max-len cmds) (jao--max-len keys)))
(res (seq-mapn (lambda (c k d)
(let ((n (if (string-prefix-p "embark-" c)