emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy-hydra baddac7 129/395: counsel-kmacro: Handle poten


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra baddac7 129/395: counsel-kmacro: Handle potential error from `edmacro-fix-menu-commands`.
Date: Thu, 25 Feb 2021 08:31:46 -0500 (EST)

branch: externals/ivy-hydra
commit baddac7825ee1178a0d7f5b438bb38199f541c6a
Author: dude <ej32u@protonmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]