summaryrefslogtreecommitdiff
path: root/helm-ring.el
diff options
context:
space:
mode:
authorSeungKi Kim <tttuuu888@gmail.com>2018-06-14 21:43:52 +0900
committerSeungKi Kim <tttuuu888@gmail.com>2018-06-14 21:43:52 +0900
commit074054883949f27c71778c697745a36717cdc822 (patch)
tree95947dc767352f71533a2b33c0912b27f10988c6 /helm-ring.el
parent3a70eaa8f4c1dff691705187e0d70c231345f9ad (diff)
Add edit option for helm-execute-kmacro
Diffstat (limited to 'helm-ring.el')
-rw-r--r--helm-ring.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/helm-ring.el b/helm-ring.el
index ef3d5254..171121cc 100644
--- a/helm-ring.el
+++ b/helm-ring.el
@@ -275,7 +275,7 @@ This is a command for `helm-kill-ring-map'."
(defvar helm-source-mark-ring
(helm-build-sync-source "mark-ring"
:candidates #'helm-mark-ring-get-candidates
- :action '(("Goto line" . helm-mark-ring-default-action))
+ :action '(("Goto line" . helm-mark-ring-default-action))
:persistent-help "Show this line"
:group 'helm-ring))
@@ -506,7 +506,9 @@ This command is useful when used with persistent action."
"Concat marked macros"
'helm-kbd-macro-concat-macros
"Delete marked macros"
- 'helm-kbd-macro-delete-macro)
+ 'helm-kbd-macro-delete-macro
+ "Edit marked macro"
+ 'helm-kbd-macro-edit-macro)
:group 'helm-ring)
:buffer "*helm kmacro*")))
@@ -539,6 +541,12 @@ This command is useful when used with persistent action."
do (setq kmacro-ring (delete km kmacro-ring)))
(kmacro-pop-ring1)))
+(defun helm-kbd-macro-edit-macro (candidate)
+ (kmacro-push-ring)
+ (setq kmacro-ring (delete candidate kmacro-ring))
+ (kmacro-split-ring-element candidate)
+ (kmacro-edit-macro))
+
(provide 'helm-ring)
;; Local Variables: