[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm c1068dcb29 3/4: Fix kmacro delete
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm c1068dcb29 3/4: Fix kmacro delete |
Date: |
Sat, 14 Oct 2023 04:02:07 -0400 (EDT) |
branch: elpa/helm
commit c1068dcb291996c19846bd6e3f4516808889ea15
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Fix kmacro delete
---
helm-ring.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/helm-ring.el b/helm-ring.el
index 67d5cba1cd..059a72ff3b 100644
--- a/helm-ring.el
+++ b/helm-ring.el
@@ -533,6 +533,7 @@ See (info \"(emacs) Keyboard Macros\") for detailed infos."
(cons (kmacro-ring-head)
kmacro-ring)
:test 'equal)))
+
:multiline t
:candidate-transformer
(lambda (candidates)
@@ -613,11 +614,12 @@ See (info \"(emacs) Keyboard Macros\") for detailed
infos."
"")))))
(defun helm-kbd-macro-delete-macro (_candidate)
- (let ((mkd (helm-marked-candidates)))
- (kmacro-push-ring)
+ (let ((mkd (helm-marked-candidates))
+ (head (kmacro-ring-head)))
(cl-loop for km in mkd
do (setq kmacro-ring (delete km kmacro-ring)))
- (kmacro-pop-ring1)))
+ (when (member head mkd)
+ (kmacro-delete-ring-head))))
(defun helm-kbd-macro-edit-macro (candidate)
(kmacro-push-ring)