[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/embark 5f0e434f74: Add support for menu-items (fix #383
From: |
ELPA Syncer |
Subject: |
[elpa] externals/embark 5f0e434f74: Add support for menu-items (fix #383) |
Date: |
Sun, 26 Feb 2023 22:57:40 -0500 (EST) |
branch: externals/embark
commit 5f0e434f74684da5647ece83fe7afa333bfa6765
Author: Omar Antolín Camarena <omar.antolin@gmail.com>
Commit: Omar Antolín Camarena <omar.antolin@gmail.com>
Add support for menu-items (fix #383)
---
embark.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/embark.el b/embark.el
index 54fc2c7d8d..50c9fe6659 100644
--- a/embark.el
+++ b/embark.el
@@ -1186,6 +1186,7 @@ first line of the documentation string; otherwise use the
word
(concat ; fresh copy, so we can freely add text properties
(cond
((stringp (car-safe cmd)) (car cmd))
+ ((eq (car-safe cmd) 'menu-item) (cadr cmd))
((keymapp cmd)
(propertize (if (symbolp cmd) (format "+%s" cmd) "<keymap>")
'face 'embark-keymap))
@@ -1249,7 +1250,8 @@ If NESTED is non-nil subkeymaps are not flattened."
(and (not (keymapp cmd))
(not (functionp cmd))
(consp cmd)
- (not (stringp (car cmd))))
+ (not (or (eq (car cmd) 'menu-item)
+ (stringp (car cmd)))))
(memq cmd '(embark-keymap-help
negative-argument digit-argument)))
collect (list name
@@ -1258,9 +1260,15 @@ If NESTED is non-nil subkeymaps are not flattened."
'keymap)
((and (consp cmd) (stringp (car cmd)))
(cdr cmd))
+ ((and (consp cmd) (eq (car cmd) 'menu-item))
+ (caddr cmd))
(t cmd))
key
- (concat (key-description key)))))
+ (concat
+ (if (and (consp cmd)
+ (eq (car cmd) 'menu-item))
+ "menu-item"
+ (key-description key))))))
(width (cl-loop for (_name _cmd _key desc) in commands
maximize (length desc)))
(def)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/embark 5f0e434f74: Add support for menu-items (fix #383),
ELPA Syncer <=