branch: externals/ivy-hydra
commit baddac7825ee1178a0d7f5b438bb38199f541c6a
Author: dude <[email protected]>
Commit: Oleh Krehel <[email protected]>
counsel-kmacro: Handle potential error from `edmacro-fix-menu-commands`.
- It can't format keyboard macros with mouse clicks. Instead, just display a
string with warning in place of the macro.
- Not sure what can really be done about that.
---
counsel.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/counsel.el b/counsel.el
index 1ae1d87..5505b2e 100644
--- a/counsel.el
+++ b/counsel.el
@@ -5357,7 +5357,10 @@ This is a combination of `kmacro-ring' and, together in
a list, `last-kbd-macro'
(lambda (kmacro)
(cons
(concat "(" (nth 2 kmacro) "," (number-to-string (nth 1 kmacro)) "): "
- (format-kbd-macro (if (listp kmacro) (car kmacro) kmacro) 1))
+ (condition-case nil
+ (format-kbd-macro (if (listp kmacro) (car kmacro) kmacro) 1)
+ ;; Recover from error from `edmacro-fix-menu-commands'.
+ (error "Warning: Cannot display macros containing mouse
clicks.")))
kmacro))
(cons
(if (listp last-kbd-macro)