summaryrefslogtreecommitdiff
path: root/helm-source.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-12-19 11:04:53 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-12-20 07:19:59 +0100
commitf5749ee47e4935b237667664025911e19b1ecd3e (patch)
treede827bd9632d9f6a1b2b2c4cdaa5c66bcf860ae3 /helm-source.el
parent1e17cb1d7bbc6b9a9b30e75065a5e873d67b0e49 (diff)
Allow toggling full frame (#1931)
Introduce a new slot for sources, :persistent-action-if. It allows with one function defining several functions that will be used and will behave differently for splitting helm-window under certain conditions. * helm.el (helm-map): Bind it. (helm-toggle-full-frame): New. (helm-execute-persistent-action): Now the optional ATTR arg can be persistent-action or persistent-action-if. * helm-files.el (helm-find-files-persistent-action-if): New, replace helm-find-files-persistent-action. (helm-source-ffiles): Use PA-if instead of PA.
Diffstat (limited to 'helm-source.el')
-rw-r--r--helm-source.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/helm-source.el b/helm-source.el
index da6a804a..571c3da9 100644
--- a/helm-source.el
+++ b/helm-source.el
@@ -160,6 +160,15 @@
that inform `helm-execute-persistent-action'to not split his
window to execute this persistent action.")
+ (persistent-action-if
+ :initarg :persistent-action-if
+ :initform nil
+ :custom function
+ :documentation
+ " Similar from persistent action but it is a function that should
+ return an object suitable for persistent action when called , i.e. a
+ function or a cons cell.")
+
(persistent-help
:initarg :persistent-help
:initform nil