[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 6184d8b40d 5/7: Make two new commands with helm-make-
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 6184d8b40d 5/7: Make two new commands with helm-make-command-from-action |
Date: |
Sat, 17 Sep 2022 04:58:55 -0400 (EDT) |
branch: elpa/helm
commit 6184d8b40d0afc45c3b4e6aa9e0a242c1d288941
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Make two new commands with helm-make-command-from-action
---
helm-buffers.el | 12 +++++-------
helm-files.el | 11 ++++-------
2 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/helm-buffers.el b/helm-buffers.el
index b97b91ac72..5a524b3c5e 100644
--- a/helm-buffers.el
+++ b/helm-buffers.el
@@ -1160,13 +1160,11 @@ Can be used by any source that list buffers."
(with-current-buffer buf
(helm-browse-project helm-current-prefix-arg)))
-(defun helm-buffers-run-browse-project ()
- "Run `helm-buffers-browse-project' from key."
- (interactive)
- (with-helm-alive-p
- (if helm-buffers-in-project-p
- (user-error "You are already browsing this project")
- (helm-exit-and-execute-action 'helm-buffers-browse-project))))
+(helm-make-command-from-action helm-buffers-run-browse-project
+ "Run `helm-buffers-browse-project' from key."
+ 'helm-buffers-browse-project
+ (cl-assert (not helm-buffers-in-project-p)
+ nil "You are already browsing this project"))
(defun helm-buffers-quit-and-find-file-fn (source)
(let* ((sel (helm-get-selection nil nil source))
diff --git a/helm-files.el b/helm-files.el
index 1abdd58d54..f815b67451 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -5827,13 +5827,10 @@ selecting them."
;; unspecified e.g user hit C-k foo RET.
(t (find-file candidate)))))))
-(defun helm-ff-find-file-other-tab ()
- "Run find file in other tab action from `helm-source-buffers-list'."
- (interactive)
- (cl-assert (fboundp 'tab-bar-mode) nil "Tab-bar-mode not available")
- (with-helm-alive-p
- (helm-exit-and-execute-action 'find-file-other-tab)))
-(put 'helm-ff-find-file-other-tab 'helm-only t)
+(helm-make-command-from-action helm-ff-find-file-other-tab
+ "Run find file in other tab action from `helm-source-buffers-list'."
+ 'find-file-other-tab
+ (cl-assert (fboundp 'tab-bar-mode) nil "Tab-bar-mode not available"))
(defun helm-ff--new-dirs-to-update (path)
"Collect directories to update when creating new directory PATH."
- [nongnu] elpa/helm updated (c3cd741a27 -> 2b44a1da5c), ELPA Syncer, 2022/09/17
- [nongnu] elpa/helm 587be477fe 4/7: Allow inserting code before running action in helm-make-command-from-action, ELPA Syncer, 2022/09/17
- [nongnu] elpa/helm 6184d8b40d 5/7: Make two new commands with helm-make-command-from-action,
ELPA Syncer <=
- [nongnu] elpa/helm 9a637b9f02 1/7: Set helm-only directly in make command macros, ELPA Syncer, 2022/09/17
- [nongnu] elpa/helm f41131dd9d 3/7: Remove all helm-only property settings, ELPA Syncer, 2022/09/17
- [nongnu] elpa/helm c04edbc678 2/7: Bind mcp action to key, ELPA Syncer, 2022/09/17
- [nongnu] elpa/helm c4561f3cf0 6/7: Fix error in read-file-name when source is empty, ELPA Syncer, 2022/09/17
- [nongnu] elpa/helm 2b44a1da5c 7/7: Add some more commands to helm-read-file-map, ELPA Syncer, 2022/09/17