[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm e86f8addd3: Add macros for creating interactive comma
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm e86f8addd3: Add macros for creating interactive commands from actions |
Date: |
Tue, 30 Aug 2022 23:58:54 -0400 (EDT) |
branch: elpa/helm
commit e86f8addd3c14602313b92f689a532584cb3ee29
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Add macros for creating interactive commands from actions
helm-make-command-from-action for commands exiting helm.
helm-make-persistent-command-from-action for persistent commands.
Use it helm-files commands.
Fix helm-ff-toggle-basename
No need to call it with a CANDIDATE arg as it is not an action.
Fix preselection with icons.
Fix toggle update in HFF
It is not an action, no need to use candidate arg.
---
helm-files.el | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/helm-files.el b/helm-files.el
index 2f1dad447b..dd701ec8a6 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -2349,11 +2349,9 @@ Called with a prefix arg open menu unconditionally."
'helm-find-files-eshell-command-on-file)
(put 'helm-ff-run-eshell-command-on-file 'helm-only t)
-(defun helm-ff-run-ediff-file ()
+(helm-make-command-from-action helm-ff-run-ediff-file
"Run Ediff file action from `helm-source-find-files'."
- (interactive)
- (with-helm-alive-p
- (helm-exit-and-execute-action 'helm-find-files-ediff-files)))
+ 'helm-find-files-ediff-files)
(put 'helm-ff-run-ediff-file 'helm-only t)
(helm-make-command-from-action helm-ff-run-ediff-merge-file
@@ -6058,11 +6056,10 @@ list."
(helm-set-pattern
(expand-file-name candidate)))
-(defun helm-ff-file-name-history-run-ff ()
+(helm-make-command-from-action helm-ff-file-name-history-run-ff
"Switch back to current HFF session with selection as preselect."
- (interactive)
- (with-helm-alive-p
- (helm-exit-and-execute-action 'helm-ff-file-name-history-ff)))
+ 'helm-ff-file-name-history-ff)
+(put 'helm-ff-file-name-history-run-ff 'helm-only t)
(defun helm-ff-file-name-history-delete-item (_candidate)
(let ((files (helm-marked-candidates)))
@@ -6182,11 +6179,9 @@ Use FD as backend."
(let ((dir (with-helm-buffer (helm-get-attr 'root-dir))))
(helm-grep-ag dir helm-current-prefix-arg)))
-(defun helm-browse-project-run-ag ()
+(helm-make-command-from-action helm-browse-project-run-ag
"Run `helm-grep' AG from `helm-browse-project'."
- (interactive)
- (with-helm-alive-p
- (helm-exit-and-execute-action 'helm-browse-project-ag)))
+ 'helm-browse-project-ag)
(put 'helm-browse-project-run-ag 'helm-only t)
(defclass helm-browse-project-override-inheritor (helm-type-file) ())
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/helm e86f8addd3: Add macros for creating interactive commands from actions,
ELPA Syncer <=